Hi all,
       I want to generate wsdl2java for Document literal web services for
Axis, java.
I am using this command to generate wsdl 2 java :
-o . -d Session -s -S true  -Nurn:TestSearchEngine
webservices.wsdoclittest.wstemp 
src/webservices/wsdoclittest/wstemp/TestServices.wsdl

But i got Exception :

java.io.IOException: Type {urn:TestSearchEngine}searchTestResponse is
referenced but not defined.
        at
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:665)
        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:595)

Please see the WSDL :

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:TestSearchEngine"
        xmlns="http://schemas.xmlsoap.org/wsdl/";
        xmlns:tns="urn:TestSearchEngine"
        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>
                <xsd:schema targetNamespace="urn:TestSearchEngine"
                        elementFormDefault="unqualified">

                        <xsd:element name="searchTest">
                                <xsd:complexType>
                                        <xsd:sequence>
                                                <xsd:element name="arg1" 
type="xsd:int" />
                                                <xsd:element name="arg2" 
type="xsd:int" />
                                        </xsd:sequence>
                                </xsd:complexType>
                        </xsd:element>


                        <xsd:element name="searchTestResponse">
                                <xsd:complexType>
                                        <xsd:sequence>
                                                <xsd:element name="addResult" 
type="xsd:int" />
                                        </xsd:sequence>
                                </xsd:complexType>
                        </xsd:element>
                </xsd:schema>
        </wsdl:types>

        <wsdl:message name="searchTestRequest">
                <wsdl:part name="parameters" element="tns:searchTest" />
        </wsdl:message>

        <wsdl:message name="searchTestResponse">
                <wsdl:part name="parameters" type="tns:searchTestResponse" />
        </wsdl:message>

        <wsdl:portType name="TestSearchEngineInterface">
                <wsdl:operation name="searchTest">
                        <wsdl:input message="tns:searchTestRequest"
                                name="searchTestRequest" />
                        <wsdl:output message="tns:searchTestResponse"
                                name="searchTestResponse" />
                </wsdl:operation>
        </wsdl:portType>

        <wsdl:binding name="wsTestsearchdetailsSoapBinding"
                type="tns:TestSearchEngineInterface">
                <wsdlsoap:binding style="document"
                        transport="http://schemas.xmlsoap.org/soap/http"; />
                <wsdl:operation name="searchTest">
                        <wsdlsoap:operation soapAction="" />
                        <wsdl:input name="searchTestRequest">
                                <wsdlsoap:body use="literal" />
                        </wsdl:input>
                        <wsdl:output name="searchTestResponse">
                                <wsdlsoap:body use="literal" />
                        </wsdl:output>
                </wsdl:operation>
        </wsdl:binding>

        <wsdl:service name="TestSearchEngineInterfaceService">
                <wsdl:port binding="tns:wsTestsearchdetailsSoapBinding"
                        name="wsTestsearchdetails">
                        <wsdlsoap:address
                                
location="http://localhost:8080/axis/services/wsTestsearchdetails"; />
                </wsdl:port>
        </wsdl:service>
</wsdl:definitions>


Please advice on the issues.

Thanx Regards
Santosh



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 <[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-----
>> *From:* Anne Thomas Manes [mailto:[EMAIL PROTECTED]
>> *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 <[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<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>
>> >
>> >
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/web-service-style-tp2195732p16380638.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to