Beehive
  1. Beehive
  2. BEEHIVE-839

XMLBean genearted objects for schema elements are not handled in JWS.

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Web Services (181)
    • Labels:
      None

      Description

      If a JWS mathod uses a xmlbeans generated type based on a global element in the schema (xxxDocument object) the type mapping the following exception is thrown:

      Note: the code works fine if types are used in the interface, but not documents.

      • Error in type registeration
        javax.xml.rpc.JAXRPCException: Null qualified name specified.
        at org.apache.axis.encoding.TypeMappingImpl.internalRegister(TypeMappingImpl.java:236)
        at org.apache.axis.encoding.TypeMappingImpl.register(TypeMappingImpl.java:218)
        at org.apache.axis.encoding.TypeMappingDelegate.register(TypeMappingDelegate.java:73)
        at org.apache.beehive.wsm.axis.AxisHook.configureTypeMapping(AxisHook.java:355)
        at org.apache.beehive.wsm.axis.AxisHook.createServiceDesc(AxisHook.java:155)
        at org.apache.beehive.wsm.axis.handlers.AnnotatedWebServiceDeploymentHandler.createSOAPService(AnnotatedWebServiceDeploymentHandler.java:158)
        at org.apache.beehive.wsm.axis.handlers.AnnotatedWebServiceDeploymentHandler.getSOAPService(AnnotatedWebServiceDeploymentHandler.java:117)
        at org.apache.beehive.wsm.axis.handlers.AnnotatedWebServiceDeploymentHandler.invoke(AnnotatedWebServiceDeploymentHandler.java:76)
        at org.apache.beehive.wsm.axis.handlers.AnnotatedWebServiceDeploymentHandler.generateWSDL(AnnotatedWebServiceDeploymentHandler.java:102)
        at org.apache.axis.strategies.WSDLGenStrategy.visit(WSDLGenStrategy.java:33)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.generateWSDL(SimpleChain.java:104)
      1. wsmdiff.txt
        67 kB
        daryoush mehrtash
      2. client.zip
        349 kB
        daryoush mehrtash
      3. server.zip
        15 kB
        daryoush mehrtash

        Activity

        Eddie O'Neil made changes -
        Assignee daryoush mehrtash [ dmehrtash ]
        Chad Schoettger made changes -
        Component/s Web Services (181) [ 11274 ]
        Hide
        Chad Schoettger added a comment -

        moving to wsm component

        Show
        Chad Schoettger added a comment - moving to wsm component
        daryoush mehrtash made changes -
        Field Original Value New Value
        Attachment client.zip [ 12311730 ]
        Attachment server.zip [ 12311729 ]
        Attachment wsmdiff.txt [ 12311728 ]
        Hide
        daryoush mehrtash added a comment -

        This patch applies to Beehive 843, and 839; it contains the fixes that were explained in:

        http://mail-archives.apache.org/mod_mbox/incubator-beehive-dev/200508.mbox/%3ce5b8e97905080810201dc328b2@mail.gmail.com%3e

        The same document also is in the WIKI at: http://wiki.apache.org/beehive/XmnBeansInWsm

        Few Notes about the Patch?.

        There are two XMLBeans bugs that we need to have fixed before this work is completed. The bugs are:

        http://issues.apache.org/jira/browse/XMLBEANS-189
        http://issues.apache.org/jira/browse/XMLBEANS-190

        Due to these bugs the WSDL is not accurate. Other than the WSDL the client and server side seems to be working fine.

        I am submitting a diff for the patch and two zip file to demonstrate the fix. The zip files are the server side project that uses XMLBeans document and anonymous types and the client application that is the Axis client side test case to validate the changes.

        The patch is to Revision: 231554 of the WSM code. The patch is essentially the diff of the affected files, it also contains a new file: WSMServiceDescriptor.java.

        To run the client and the server you should do the following:

        a) apply the patch to WSM
        b) build a new distribution for beehive
        c) Set the beehive home to be the root of the distribution
        d) unzip the server side
        e) build the project
        a. cd WEB-INF/src
        b. run ant
        f) deploy the project to xmlbeantestWS in your servlet container
        g) startup the servlet container
        h) Afterward you should be able to go to http://localhost:8080/xmlbeantestWS and view be able to get the WSDL for the Bare and Wrapped test cases
        i) Unzip the client side
        j) Build the client side, and run the test case
        a. Run ant (this would build and run the unit test for the wrapped service)

        NOTES:

        ? There are 5 tests in the client side test case. Of the five only 4 should run, at the end you should get

        [junit] Tests run: 5, Failures: 0, Errors: 1, Time elapsed: 13.429 sec

        The one error is due to the XMLBean bugs that I listed above.

        ? In a standard client side test case the client side should be generated from the real WSDL of the server. To account for the XMLBeans issues, the client side code includes an edited version of the WSDL. The WSDL is used to generate the client side types and Axis artifacts for the test case. Once the XMLBean bugs are fixed the build file should be modified to get the real WSDL from the service.

        TBD:

        This code is submitted as prototype; if it is to be integrated with WSM the unit test case that is included here should be expanded and incorporated in the WSM DRT process.

        Show
        daryoush mehrtash added a comment - This patch applies to Beehive 843, and 839; it contains the fixes that were explained in: http://mail-archives.apache.org/mod_mbox/incubator-beehive-dev/200508.mbox/%3ce5b8e97905080810201dc328b2@mail.gmail.com%3e The same document also is in the WIKI at: http://wiki.apache.org/beehive/XmnBeansInWsm Few Notes about the Patch?. There are two XMLBeans bugs that we need to have fixed before this work is completed. The bugs are: http://issues.apache.org/jira/browse/XMLBEANS-189 http://issues.apache.org/jira/browse/XMLBEANS-190 Due to these bugs the WSDL is not accurate. Other than the WSDL the client and server side seems to be working fine. I am submitting a diff for the patch and two zip file to demonstrate the fix. The zip files are the server side project that uses XMLBeans document and anonymous types and the client application that is the Axis client side test case to validate the changes. The patch is to Revision: 231554 of the WSM code. The patch is essentially the diff of the affected files, it also contains a new file: WSMServiceDescriptor.java. To run the client and the server you should do the following: a) apply the patch to WSM b) build a new distribution for beehive c) Set the beehive home to be the root of the distribution d) unzip the server side e) build the project a. cd WEB-INF/src b. run ant f) deploy the project to xmlbeantestWS in your servlet container g) startup the servlet container h) Afterward you should be able to go to http://localhost:8080/xmlbeantestWS and view be able to get the WSDL for the Bare and Wrapped test cases i) Unzip the client side j) Build the client side, and run the test case a. Run ant (this would build and run the unit test for the wrapped service) NOTES: ? There are 5 tests in the client side test case. Of the five only 4 should run, at the end you should get [junit] Tests run: 5, Failures: 0, Errors: 1, Time elapsed: 13.429 sec The one error is due to the XMLBean bugs that I listed above. ? In a standard client side test case the client side should be generated from the real WSDL of the server. To account for the XMLBeans issues, the client side code includes an edited version of the WSDL. The WSDL is used to generate the client side types and Axis artifacts for the test case. Once the XMLBean bugs are fixed the build file should be modified to get the real WSDL from the service. TBD: This code is submitted as prototype; if it is to be integrated with WSM the unit test case that is included here should be expanded and incorporated in the WSM DRT process.
        daryoush mehrtash created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            daryoush mehrtash
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development