Hi Anne! Thanks for the information. However, the wsdl I posted in my earlier mail was something that axis generated for me (when I specified '?wsdl' in the browser), so that means the wsdl generated out for a doc/lit deployed service like this is faulty or am I missing something in my understanding. Please post your comments.
Thank you, Jayachandra On Wed, 17 Nov 2004 10:53:03 -0500, Anne Thomas Manes <[EMAIL PROTECTED]> wrote: > > > When defining a document/literal style service, your input message must > contain at most one body part. You cannot list each of your input elements > as separate parts in the input message definition. You must define a wrapper > element for your two input parameters and reference this one element in your > message part: > > <element name="double> > <complexType> > <sequence> > <element ref="tns1:in0"/> > <element ref="tns1:in1"/> > </sequence> > </complexType> > </element> > > <wsdl:message name="echoString_doubleRequest"> > <wsdl:part element="impl:double" name="input" /> > </wsdl:message> > > Note that you must not include the parameterOrder attribute in your > operation description when using document/literal. > > Also note that when using a document/literal style service the service > interface would need to look like this: > > in3 echoString(double) (where double is a bean containing in0 and in1) > > rather than like this: > > in3 echoString(in0, in1) > > If you prefer the second type of interface, then you must use either the > "rpc" style or the "wrapped" style. "rpc" style will generate an rpc/encoded > service. "wrapped" style will generate a doc/literal service that supports > an RPC style invocation interface. > > The "wrapped" style is a convention that requires you to give your input > message element the same name as the operation, and that element must be > defined as a complex type with a sequence group containing your input > parameters. A "wrapped" style wsdl for this service would look like this: > > <?xml version="1.0" encoding="UTF-8" ?> > <wsdl:definitions > targetNamespace="http://localhost:8080/axis/services/EchoTest" > xmlns:apachesoap="http://xml.apache.org/xml-soap" > xmlns:impl="http://localhost:8080/axis/services/EchoTest" > xmlns:intf="http://localhost:8080/axis/services/EchoTest" > xmlns:tns1="http://DefaultNamespace" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > <!-- > WSDL created by Apache Axis version: 1.2RC1 > Built on Oct 29, 2004 (05:51:30 IST) > > --> > <wsdl:types> > <schema elementFormDefault="qualified" > targetNamespace="http://DefaultNamespace" > xmlns="http://www.w3.org/2001/XMLSchema"> > <element name="in0" type="xsd:string" /> > <element name="in1" type="xsd:string" /> > <element name="in2" type="xsd:string" /> > </schema> > <schema elementFormDefault="qualified" > targetNamespace="http://localhost:8080/axis/services/EchoTest" > xmlns="http://www.w3.org/2001/XMLSchema"> > <import namespace=" http://DefaultNamespace"/> > > > <element name="echoStringReturn" type="xsd:string" /> > <element name="echoString_doubleReturn" type="xsd:string" /> > <element name="echoString_double> > <complexType> > <sequence> > <element ref="tns1:in0"/> > <element ref="tns1:in1"/> > </sequence> > </complexType> > </element> > </schema> > </wsdl:types> > <wsdl:message name="echoStringResponse"> > <wsdl:part element="impl:echoStringReturn" name="echoStringReturn" /> > </wsdl:message> > <wsdl:message name="echoString_doubleResponse"> > <wsdl:part element="impl:echoString_doubleReturn" > name="echoString_doubleReturn" /> > </wsdl:message> > <wsdl:message name="echoStringRequest"> > <wsdl:part element="tns1:in0" name="parameters" /> > > > </wsdl:message> > <wsdl:message name="echoString_doubleRequest"> > <wsdl:part element="impl:echoString_double" name="parameters" /> > </wsdl:message> > <wsdl:portType name="EchoTest"> > <wsdl:operation name="echoString"> > <wsdl:input message="impl:echoStringRequest" name="echoStringRequest" /> > <wsdl:output message="impl:echoStringResponse" name="echoStringResponse" > /> > </wsdl:operation> > <wsdl:operation name="echoString_double"> > <wsdl:input message="impl:echoString_doubleRequest" > name="echoString_doubleRequest" /> > <wsdl:output message="impl:echoString_doubleResponse" > name="echoString_doubleResponse" /> > </wsdl:operation> > </wsdl:portType> > <wsdl:binding name="EchoTestSoapBinding" type="impl:EchoTest"> > <wsdlsoap:binding style="document" > transport="http://schemas.xmlsoap.org/soap/http" /> > <wsdl:operation name="echoString"> > <wsdlsoap:operation soapAction="" /> > <wsdl:input name="echoStringRequest"> > <wsdlsoap:body use="literal" /> > </wsdl:input> > <wsdl:output name="echoStringResponse"> > <wsdlsoap:body use="literal" /> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="echoString_double"> > <wsdlsoap:operation soapAction="" /> > <wsdl:input name="echoString_doubleRequest"> > <wsdlsoap:body use="literal" /> > </wsdl:input> > <wsdl:output name="echoString_doubleResponse"> > <wsdlsoap:body use="literal" /> > </wsdl:output> > </wsdl:operation> > </wsdl:binding> > <wsdl:service name="EchoTestService"> > <wsdl:port binding="impl:EchoTestSoapBinding" name="EchoTest"> > <wsdlsoap:address location="http://localhost:8080/axis/services/EchoTest" > /> > </wsdl:port> > </wsdl:service> > </wsdl:definitions> > > -----Original Message----- > From: jayachandra [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 17, 2004 7:39 AM > To: [EMAIL PROTECTED] > Subject: Help needed in invoking a doc/lit web service. > > Hi all, > I've with me the following wsdl of a document literal style deployed > EchoTest web service. It has two basic methods echoString (this takes > one string parameter asn input and echoes it as is) and > echoString_double (this takes two strings as input parameters and > echoes their concatenated result as output). > If I were to invoke the echoString_double method of this service how > should the body of my soap message look like. Any help in this > direction will be appreciated a lot. > > wsdl of the deployed EchoTest service (obtained with the ?wsdl option > in the browser) > > <?xml version="1.0" encoding="UTF-8" ?> > <wsdl:definitions > targetNamespace="http://localhost:8080/axis/services/EchoTest" > xmlns:apachesoap="http://xml.apache.org/xml-soap" > xmlns:impl="http://localhost:8080/axis/services/EchoTest" > xmlns:intf="http://localhost:8080/axis/services/EchoTest" > xmlns:tns1="http://DefaultNamespace" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > <!-- > WSDL created by Apache Axis version: 1.2RC1 > Built on Oct 29, 2004 (05:51:30 IST) > > --> > <wsdl:types> > <schema elementFormDefault="qualified" > targetNamespace="http://DefaultNamespace" > xmlns="http://www.w3.org/2001/XMLSchema"> > <element name="in0" type="xsd:string" /> > <element name="in1" type="xsd:string" /> > <element name="in2" type="xsd:string" /> > </schema> > <schema elementFormDefault="qualified" > targetNamespace="http://localhost:8080/axis/services/EchoTest" > xmlns="http://www.w3.org/2001/XMLSchema"> > <element name="echoStringReturn" type="xsd:string" /> > <element name="echoString_doubleReturn" type="xsd:string" /> > </schema> > </wsdl:types> > <wsdl:message name="echoStringResponse"> > <wsdl:part element="impl:echoStringReturn" name="echoStringReturn" /> > </wsdl:message> > <wsdl:message name="echoString_doubleResponse"> > <wsdl:part element="impl:echoString_doubleReturn" > name="echoString_doubleReturn" /> > </wsdl:message> > <wsdl:message name="echoStringRequest"> > <wsdl:part element="tns1:in0" name="in0" /> > </wsdl:message> > <wsdl:message name="echoString_doubleRequest"> > <wsdl:part element="tns1:in1" name="in0" /> > <wsdl:part element="tns1:in2" name="in1" /> > </wsdl:message> > <wsdl:portType name="EchoTest"> > <wsdl:operation name="echoString" parameterOrder="in0"> > <wsdl:input message="impl:echoStringRequest" name="echoStringRequest" /> > <wsdl:output message="impl:echoStringResponse" name="echoStringResponse" > /> > </wsdl:operation> > <wsdl:operation name="echoString_double" parameterOrder="in0 in1"> > <wsdl:input message="impl:echoString_doubleRequest" > name="echoString_doubleRequest" /> > <wsdl:output message="impl:echoString_doubleResponse" > name="echoString_doubleResponse" /> > </wsdl:operation> > </wsdl:portType> > <wsdl:binding name="EchoTestSoapBinding" type="impl:EchoTest"> > <wsdlsoap:binding style="document" > transport="http://schemas.xmlsoap.org/soap/http" /> > <wsdl:operation name="echoString"> > <wsdlsoap:operation soapAction="" /> > <wsdl:input name="echoStringRequest"> > <wsdlsoap:body use="literal" /> > </wsdl:input> > <wsdl:output name="echoStringResponse"> > <wsdlsoap:body use="literal" /> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="echoString_double"> > <wsdlsoap:operation soapAction="" /> > <wsdl:input name="echoString_doubleRequest"> > <wsdlsoap:body use="literal" /> > </wsdl:input> > <wsdl:output name="echoString_doubleResponse"> > <wsdlsoap:body use="literal" /> > </wsdl:output> > </wsdl:operation> > </wsdl:binding> > <wsdl:service name="EchoTestService"> > <wsdl:port binding="impl:EchoTestSoapBinding" name="EchoTest"> > <wsdlsoap:address location="http://localhost:8080/axis/services/EchoTest" > /> > </wsdl:port> > </wsdl:service> > </wsdl:definitions> > > ---------end of wsdl----------- > > Thank you, > Jayachandra > -- > -- Jaya > > -- -- Jaya