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

    Namespace issue for SEIs extending common interface

    Yogesh B Newbie

      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.


        • 1. Re: Namespace issue for SEIs extending common interface
          Richard Opalka Master

          Please, create an Jira issue for that here:


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

          • 2. Re: Namespace issue for SEIs extending common interface
            Yogesh B Newbie


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

            Have also uploaded some sample programs to reproduce.


            • 3. Re: Namespace issue for SEIs extending common interface
              Yogesh B Newbie

              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.