Geronimo
  1. Geronimo
  2. GERONIMO-2988

Axis2: needs to support optional wsdl file

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-M5
    • Fix Version/s: 2.0-M5
    • Component/s: webservices
    • Security Level: public (Regular issues)
    • Labels:
      None

      Description

      When wsdl file is not created, the axis2 currently uses WSDL2Java tool to generate the schema but the tool doesn't process annotation yet! The alternative is to use the wsgen tool provided by sun before Axis2 provides a tool to generate the schema from annotation.

      There is code that writes out a web.xml to disk when web.xml is not there and we may be able to use some of the code there. The idea is to write a generated wsdl file on disk based on java classes and remove the wsdl file when the app is undeployed.

      3 deployment scenarios need to be supported -
      1) regular deployment
      2) in place deployment
      3) hot deployment.

        Activity

        Hide
        Lin Sun added a comment -

        Initial code to hook up the wsgen tool for POJO. Used sun's private API WSToolsObjectFactory.wsgen to invoke the tool. The wsgen tool runs inside of the kernel during axis2 web service deployment time so I have to upgrade the geronimo-axis2-builder's pom.xml and axis2 config's pom.xml for the additional dependencies that wsgen needs. And I had to pass the classpath parameter to the WSToolsObjectFactory.wsgen call as well in order to run the tool successfully inside of Axis2Builder. (spent big time on CNF, CDNF issues... )

        I have performed the test (regular and hot deployment) and able to see the .wsdl and .xsd generated upon deployment of jaxws-war. The generated files are removed when undeployment command is issued.

        One remaining issue is the tool needs jdk_home\lib\tools.jar at runtime otherwise classdefnotfound error will be thrown. One workaround I have is to put the jar in my .m2 repo and update the axis2 config's pom.xml to pick it up. This is a temp solution before I find a better way thus I have commented this in the pom.xml to avoid any build break.

        Also need to update the code for EJB - didn't expect much extra work there but since EJB is completely broken (G3030) I didn't attempt to do it.

        Can someone please review it? Thanks a lot

        Lin

        Show
        Lin Sun added a comment - Initial code to hook up the wsgen tool for POJO. Used sun's private API WSToolsObjectFactory.wsgen to invoke the tool. The wsgen tool runs inside of the kernel during axis2 web service deployment time so I have to upgrade the geronimo-axis2-builder's pom.xml and axis2 config's pom.xml for the additional dependencies that wsgen needs. And I had to pass the classpath parameter to the WSToolsObjectFactory.wsgen call as well in order to run the tool successfully inside of Axis2Builder. (spent big time on CNF, CDNF issues... ) I have performed the test (regular and hot deployment) and able to see the .wsdl and .xsd generated upon deployment of jaxws-war. The generated files are removed when undeployment command is issued. One remaining issue is the tool needs jdk_home\lib\tools.jar at runtime otherwise classdefnotfound error will be thrown. One workaround I have is to put the jar in my .m2 repo and update the axis2 config's pom.xml to pick it up. This is a temp solution before I find a better way thus I have commented this in the pom.xml to avoid any build break. Also need to update the code for EJB - didn't expect much extra work there but since EJB is completely broken (G3030) I didn't attempt to do it. Can someone please review it? Thanks a lot Lin
        Hide
        Lin Sun added a comment -

        Investigated the aptmirrorapi project (https://aptmirrorapi.dev.java.net/) and seems it contains the API we need, however it was not too clear to me whether it is under BSD or Sun license. Sent a note to the owners of the project and copied dims.

        Show
        Lin Sun added a comment - Investigated the aptmirrorapi project ( https://aptmirrorapi.dev.java.net/ ) and seems it contains the API we need, however it was not too clear to me whether it is under BSD or Sun license. Sent a note to the owners of the project and copied dims.
        Hide
        Lin Sun added a comment -

        The initial code has been checked in http://svn.apache.org/viewvc?view=rev&rev=527215. Dims and I also made a few other fixes. This is working with jaxws-war project when .wsdl isn't there.

        Show
        Lin Sun added a comment - The initial code has been checked in http://svn.apache.org/viewvc?view=rev&rev=527215 . Dims and I also made a few other fixes. This is working with jaxws-war project when .wsdl isn't there.

          People

          • Assignee:
            Unassigned
            Reporter:
            Lin Sun
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development