views:

102

answers:

0

Hi, I'm having extremely painful difficulties to have wsimport working to generate my client classes, as per the following method: 1/ I open my endpoint/URL in a web browser, 2/ I copy-paste the contents of this page in a .wsdl file, 3/ and I try to yield the classes by running wsimport against the file I've just created => it fails.

I can create my classes ONLY if I take the original wsdl file (my original definition), used to make this final endpoint wsdl, with all the XSD's it refers too in the same directory.

What I can't understand is that it complains on things that are almost the same in both environments, very similar. I'll take only two examples: 1/ Error resolving component 'stuff-type'. It was detected that 'stuff-type' has no namespace, but components with no target namespace are not referenceable from schema document 'file:/C:/local_path_to_wsdl/app.wsdl#types?schema1'. If 'stuff-type' is intended to have a namespace, perhaps a prefix needs to be provided. If it is intended that 'stuff-type' has no namespace, then an 'import' without a "namespace" attribute should be added to 'file:/D:/local_path_to_wsdl/app.wsdl#types?schema1'.

2/ The content of '#AnonType_stuff-detail-levelstuff-command-base' is invalid. Element 'attributeGroup' is invalid, misplaced, or occurs too often.

In the first case I have the definition

in my wsdl, that I further refer to with:

I've got -almost- exactly the same stuff in the original XSD file, with the only difference that the definition line only contains:

In the 2nd case, I have the line in my wsdl, whereas in the original XSD we find:

Actually I have one or two other error messages, and no classes are made.

I can't understand why wsimport fails with a wsdl file as copied from my endpoint, with all XSD's required having been inlined, but that it works with the original files (wsdl and XSD's) used to produce this URL wsdl. A detail (that might have its importance ?): the framework used to generate the endpoint wsdl is Axis, but here I'm working with a JAX-WS 2.1.7 client.

Thanks a lot in advance for any enlightenments... Regards, Seb