Re: [SOAP] Multiple parameters input in WSDL
| From: | Richard Quadling | Date: | Sun, 10 Jul 2011 10:30:44 +0000 |
| Subject: | Re: [SOAP] Multiple parameters input in WSDL | ||
| References: | 1 2 3 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-3324@lists.php.net to get a copy of this message | ||
On 10 July 2011 10:21, Nitesh Apte <nitesh.apte@gmail.com> wrote:
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions name="com.ecmas" targetNamespace="urn:ecmasService"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/
>
> " xmlns:tns="urn:ecmasService"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema
>
> " xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/
>
> ">
> <wsdl:types>
> <xsd:schema
> xmlns:xsd="http://www..w3.org/2001/XMLSchema
>
> " targetNamespace="urn:ecmasService">
> <xsd:element name="userLogin">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="username"
> type="xsd:string"></xsd:element>
> <xsd:element name="password"
> type="xsd:string"></xsd:element>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="userLoginResponse">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="token"
> type="xsd:string"></xsd:element>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:schema>
> </wsdl:types>
> <wsdl:message name="userLoginRequest">
> <wsdl:part name="parameters"
> element="tns:userLogin"></wsdl:part>
> </wsdl:message>
> <wsdl:message name="userLoginResponse">
> <wsdl:part name="parameters"
> element="tns:userLoginResponse"></wsdl:part>
> </wsdl:message>
> <wsdl:portType name="ecmasServicePortType">
> <wsdl:operation name="userLogin">
> <wsdl:input
> message="tns:userLoginRequest"></wsdl:input>
> <wsdl:output
> message="tns:userLoginResponse"></wsdl:output>
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="ecmasServiceBinding"
> type="tns:ecmasServicePortType">
> <soap:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http
>
> " />
> <wsdl:operation name="userLogin">
> <soap:operation soapAction="urn:ecmasService#_userLogin"
> />
> <wsdl:input>
> <soap:body use="encoded"
> namespace="urn:ecmasService"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/
>
> " />
> </wsdl:input>
> <wsdl:output>
> <soap:body use="encoded"
> namespace="urn:ecmasService"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/
>
> " />
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="ecmasService">
> <wsdl:port name="ecmasServicePort"
> binding="tns:ecmasServiceBinding">
> <soap:address
> location="http://www.ecmas.com/wsdl/parser.ws
>
> " />
> </wsdl:port>
> </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=utf-8
SOAPAction: "urn:ecmasService#_userLogin"
Content-Length: 610
Request
-------
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:ecmasService"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:userLogin>
<parameters xsi:type="ns1:userLogin">
<username xsi:type="xsd:string">MyUsername</username>
<password xsi:type="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=15, max=99
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
Response
--------
Exception
---------
Not Found
--
Richard Quadling
Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea