Re: Problem with PHP / SOAP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have the same issue with all Arrays.



"maverick69" <contact@intermediaware.com> wrote in message 
17135910.post@talk.nabble.com">news:17135910.post@talk.nabble.com...
>
> 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.
> 



-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux