herbrubin Posted June 28, 2015 Share Posted June 28, 2015 I have a mostly working PHP Soap client program. Its fine when using strings to send parameters to the Soap Server. But when I send arrays of objects it acts like an empty array. Here's my request sent: <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:ActionWebService" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:ConfirmPendingTransfers><transfers xsi:type="SOAP-ENC:Array"/></ns1:ConfirmPendingTransfers></SOAP-ENV:Body></SOAP-ENV:Envelope> Notice the "transfers" array is empty. I've noticed other people run into this empty array problem. My code is this: $res = $client->ConfirmPendingTransfers($transfer_array); Where the contents of $transfer_array is: Telmate\TransferArray Object( [TransferArray:protected] => Array ( [0] => Telmate\Transfer Object ( [status:protected] => pending [reference_id:protected] => [source:protected] => Transfer [amount:protected] => -10 [telmate_transfer_id:protected] => 702817233 [resident_key:protected] => SMC1010-M1 [transfer_time:protected] => 2015-06-27T17:22:22-07:00 ) )) This method call requires a TransferArray object. I tried sending a simple array but it rejected it, as it should. Why does the Soap Client think my object is empty? Is this a bug in PHP? Any ideas on how to get past it? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.