Re: Associative Array with WSDL
| From: | Sören Fuhrmann | Date: | Mon, 21 Jul 2003 16:24:01 +0000 |
| Subject: | Re: Associative Array with WSDL | ||
| References: | 1 2 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-866@lists.php.net to get a copy of this message | ||
I've taken a look at the SOAP-response from my Server:
<dscs>
<item xsi:type="xsd:string">three</item>
<item xsi:type="xsd:string">eight</item>
</dscs>
Is it possible to remain the original keys by passing them as an attribute like "key"? e.g.:
<item key="8" xsi:type="xsd:string">eight</item>
Or is that simply not possible with SOAP?
Still any help appreciated :)
Sören fuhrmann schrieb:
I created some typedef in my Class, as shown in Shane's Presentation, an the WSDL-Output looks fine. But my problem remains: I can not use associative Arrays with integer values as indizes. e.g.: array(0 => 'three', 'five' => 'six', 8 => 'eight') The Output will be an object with a property 'five', and a property 'item' which contains the integer indexed values. Furthermore I noticed, that my Client creates a SOAP_Fault "XML not wellformed" when I'm trying to send characters like 'äá°' etc. in a string variable (the typedef is 'strtest' => 'string'). Any help would be highly appreciated. Sören fuhrmann schrieb:I'm trying to get an associative Array through SOAP using the 0.7.5 SOAP_WSDL Class. The server dispatch map for the used function simply contains 'out' => array('foolist'=>'object') The foolist object has an associative array, the indizes are integer values, but not enumerated. An array with indizes '1','5','6' looks like '0','1','2' after going through SOAP, and only the index '1' contains valid data. How can I properly use an associative Array? Do I have to specify the dispatch map more in detail (how)?