the wsdl you were using was
not well-formed and
supported rpc instead of document-literal style
here is a corrected version
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns:typens="urn:Company" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"
name="Company" targetNamespace="urn:Company">
<message name="call">
<part name="sessionId" type="xsd:string"/>
<part name="resourcePath" type="xsd:string"/>
<part name="args" type="xsd:anyType"/>
</message>
<message name="callResponse">
<part name="callReturn" type="xsd:anyType"/>
</message>
<message name="login">
<part name="username" type="xsd:string"/>
<part name="apiKey" type="xsd:string"/>
</message>
<message name="loginResponse">
<part name="loginReturn" type="xsd:string"/>
</message>
<portType name="Comp_Api_Model_Server_HandlerPortType">
<operation name="call">
<documentation>Call api functionality</documentation>
<input message="typens:call"/>
<output message="typens:callResponse"/>
</operation>
<operation name="login">
<documentation>Login user and retrive session id</documentation>
<input message="typens:login"/>
<output message="typens:loginResponse"/>
</operation>
</portType>
<binding name="Comp_Api_Model_Server_HandlerBinding"
type="typens:Comp_Api_Model_Server_HandlerPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
<!-- I have no idea what this is used for -->
<!-- soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/<http://schemas.xmlsoap.org/soap/http%22/
-->
<operation name="call">
<soap:operation soapAction="urn:Comp_Api_Model_Server_HandlerAction"/>
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://types.echo.services" use="literal"/>
<!-- I have no idea what this used for -->
<!-- soap:body namespace="urn:Company" use="encoded" encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/"/<http://schemas.xmlsoap.org/soap/encoding/%22/>>
-->
</input>
<output>
<soap:body namespace="urn:Company" use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
<!--no idea what this used for -->
<!-- soap:body namespace="urn:Company" use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/<http://schemas.xmlsoap.org/soap/encoding/%22/>>
-->
</output>
</operation>
<operation name="login">
<soap:operation soapAction="urn:Comp_Api_Model_Server_HandlerAction"/>
<input>
<soap:body namespace="urn:Company"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="literal"/>
<!-- i have no idea what this is used for -->
<!-- soap:body namespace="urn:Company" use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/<http://schemas.xmlsoap.org/soap/encoding/%22/>>
-->
</input>
<output>
<soap:body namespace="urn:Company"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="literal"/>
<!-- I have no idea what this is used for -->
</output>
</operation>
</binding>
<service name="CompanyService">
<port name="Comp_Api_Model_Server_HandlerPort"
binding="typens:Comp_Api_Model_Server_HandlerBinding">
<soap:address
location="http://localhost/Company/index.php/api/index/index/" />
</port>
</service>
</definitions>
HTH
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business
of Sender. This transmission is of a confidential nature and Sender does not
endorse distribution to any party other than intended recipient. Sender does
not necessarily endorse content contained within this transmission.
> Date: Thu, 9 Oct 2008 16:53:39 -0700
> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: Re: Altering WSDL to match the expected SOAP
>
>
> Hi, the standard practice for a web service client is to obtain the WSDL from
> the service provider and generate the stub from it. Editing the WSDL on the
> client side is problematic and causes errors.
>
>
>
> thusa gihan wrote:
> >
> > Hi all,
> >
> > I'm writing a client with Axis 1.4 to a web service, but the generated
> > SOAP
> > request is not matching with the one expected by the web service.
> >
> > Could you please help me to edit the WSDL file (saved into my local disk
> > from the server) so that I can generate the stubs to build the expected
> > SOAP
> > requests. I have posted the WSDL, currently generated SOAP request and the
> > expected SOAP request below.
> >
> > If WSDL editing is not the way to get this done, please suggest me some
> > other way. I'm really stuck here.
> >
> > Thanks in advance.
> >
> > Thusa.
> >
> >
> >
> > This is the avaialble WSDL file.
> > --------------------------------------------------------------
> > <?xml version="1.0" encoding="UTF-8"?>
> > <definitions xmlns:typens="urn:Company" xmlns:xsd="
> > http://www.w3.org/2001/XMLSchema" xmlns:soap="
> > http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="
> > http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="
> > http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"
> > name="Company" targetNamespace="urn:Company">
> > <message name="call">
> > <part name="sessionId" type="xsd:string"/>
> > <part name="resourcePath" type="xsd:string"/>
> > <part name="args" type="xsd:anyType"/>
> > </message>
> > <message name="callResponse">
> > <part name="callReturn" type="xsd:anyType"/>
> > </message>
> > <message name="login">
> > <part name="username" type="xsd:string"/>
> > <part name="apiKey" type="xsd:string"/>
> > </message>
> > <message name="loginResponse">
> > <part name="loginReturn" type="xsd:string"/>
> > </message>
> >
> > <portType name="Comp_Api_Model_Server_HandlerPortType">
> > <operation name="call">
> > <documentation>Call api functionality</documentation>
> > <input message="typens:call"/>
> > <output message="typens:callResponse"/>
> > </operation>
> > <operation name="login">
> > <documentation>Login user and retrive session id</documentation>
> > <input message="typens:login"/>
> > <output message="typens:loginResponse"/>
> > </operation>
> > </portType>
> >
> > <binding name="Comp_Api_Model_Server_HandlerBinding"
> > type="typens:Comp_Api_Model_Server_HandlerPortType">
> > <soap:binding style="rpc" transport="
> > http://schemas.xmlsoap.org/soap/http"/<http://schemas.xmlsoap.org/soap/http%22/>
> >>
> > <operation name="call">
> > <soap:operation
> > soapAction="urn:Comp_Api_Model_Server_HandlerAction"/>
> > <input>
> > <soap:body namespace="urn:Company" use="encoded" encodingStyle="
> > http://schemas.xmlsoap.org/soap/encoding/"/<http://schemas.xmlsoap.org/soap/encoding/%22/>
> >>
> > </input>
> > <output>
> > <soap:body namespace="urn:Company" use="encoded" encodingStyle="
> > http://schemas.xmlsoap.org/soap/encoding/"/<http://schemas.xmlsoap.org/soap/encoding/%22/>
> >>
> > </output>
> > </operation>
> > <operation name="login">
> > <soap:operation
> > soapAction="urn:Comp_Api_Model_Server_HandlerAction"/>
> > <input>
> > <soap:body namespace="urn:Company" use="encoded" encodingStyle="
> > http://schemas.xmlsoap.org/soap/encoding/"/<http://schemas.xmlsoap.org/soap/encoding/%22/>
> >>
> > </input>
> > <output>
> > <soap:body namespace="urn:Company" use="encoded" encodingStyle="
> > http://schemas.xmlsoap.org/soap/encoding/"/<http://schemas.xmlsoap.org/soap/encoding/%22/>
> >>
> > </output>
> > </operation>
> > </binding>
> > <service name="CompanyService">
> > <port name="Comp_Api_Model_Server_HandlerPort"
> > binding="typens:Comp_Api_Model_Server_HandlerBinding">
> > <soap:address location="
> > http://localhost/Company/index.php/api/index/index/"/<http://localhost/Company/index.php/api/index/index/%22/>
> >>
> > </port>
> > </service>
> > </definitions>
> > --------------------------------------------------------------
> >
> > Currently generated SOAP request is as follows.
> > --------------------------------------------------------------
> > <?xml version="1.0" encoding="UTF-8"?>
> > <soapenv:Envelope xmlns:soapenv="
> > http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="
> > http://www.w3.org/2001/XMLSchema" xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance">
> > <soapenv:Body>
> > <ns1:call soapenv:encodingStyle="
> > http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:Company">
> > <sessionId
> > xsi:type="xsd:string">1vp029hcubiiven8cr1s21nke2</sessionId>
> > <resourcePath
> > xsi:type="xsd:string">customer.create</resourcePath>
> > <args soapenc:arrayType="xsd:anyType[1]"
> > xsi:type="soapenc:Array" xmlns:soapenc="
> > http://schemas.xmlsoap.org/soap/encoding/">
> > <args href="#id0"/>
> > </args>
> > </ns1:call>
> > <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="
> > http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:Map"
> > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="
> > http://xml.apache.org/xml-soap">
> > <item>
> > <key xsi:type="soapenc:string">email</key>
> > <value xsi:type="soapenc:string">[EMAIL PROTECTED]</value>
> > </item>
> > <item>
> > <key xsi:type="soapenc:string">lastname</key>
> > <value xsi:type="soapenc:string">myLastName</value>
> > </item>
> > <item>
> > <key xsi:type="soapenc:string">firstname</key>
> > <value xsi:type="soapenc:string">MyFirstName</value>
> > </item>
> > </multiRef>
> > </soapenv:Body>
> > </soapenv:Envelope>
> > --------------------------------------------------------------
> >
> > But the server expects a SOAP request as follows. ( I found this SOAP
> > request from one of their sample clients done with PHP).
> > --------------------------------------------------------------
> > <?xml version="1.0" encoding="UTF-8"?>
> > <SOAP-ENV:Envelope xmlns:SOAP-ENV="
> > http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:Company"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="
> > http://xml.apache.org/xml-soap" xmlns:SOAP-ENC="
> > http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="
> > http://schemas.xmlsoap.org/soap/encoding/">
> > <SOAP-ENV:Body>
> > <ns1:call>
> > <sessionId
> > xsi:type="xsd:string">mj3kj5rr2df0b1fq5kmputmr54</sessionId>
> > <resourcePath
> > xsi:type="xsd:string">customer.create</resourcePath>
> > <args SOAP-ENC:arrayType="ns2:Map[1]"
> > xsi:type="SOAP-ENC:Array">
> > <item xsi:type="ns2:Map">
> > <item>
> > <key xsi:type="xsd:string">firstname</key>
> > <value xsi:type="xsd:string">myFirstName</value>
> > </item>
> > <item>
> > <key xsi:type="xsd:string">lastname</key>
> > <value xsi:type="xsd:string">myLastName</value>
> > </item>
> > <item>
> > <key xsi:type="xsd:string">email</key>
> > <value xsi:type="xsd:string">[EMAIL PROTECTED]
> > </value>
> > </item>
> > </item>
> > </args>
> > </ns1:call>
> > </SOAP-ENV:Body>
> > </SOAP-ENV:Envelope>
> > --------------------------------------------------------------
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Altering-WSDL-to-match-the-expected-SOAP-tp19893021p19909571.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]
>
_________________________________________________________________
Get more out of the Web. Learn 10 hidden secrets of Windows Live.
http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008