Re: [SOAP] SOAP "long" Question
| From: | Shane Caraveo | Date: | Tue, 25 Mar 2003 20:48:51 +0000 |
| Subject: | Re: [SOAP] SOAP "long" Question | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-508@lists.php.net to get a copy of this message | ||
Paul Miller wrote:
Hi all, I used this... $assetTypes[] = new SOAP_Value('','long',44); $assetTypes[] = new SOAP_Value('','long',58); to create this... <AssetTypeIdArray xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:long[2]" SOAP-ENC:offset="[0]"> <item xsi:type="xsd:long">44</item> <item xsi:type="xsd:long">58</item> </AssetTypeIdArray> Would that be considered the same as this... <AssetTypeIdArray xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:long[2]"> <xsd:long xsi:type="xsd:long">44</xsd:long> <xsd:long xsi:type="xsd:long">58</xsd:long> </AssetTypeIdArray> according to the WC3 spec? If not, does anyone know how to create the second XML snippet using the PHP SOAP functions? Thanks,w3c spec does not define what the name of an element in an array must be, so it is up to the implementation. Most implementations use 'item', but it looks like you're using one that doesn't. PEAR::SOAP wont care when it recieves something like that, it will still do the right thing, but when you send to another implementation it could make a difference. So you could try: $assetTypes[] = new SOAP_Value('{http://xsd-namespace-url-here}long','long',44); Shane