RE: [SOAP] SOAP "long" Question
| From: | Paul Miller | Date: | Wed, 26 Mar 2003 21:50:58 +0000 |
| Subject: | RE: [SOAP] SOAP "long" Question | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-509@lists.php.net to get a copy of this message | ||
Shane (& all),
That worked. It was an implementation issue. The guy who developed it
said, we have not seen the use 'item' in the three other system's they
tested against.
Does anyone know how to read an attribute for a given element...
<Asset ID="13221" TYPEID="1" AVAILABILITY="Offline"
DATE="08/10/2002 03:40
PM">
<metadata>
<To>"Harry Ford" <HarryFord@Merck.com></To>
<From>"Ivan Lentini" <IvanLentini@Company.mil></From>
</metadata>
</Asset>
I need to get the ID, TYPEID, etc. Would this be a SOAP function, an XML
function or just a PHP interpretation issue?
Thanks,
Paul
-----Original Message-----
From: Shane Caraveo [mailto:shane@caraveo.com]
Sent: Tuesday, March 25, 2003 2:49 PM
To: Paul Miller
Cc: soap@lists.php.net
Subject: Re: [SOAP] SOAP "long" Question
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