Re: [SOAP] Empty Array's vs. Null?

From: Date: Sat, 24 May 2003 15:59:36 +0000
Subject: Re: [SOAP] Empty Array's vs. Null?
References: 1  Groups: php.soap 
Request: Send a blank email to php-soap+get-660@lists.php.net to get a copy of this message
Rob Booth wrote:
I have another issue that's been bugging me for awhile. And maybe this is just because of the way that I'm doing things, but it seems to me that I can't send back an empty array. I can only send back a null. Is this something I'm doing wrong? Have people been able to send an array with 0 elements and have the header written correctly? Rob
You mean something like this? <ns4:echoIntegerArray> <inputIntegerArray xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:int[0]"/> </ns4:echoIntegerArray> You need to do: $a =& new SOAP_Value('inputIntegerArray','Array',NULL); $a->arrayType='{http://www.w3.org/2001/XMLSchema}int'; Array Type has to be set if no WSDL is being used, otherwise the library has no way to identify what kind of array it is. Shane

« previous php.soap (#660) next »