means that the part references an element type:
<element name="Ping".../>
There is no such beast in your WSDL. Your WSDL has a complexType called "Ping", so changing "element=" to "type=" finds the complex type.
Russell Butek
[EMAIL PROTECTED]
Please respond to [EMAIL PROTECTED]
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc:
Subject: WSDL Question
I'm having a problem with the following wsdl example:
- <?xml version="1.0" ?>
<definitions name="urn:FooBar"
- targetNamespace="urn:FooBar2"
xmlns:tns="urn:FooBar2"
xmlns:xsd0="http://www.w3.org/1999/XMLSchema"
xmlns:xsd1="urn:FooBar2"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
- <xsd0:schema targetNamespace="urn:FooBar2"
xmlns:xsd0="http://www.w3.org/1999/XMLSchema" >
- <xsd0:complexType name="Status">
<xsd0:sequence>
- <xsd0:element name="Status" type="xsd0:string" />
</xsd0:sequence>
<xsd0:complexType name="Ping">
- <xsd0:sequence>
<xsd0:element name="Ping" type="xsd0:string" />
</xsd0:complexType>
</types>
<!-- message declns -->
<message name="PingRequest">
<part name="body" element="xsd1:Ping" />
</message>
<message name="PingResponse">
<part name="body" element="xsd1:Status" />
</message>
<!-- port type declns -->
<portType name="FooBar">
- <operation name="ping">
<input message="tns:PingRequest"/>
<output message="tns:PingResponse"/>
</portType>
<!-- binding declns -->
<binding name="FooBarSOAPBinding" type="tns:FooBar">
- <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
- <operation name="ping">
<soap:operation soapAction=""/>
<input>
- <soap:body use="literal"
namespace="urn:FooBar2" />
<output>
- <soap:body use="literal"
namespace="urn:FooBar2" />
</operation>
<!-- service decln -->
<service name="FooBarService">
- <port name="FooBar" binding="tns:FooBarSOAPBinding">
<soap:address
</port>
- </service>
$ java org.apache.axis.wsdl.WSDL2Java -s -d Session -Nurn:FooBar2=mypkg
blah.wsdl
I get the following exception:
- java.io.IOException: Type urn:FooBar2:Ping is referenced but not defined.
at
05)
at
org.apache.axis.wsdl.toJava.SymbolTable.add(SymbolTable.java:331)
- at org.apache.axis.wsdl.toJava.Emitter.emit(Emitter.java:188)
at org.apache.axis.wsdl.toJava.Emitter.emit(Emitter.java:155)
at
at java.lang.Thread.run(Unknown Source)
If I change the message-type attribute from 'element' to 'type' it works!?!
Any help would be appreciated.
Thanks,
Jeff Edwards
[EMAIL PROTECTED]