I am having difficulty compiling a .NET 2.0 generated wsdl file with 1.6.0_22 wsimport. The project goal is to create
a client for an existing external web service. The provided wsdl file can be successfully imported with .Net or SOAPUI.
I am trying to figure out a modification that would allow compilation with wsimport. I reduced the original wsdl down
to the essential parts to help debug it. I have tried several solutions, but none work. None of my searches have
provided an answer.
wsimport error:
[WARNING] src-resolve.4.2: Error resolving component 's:schema'. It was detected that 's:schema' is in namespace
'http://www.w3.org/2001/XMLSchema', but components from this namespace are not referenceable from schema document
'<path>/simple.wsdl#types?schema1'. If this is the incorrect namespace, perhaps the prefix of 's:schema' needs to
be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to
'<path>/simple.wsdl#types?schema1'. line 13 of <path>/ADM/simple.wsdl#types?schema1
[ERROR] undefined element declaration 's:schema'
line 13 of <path>/simple.wsdl
simple.wsdl:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.somewhere.net/"
targetNamespace="http://www.somewhere.net/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://www.somewhere.net/">
<s:element name="HelloWorld">
<s:complexType>
<s:sequence>
<s:element ref="s:schema"/> <!-- compile succeeds without this line -->
<s:any/>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="HelloWorldSoapIn">
<wsdl:part name="parameters" element="tns:HelloWorld"/>
</wsdl:message>
<wsdl:portType name="soap">
<wsdl:operation name="HelloWorld"> <wsdl:input message="tns:HelloWorldSoapIn"/> </wsdl:operation>
</wsdl:portType>
<wsdl:binding name="soap" type="tns:soap">
<
soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="HelloWorld">
<soap:operation soapAction="http://www.somewhere.net/HelloWorld" style="document"/>
<wsdl:input> <soap:body use="literal"/> </wsdl:input>
<wsdl:output> <soap:body use="literal"/> </wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="data">
<wsdl:port name="soap" binding="tns:soap">
<soap:address location="http://somewhere.net/data.asmx"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Thanks,
Rob.