I am trying to use a web service where I have no control of the WSDL. Unfortunately the WSDL defines the result elements like this:
I have an external XSD that defines the element in greater detail, and a JAXB binding file that should bind the element from the WSDL to the class generated by compiling the XSD. The binding file looks like this:
The schema defines a different targetNamespace than the WSDL so elements with the same name should be legal.
The JAXB bindings are ignored so there is a probably an error somewhere but I have been unable to find out where. I am hoping that people here can help as the sequence of <any> in the WSDL is beginning to cause problems.
To make information a little more complete here are the complete WSDL:
And the complete XSD:
Any other solutions that will make the elements from the XSD used are completely acceptable as well. I am looking at JAXWS bindings of the wsdl:portType but the documentation, or lack thereof, is just as confusing as it is for JAXB bindings.
Since nothing was said, I assume you want to generate artifacts for a client that is to access the webservice using wsimport.
Have you used the -b flag? The -b flag, after which a JAXB binding file is specified, is available both in wsimport and xjc (the JAXB binding compiler).
wsimport -b MyJAXBBindingFile.xml MyWSDL.wsdl ...
xjc -b MyJAXBBindingFile.xml MyXMLSchema.xsd