I am having all kinds of trouble developing a client for a web service provided by a third party. Part of the problem is that for several of the ports (I think that’s the name - I am new to web services), the wsdl specifies an <xsd:any/> tag where the xml that is supposed to be filled in here is specified by an external xsd.
I generated the client code using wsimport which apparently comes with the jdk. The code for the input class which used the <xsd:any/> tag just had an inner class whose only property was a list of objects. You had to instantiate a class generated from xjc and add that to the list of objects. Several of the setters on this class took JAXBElements (the nillable ones) as arguments instead of Strings or what have you and all the setters that corresponded to dates took XMLGregorianCalendars as arguments
Also, the username and password for the service are supposed to be passed in the soap header. I had to cast the service as a WSBindingProvider and set the headers on it to generate the proper xml. Now I am having a problem because the jdk on the build server and production boxes are too old to include the jaxws code.
I get the very strong feeling that I took the wrong approach to developing a jaxws client. Is there a more common way to do this, or is all this rigamarole because the service was generated by .NET?
Thanks,
Rob