5 Replies Latest reply on Feb 24, 2005 9:42 AM by Jesse O'Neill-Oine

    Should WSDL2Java be used with JBossWS?

    Jesse O'Neill-Oine Newbie

      I am attempting to understand the process that I am supposed to undertake when developing a new doc/literal service for JBossWS on JBoss 4.0.1. I'm getting confused about whether I should use WSDL2Java or wscompile, or both. I am attempting to develop this service from a set of predefined XSDs (HR-XML), so I'm a little bit confined. I have written my WSDL file and would now like to use a tool to generate the classes and jaxrpc mapping file. It seems that WSDL2Java generates slightly "nicer" classes, but it doesn't give me the mapping file. If I try use wscompile I get error messages about the schemas that I have no control over. WSDL2Java doesn't give me any problems with the XSDs, but it does seem to do some funky things in its own right (a couple of classes it generates don't compile because of duplicate constructors).

      Can someone please give me an idea which of these tools I should commit to? I know that JBoss is working on a new tool that I assume will work better, but unfortunately I cannot just wait for that, so I need to understand how to use WSDL2Java and wscompile together if possible.

      Thanks!

        • 1. Re: Should WSDL2Java be used with JBossWS?
          Ole Matzura Novice

          Hi!

          I believe you have to use wscompile if you want to create j2ee 1.4 compliant webservices for JBossWS. If you are not happy with the classes generated by wscompile for your schema, I suggest you create a webservice with wscompiles -nodatabinding option and then use (for example) XMLBeans to do the databinding.

          good luck!

          /Ole

          • 2. Re: Should WSDL2Java be used with JBossWS?
            Thomas Diesler Master

            If wscompile doesnt understand your schemas it would either be a problem with the schema or a bug in wscompile. Both of which is beyond our control.

            What is wscompile complaining about?

            • 3. Re: Should WSDL2Java be used with JBossWS?
              Jesse O'Neill-Oine Newbie

              First off, thank you both for the replies. I'm finally starting to understand how all the pieces fit together.

              I was able to successfully use WSDL2Java to generate the necessary classes and WSDD files. With that in place, I was able to get the service working fine in Axis 1.2RC2.

              I would really like to use JBossWS instead of Axis, though, because we are already using JBoss for our EJB container, etc. The problem, however, is that wscompile fails when I try to feed it the same WSDL file that WSDL2Java accepted without problem. The error that I get is: error: modeler error: model error: invalid entity name: "EntityIdType" (in namespace: "http://ns.hr-xml.org/2004-08-02"). The EntityIdType is in one of the XSDs that define the HR XML spec and I therefore don't have the ability to change it. I've put the various files out on my webserver so you can take a look at them if you'd like. Just go to http://quasistatic.com/webservices to see the WSDL, web.xml, webservices.xml, and XSD files (these are in the hrxml folder and I've placed a zip of them out there as well if that's easier). It seems that the problem is in the XSD file hrxml/Assessment/AssessmentResult.xsd. This XSD includes several other XSDs and one of the included defines EntityIdType (hrxml/CPO/EntityIdType.xsd), but when wscompile gets to the ClientId element, it doesn't seem to understand EntityIdType.

              Thanks so much for helping me out on this!

              • 4. Re: Should WSDL2Java be used with JBossWS?
                Thomas Diesler Master

                wscompile has a verbose mode. Does the output confirm your asumptions?

                Maybe you should take this issue to the jwsdp-1.5 tracker, forum, user list, etc. and hear what they say.

                That wsdl2java works should not be taken as proof of correctness if you ask me.

                • 5. Re: Should WSDL2Java be used with JBossWS?
                  Jesse O'Neill-Oine Newbie

                  Unfortunately, the output I received was with -verbose set in wscompile. It just doesn't give me much to go on. I'll take your advice and see what I can figure out from the jwsdp forums, etc.

                  Thanks!