Hi,
I deployed the EchoAttachmentsService service from the "attchments" sample,
downloaded the WSDL, and tried to generate the proxy with WSDL2Java tool.
It failed! The problem is that the WSDL uses tns1:DataHandler type, but never
defines it. I got the following error message:
java.io.IOException: Type {urn:EchoAttachmentsService}DataHandler is referenced
but not defined.
at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(Symbol
Table.java:484)
at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:384
)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav
a:371)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav
a:358)
at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:243)
at java.lang.Thread.run(Thread.java:484)
Does anyone know why I run into this problem? What could I do to avoid the error?
Thanks.
MC
-------------------------------------------------------------------------------------------------------------------------
The following is the WSDL I got:
<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions
targetNamespace="http://mengc:8080/axis/services/urn:EchoAttachmentsService"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://mengc:8080/axis/services/urn:EchoAttachmentsService"
xmlns:intf="http://mengc:8080/axis/services/urn:EchoAttachmentsService"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns1="urn:EchoAttachmentsService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <wsdl:types>
- <schema targetNamespace="urn:EchoAttachmentsService"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<element name="DataHandler" nillable="true" type="tns1:DataHandler" />
</schema>
- <schema targetNamespace="http://mengc:8080/axis/services/urn:EchoAttachmentsService"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
- <complexType name="ArrayOf_tns1_DataHandler">
- <complexContent>
- <restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:DataHandler[]" />
</restriction>
</complexContent>
</complexType>
<element name="ArrayOf_tns1_DataHandler" nillable="true"
type="impl:ArrayOf_tns1_DataHandler" />
</schema>
</wsdl:types>
- <wsdl:message name="echoDirResponse">
<wsdl:part name="echoDirReturn" type="impl:ArrayOf_tns1_DataHandler" />
</wsdl:message>
- <wsdl:message name="echoDirRequest">
<wsdl:part name="attachments" type="impl:ArrayOf_tns1_DataHandler" />
</wsdl:message>
- <wsdl:message name="echoRequest">
<wsdl:part name="dh" type="tns1:DataHandler" />
</wsdl:message>
- <wsdl:message name="echoResponse">
<wsdl:part name="returnqname" type="tns1:DataHandler" />
</wsdl:message>
- <wsdl:portType name="EchoAttachmentsService">
- <wsdl:operation name="echo" parameterOrder="dh">
<wsdl:input message="impl:echoRequest" name="echoRequest" />
<wsdl:output message="impl:echoResponse" name="echoResponse" />
</wsdl:operation>
- <wsdl:operation name="echoDir" parameterOrder="attachments">
<wsdl:input message="impl:echoDirRequest" name="echoDirRequest" />
<wsdl:output message="impl:echoDirResponse" name="echoDirResponse" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="urn:EchoAttachmentsServiceSoapBinding"
type="impl:EchoAttachmentsService">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="echo">
<wsdlsoap:operation soapAction="" />
- <wsdl:input name="echoRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://mengc:8080/axis/services/urn:EchoAttachmentsService" use="encoded"
/>
</wsdl:input>
- <wsdl:output name="echoResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://mengc:8080/axis/services/urn:EchoAttachmentsService" use="encoded"
/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="echoDir">
<wsdlsoap:operation soapAction="" />
- <wsdl:input name="echoDirRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://mengc:8080/axis/services/urn:EchoAttachmentsService" use="encoded"
/>
</wsdl:input>
- <wsdl:output name="echoDirResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://mengc:8080/axis/services/urn:EchoAttachmentsService" use="encoded"
/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="EchoAttachmentsServiceService">
- <wsdl:port binding="impl:urn:EchoAttachmentsServiceSoapBinding"
name="urn:EchoAttachmentsService">
<wsdlsoap:address
location="http://mengc:8080/axis/services/urn:EchoAttachmentsService" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>