Re: [SOAP] Problem with PHP / SOAP

[email protected] ("Ross King")
Newsgroups php.soap
Message-ID <[email protected]>
I have the same issue with all Arrays.



"maverick69" <[email protected]> wrote in message 
news:[email protected]...
>
> 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.
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.