axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktiongson <kristine.tiong...@gmail.com>
Subject Re: Element is referenced but not defined
Date Thu, 07 Aug 2008 21:23:29 GMT

I have a similar error, but the fix mentioned below doesn't apply to my
problem. Can anyone please help me figure out what the problem with mine is?

Project: 
Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter

Problem: 
I receive the following error highlighted in RED below when running the
WSDL2Java emitter. Attached is the WSDL I’m using. The Element
CWBSDescription is defined in the WSDL so I do not know why the error is
thrown. 

Window’s Console Output:
D:\PE\wsdl>set CLASSPATH=.;.D:\j2sdk1.4.2_13\bin;C:\Program
Files\Java\jre1.6.0_05\lib\ext\QTJava.zip;D:\PE\lib\jax-qname.jar;D:\PE\lib\axis.jar;D:\PE
\lib\activation.jar;D:\PE\lib\wsdl4j.jar;D:\PE\lib\commons-logging.jar;D:\PE\lib\commons-discovery.jar;D:\PE\lib\jaxrpc.jar;D:\PE\lib\saaj.jar;D:\PE\l
ib\mail.jar

D:\PE\wsdl>java org.apache.axis.wsdl.WSDL2Java -p
com.raytheon.pe.webservice.client -o ../src -t oa_PBA_PCP.wsdl
java.io.IOException: Element CWBSDescription 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(Thread.java:534)

Attached is my WSDL.

Thanks,
Kristine




Anne Thomas Manes wrote:
> 
> 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.
> 
> Anne
> 
> On 1/9/06, Shelli D. Orton <shelli.orton@wmode.com> 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-----
>> *From:* Anne Thomas Manes [mailto:atmanes@gmail.com]
>> *Sent:* Monday, January 09, 2006 3:47 PM
>> *To:* axis-user@ws.apache.org
>> *Subject:* Re: Element is referenced but not defined
>>
>> You need to add the "xsd" prefix to your element definitions in your
>> schema:
>>
>>             <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 <shelli.orton@wmode.com> 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<http://clearmode.com:80/ws/ConsumerProvision%7DaddResponse>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,
>> > Shelli
>> >
>> > Here'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"/<http://schemas.xmlsoap.org/soap/http%22/>
>> > >
>> >
>> >         <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"/
>> >
>> <http://clearmode.com/ProvisioningEngine/services/ConsumerProvision%22/>
>> > >
>> >         </wsdl:port>
>> >     </wsdl:service>
>> >
>> > </wsdl:definitions>
>> >
>> >
>>
>>
> 
> 
http://www.nabble.com/file/p18879966/oa_PBA_PCP.wsdl oa_PBA_PCP.wsdl 
-- 
View this message in context: http://www.nabble.com/web-service-style-tp2195732p18879966.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message