Question

I'm having an issue while trying to generate some Java classes.

C:\Users\kon\Desktop>wsimport -keep -verbose -extension -d generated http://XXXXXXWebServicesPort?wsdl
parsing WSDL...

[INFO] Trying to read authorization file : "C:\Users\kon\.metro\auth"...

[ERROR] Schema descriptor {http://www.w3.org/2001/XMLSchema}string in message part "return" is not defined and could not be bound to Java. Perhaps the schema descriptor {http://www.w3.org/2001/XMLSche
ma}string is not defined in the schema imported/included in the WSDL. You can either add such imports/includes or run wsimport and provide the schema location using -b switch.
  line 81 of http://XXXXXXWebServicesPort?wsdl

Here the content at line 81:

<message name="getJDBCConnectionURLOutput">
    <part name="return" element="xsd:string"/>
</message>

I haven't used wsimport before and could not find any similar issue on the web. Is this a spelling issue?

Was it helpful?

Solution

I think the WSDL is wrong.

It thinks you're pointing to an element called xsd:string which is defined earlier in the WSDL.

So xsd:string is incorrect, it should be some type you've defined earlier.

Compare it to some examples here: http://www.w3.org/2001/03/14-annotated-WSDL-examples

HTH

Edit: You can't define it as being string type like that directly. Maybe you meant this:

<part name="return" type="xsd:string"/>

Edit: Maybe this info in the WSDL spec will help: http://www.w3.org/TR/wsdl#_soap:body

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top