Re: [SOAP] Multiple parameters input in WSDL

[email protected] (Richard Quadling) Sun, 10 Jul 2011 11:30:44 +0100
Newsgroups php.soap
Message-ID <CAKUjMCXq9fj-T_d5UhusdmwhRuBO8o2350rutzpS5VaU7vy+9A@mail.gmail.com>
On 10 July 2011 10:21, Nitesh Apte <[email protected]> wrote:
> <?xml version=3D"1.0" encoding=3D"UTF-8"?>
> <wsdl:definitions name=3D"com.ecmas" targetNamespace=3D"urn:ecmasService"
> xmlns:wsdl=3D"http://schemas.xmlsoap.org/wsdl/
>
> " xmlns:tns=3D"urn:ecmasService" xmlns:xsd=3D"http://www.w3.org/2001/XMLS=
chema
>
> " xmlns:soap=3D"http://schemas.xmlsoap.org/wsdl/soap/
>
> ">
> =C2=A0=C2=A0=C2=A0 <wsdl:types>
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 <xsd:schema xmlns:xsd=3D"http://www=
.w3.org/2001/XMLSchema
>
> " targetNamespace=3D"urn:ecmasService">
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 <xsd:element nam=
e=3D"userLogin">
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=
=A0 <xsd:complexType>
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=
=A0 =C2=A0=C2=A0=C2=A0 <xsd:sequence>
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=
=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 <xsd:element name=3D"username"
> type=3D"xsd:string"></xsd:element>
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=
=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 <xsd:element name=3D"password"
> type=3D"xsd:string"></xsd:element>
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=
=A0 =C2=A0=C2=A0=C2=A0 </xsd:sequence>
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=
=A0 </xsd:complexType>
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 </xsd:element>
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 <xsd:element nam=
e=3D"userLoginResponse">
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=
=A0 <xsd:complexType>
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=
=A0 =C2=A0=C2=A0=C2=A0 <xsd:sequence>
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=
=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 <xsd:element name=3D"token"
> type=3D"xsd:string"></xsd:element>
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=
=A0 =C2=A0=C2=A0=C2=A0 </xsd:sequence>
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=
=A0 </xsd:complexType>
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 </xsd:element>
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 </xsd:schema>
> =C2=A0=C2=A0=C2=A0 </wsdl:types>
> =C2=A0=C2=A0=C2=A0 <wsdl:message name=3D"userLoginRequest">
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 <wsdl:part name=3D"parameters" elem=
ent=3D"tns:userLogin"></wsdl:part>
> =C2=A0=C2=A0=C2=A0 </wsdl:message>
> =C2=A0=C2=A0=C2=A0 <wsdl:message name=3D"userLoginResponse">
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 <wsdl:part name=3D"parameters"
> element=3D"tns:userLoginResponse"></wsdl:part>
> =C2=A0=C2=A0=C2=A0 </wsdl:message>
> =C2=A0=C2=A0=C2=A0 <wsdl:portType name=3D"ecmasServicePortType">
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 <wsdl:operation name=3D"userLogin">
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 <wsdl:input mess=
age=3D"tns:userLoginRequest"></wsdl:input>
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 <wsdl:output mes=
sage=3D"tns:userLoginResponse"></wsdl:output>
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 </wsdl:operation>
> =C2=A0=C2=A0=C2=A0 </wsdl:portType>
> =C2=A0=C2=A0=C2=A0 <wsdl:binding name=3D"ecmasServiceBinding"
> type=3D"tns:ecmasServicePortType">
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 <soap:binding style=3D"rpc"
> transport=3D"http://schemas.xmlsoap.org/soap/http
>
> " />
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 <wsdl:operation name=3D"userLogin">
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 <soap:operation =
soapAction=3D"urn:ecmasService#_userLogin" />
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 <wsdl:input>
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=
=A0 <soap:body use=3D"encoded" namespace=3D"urn:ecmasService"
> encodingStyle=3D"http://schemas.xmlsoap.org/soap/encoding/
>
> " />
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 </wsdl:input>
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 <wsdl:output>
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=
=A0 <soap:body use=3D"encoded" namespace=3D"urn:ecmasService"
> encodingStyle=3D"http://schemas.xmlsoap.org/soap/encoding/
>
> " />
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 </wsdl:output>
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 </wsdl:operation>
> =C2=A0=C2=A0=C2=A0 </wsdl:binding>
> =C2=A0=C2=A0=C2=A0 <wsdl:service name=3D"ecmasService">
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 <wsdl:port name=3D"ecmasServicePort=
"
> binding=3D"tns:ecmasServiceBinding">
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 <soap:address lo=
cation=3D"http://www.ecmas.com/wsdl/parser.ws
>
> " />
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 </wsdl:port>
> =C2=A0=C2=A0=C2=A0 </wsdl:service>
> </wsdl:definitions>

Firstly, change [space]" to " in the URLs.

Then use http://pastebin.com/3xbBp6fj as your base class for
http://pastebin.com/f25VuUNV

You'll need to edit the url of the wsdl as that seems to not be right.

The output I get is ...

Request Headers
---------------
POST /wsdl/parser.ws HTTP/1.1
Host: www.ecmas.com
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.3.6
Content-Type: text/xml; charset=3Dutf-8
SOAPAction: "urn:ecmasService#_userLogin"
Content-Length: 610


Request
-------
<?xml version=3D"1.0" encoding=3D"utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV=3D"http://schemas.xmlsoap.org/soap/envelo=
pe/"
                   xmlns:ns1=3D"urn:ecmasService"
                   xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema"
                   xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:SOAP-ENC=3D"http://schemas.xmlsoap.org/soap/encodi=
ng/"

SOAP-ENV:encodingStyle=3D"http://schemas.xmlsoap.org/soap/encoding/">
  <SOAP-ENV:Body>
    <ns1:userLogin>
      <parameters xsi:type=3D"ns1:userLogin">
        <username xsi:type=3D"xsd:string">MyUsername</username>
        <password xsi:type=3D"xsd:string">MyPassword</password>
      </parameters>
    </ns1:userLogin>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Response Headers
----------------
HTTP/1.1 404 Not Found
Date: Sun, 10 Jul 2011 10:28:16 GMT
Server: Apache
Keep-Alive: timeout=3D15, max=3D99
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html

Response
--------



Exception
---------
Not Found

--=20
Richard Quadling
Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea