2 Replies Latest reply on Feb 8, 2011 4:19 AM by asoldano

    JBoss 6 Web Service with JAXB generated Classes wsdl problem

    wwarrior

      Hi,

      I'm trying to run web service on JBoss AS 6 Final, which has an operation with JAXB generated Classes in parameter and return value.

       

      It deploys fine but when I'm trying to generate web service client from wsdl, it fails.

       

      XMLSpy 2008 says: "The target namespace http://testws/ of the <xs:import> definition must differ from namespace http://testws/ of the enclosing schema"

       

      And NetBeans 6.9.1 (the referred type ApplicationRequesType is the JAXB generated class):

      netbeanswsdl.jpg

       

       

      On JBoss 5.1. it works fine. On JBoss 5.1. I have included the following jars in lib endorsed: jaxb-api.jar, jbossws-native-jaxrpc.jar, jbossws-native-jaxws.jar, jbossws-native-jaxws-ext.jar, jbossws-native-saaj.jar. Does it maybe have something to do with them? I haven't modified JBoss 6 at all and I'm running default configuration in both servers (on Windows).

       

      Although, if I generate the web service client against JBoss 5.1. and then switch to JBoss 6, the client works fine against JBoss 6.

       

      Any help would be appreciated.

        • 1. Re: JBoss 6 Web Service with JAXB generated Classes wsdl problem
          jaikiran

          Welcome to the forums!

           

          I've moved this thread to our webservices forum, where you might get an answer.

          • 2. Re: JBoss 6 Web Service with JAXB generated Classes wsdl problem
            asoldano

            Can you check if the wsdl of the published endpoint on AS 6 differs from the one of the same service on AS 5 ?

            JBoss AS 5 and 6 come with different default WS stack (6 having JBossWS-CXF), so you might see minor changes in the published wsdl when doing code-first development. While it would be interesting to understand if this is a bug in the way the imported schema is handled in the wsdl, or if it's a consequence of how the namespaces are defined in the jaxb annotated classes, please keep in mind that you can develop starting from a given wsdl you want your services to have (wsconsume tool on the wsdl, then implement the generated service endpoint interface).

             

            Regarding the libs to be used, take a look at the wsrunclient scripts in AS 6 bin folder to have an idea of everything you might need. In your java.endorsed.dirs env variable you should include only the libs that are in lib/endorsed on the AS version you're using. That influences the JAXB/JAXWS api version used when running with JDK6.