Thank
you for the information!
Shelli
-----Original Message-----The parameterOrder only applies to RPC style services in which you have more than one message part defined in your input message. Most tools won't object if you use parameterOrder in a document style service, but it your case, you specified a parameter that didn't exist. The parameterOrder attribute must reference message parts by their part name (in your case, "addPart", not "add"). If you specify "addPart", it should work. But as I said, it doesn't make sense in a document style service.
From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]
Sent: Monday, January 09, 2006 6:12 PM
To: [email protected]
Subject: Re: Element is referenced but not defined
Anne
On 1/9/06, Shelli D. Orton <[EMAIL PROTECTED]> wrote:Thanks, that worked!Could you tell me why I needed to remove the parameterOrder attribute? I used another wsdl file (document/literal wrapped) as a template for this one, and it uses the attribute and successfully works with wsdl2java.Shelli-----Original Message-----You need to add the "xsd" prefix to your element definitions in your schema:
From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 09, 2006 3:47 PM
To: [email protected]
Subject: Re: Element is referenced but not defined
<element name="add">
<complexType>
<sequence>
<element name="username" type="xsd:string"/>
<element name="password" type="xsd:string"/>
<element name="gender" type="xsd:string"/>
<element name="state" type="xsd:string"/>
<element name="timeZone" type="xsd:string"/>
<element name="SOCs" type="impl:SOCArray"/>
</sequence>
</complexType>
</element>
<element name="addResponse" type="xsd:string"/>
Should be:
<xsd:element name="add">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="username" type="xsd:string"/>
<xsd:element name="password" type="xsd:string"/>
<xsd:element name="gender" type="xsd:string"/>
<xsd:element name="state" type="xsd:string"/>
<xsd:element name="timeZone" type="xsd:string"/>
<xsd:element name="SOCs" type="impl:SOCArray"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="addResponse" type="xsd:string"/>
Also, you must remove the parameterOrder attribute from the <wsdl:operation> definition.
Anne
On 1/9/06, Shelli D. Orton <[EMAIL PROTECTED]> wrote:Hi,I'm trying to write wsdl in a document/literal wrapped style (yes, this is related to my earlier post for those who viewed it). I have a pared down version of the wsdl with only the one request that was giving me grief in rpc/encoded style. When I run wsdl2java, I get the following error:
java.io.IOException: Element {http://clearmode.com:80/ws/ConsumerProvision}addResponse is referenced but not defined.
at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:670)
at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
at java.lang.Thread.run(Unknown Source)I have defined an element "addResponse" in my types section, so I'm not sure what is causing the error. The wsdl was based on another wsdl that wsdl2java successfully creates classes for. Could someone tell me what I've done wrong?Thanks,ShelliHere's the wsdl:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="http://clearmode.com:80/ws/ConsumerProvision"
xmlns:impl="http://clearmode.com:80/ws/ConsumerProvision"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
><wsdl:types><xsd:schema targetNamespace="http://clearmode.com:80/ws/ConsumerProvision"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><xsd:simpleType name="SOC">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType><xsd:complexType name="SOCArray">
<xsd:sequence>
<xsd:element name="SOC" type="impl:SOC" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType><element name="add">
<complexType>
<sequence>
<element name="username" type="xsd:string"/>
<element name="password" type="xsd:string"/>
<element name="gender" type="xsd:string"/>
<element name="state" type="xsd:string"/>
<element name="timeZone" type="xsd:string"/>
<element name="SOCs" type="impl:SOCArray"/>
</sequence>
</complexType>
</element>
<element name="addResponse" type="xsd:string"/>
</xsd:schema></wsdl:types><wsdl:message name="addRequest">
<wsdl:part name="addPart" element="impl:add"/>
</wsdl:message><wsdl:message name="addResponse">
<wsdl:part name="addResponsePart" element="impl:addResponse"/>
</wsdl:message><wsdl:portType name="ConsumerProvision"><wsdl:operation name="add" parameterOrder="add">
<wsdl:input name="addRequest" message="impl:addRequest"/>
<wsdl:output name="addResponse" message="impl:addResponse"/>
</wsdl:operation>
</wsdl:portType><wsdl:binding name="ConsumerProvisionSoapBinding" type="impl:ConsumerProvision"><wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/><wsdl:operation name="add">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="addRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="addResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation></wsdl:binding><wsdl:service name="ConsumerProvision">
<wsdl:port name="ConsumerProvision" binding="impl:ConsumerProvisionSoapBinding">
<wsdlsoap:address location="http://clearmode.com/ProvisioningEngine/services/ConsumerProvision"/ >
</wsdl:port>
</wsdl:service></wsdl:definitions>
