[SOAP] Problem with PHP / SOAP
| From: | maverick69 | Date: | Thu, 08 May 2008 20:38:46 +0000 |
| Subject: | [SOAP] Problem with PHP / SOAP | ||
| Groups: | php.soap | ||
| Request: | Send a blank email to php-soap+get-2793@lists.php.net to get a copy of this message | ||
I want to sent a special Request to a SOAP-Webservice - here is a part of how
the XML-Request-String should read, so the SOAP-Server can deserialize it:
...
...
<brandNo xsi:type="ns3:StringList">
<empty xsi:type="soapenc:boolean">true</empty>
<array soapenc:arrayType="soapenc:string[2]" xsi:type="soapenc:Array">
<array xsi:type="soapenc:string">206</array>
<array xsi:type="soapenc:string">203</array>
</array>
</brandNo>
....
...
but all I can PHP/SOAP get is the follwoing XML-Request-String.
...
...
<brandNo xsi:type="ns3:StringList">
<empty xsi:type="soapenc:boolean">true</empty>
<array SOAP-ENC:arrayType="soapenc:string[1]" xsi:type="soapenc:Array">
<item xsi:type="soapenc:string">56</item>
<item xsi:type="soapenc:string">207</item>
</array>
</brandNo>
...
...
As you can see the problem is, that the String generated from PHP/SOAP opens
each Array-Item with a item-Tag, but the server needs an tag called array.
This is my source so far to create the request, probably you can give me a
hint what I should do ($soap is an instance of a class I wrote):
[code]
$content[0] = new SoapVar("56", XSD_STRING, "soapenc:string");
$array["array"] = new SoapVar($content, SOAP_ENC_ARRAY, "soapenc:Array");
$array["empty"] = new SoapVar("false", XSD_BOOLEAN,
"soapenc:boolean");
$brands = new SoapVar($array, SOAP_ENC_OBJECT, "ns3:StringList");
$soap->request = "";
$soap->request["in0"]["provider"] = 120;
$soap->request["in0"]["brandNo"] = $brands;
$soap->request["in0"]["country"] = "DE";
$soap->callWebService("getArticleIds2StringList");
$soap->dumpXMLRequest();
[/code]
--
View this message in context: http://www.nabble.com/Problem-with-PHP---SOAP-tp17135910p17135910.html
Sent from the Php - Soap mailing list archive at Nabble.com.