3 Replies Latest reply on May 28, 2008 7:07 AM by yogeshkb

    Namespace issue for SEIs extending common interface

    yogeshkb

      HI Team,

      I have two webservices with separate SEIs (say A in targetNamespace X and B in targetNamespace Y) each one extending a common interface (say C)

      When I generated the WSDLs using the wsprovide tool, I can see the two wsdl files each containing the schema for the operations of common interface C getting generated as part of the SEI A's namespace and SEI B's namespace individually which is expected as per the standards..

      I deployed these webservices in JBoss4.2.2 with JBossWS2.0.3. When I tried to open the wsdls from the JBoss server, the wsdls generated from the jboss server seems to have the operations of common interface C available as part of the SEI A. But for the SEI B, the operations of common interface C are imported from SEI A's namespace.

      I was expecting the operations of common interface C to be available in each individual webservice's namespace as unique operations.

      I also tried to explicitly specify the XmlType annotation in the common interface class C to have a common namespace but even this attempt got failed.

      Pls let me know how to workaround this problem.

      Regards,
      Yogesh.

        • 1. Re: Namespace issue for SEIs extending common interface
          ropalka

          Please, create an Jira issue for that here:

          http://jira.jboss.org/jira/browse/JBWS

          and provide a simple test case to reproduce your problem, please.

          • 2. Re: Namespace issue for SEIs extending common interface
            yogeshkb

            Hi,

            I have raised the issue - http://jira.jboss.org/jira/browse/JBWS-2193.

            Have also uploaded some sample programs to reproduce.

            Thanks,
            Yogesh

            • 3. Re: Namespace issue for SEIs extending common interface
              yogeshkb

              I was able to workaround this problem by adding a ReqestWrapper and ResponseWrapper annotations for the methods in WSVersionIF.

              I used the message skeletons generated by the wsprovide tool and used these classes in the wrapper annotations.

              My understanding is: For every SEI, jbossws generates operation message class skeletons in the "<SEI package>.jaxws" package and automatically adds annotations with the targetNamespace pointing to the SEI's targetNamespace. This approach fails when the common interface is used or inherited by multiple SEIs.

              In my case, when jbossws loads the first webservice, it tries to generate the operation message class skeletons for the common interface methods in the common interface package suffixed with ".jaxws" ( eg., com.ws.common.jaxws) and fixes the targetNamespace as mentioned in the first SEI. For subsequent webservices, it just checks whether such a message class(of common interface) already exists and tries to reuse the same message class and hence the targetNamespace of the first webservice is used for the common operations across other webservices.

              So I tried manually creating a operation message class for the common interface and explicitly mentioned that thro the RequestWrapper and ResponseWrapper annotations and found things are working as required.

              Pls let me know whether this is a right solution and also pls confirm whether it voilates any wsdl/jaxws specs.