note 89308 added to soapclient.soapcall

From: Date: Tue, 03 Mar 2009 11:17:19 +0000
Subject: note 89308 added to soapclient.soapcall
Groups: php.notes 
Request: Send a blank email to php-notes+get-151375@lists.php.net to get a copy of this message
One thing to note. This happened to me and it took a while until I discovered what the problem was. I was trying to get .NET objects from a provided web service, however it always seemed to return empty objects. It did return the backbone, but nothing within the objects that made up the structure. Anyhow, it seems that you have to be very precise with the arrays when calling these functions. Par example, do this: <?php $obj = $client->__soapCall($SOAPCall, array('parameters'=>$SoapCallParameters)); ?> meaning that you must put an array as the second argument with 'parameters' as the key and the soap call parameters as the value. Also make sure that the parameter variable, in my case $SoapCallParameters is in the form of what is requested by the webservice. So, don't just make an array of the form: <?php ( [0] => 'Mary', [1] => 1983 ) ?> but if the webservice requests a 'muid' variable as 'Mary' and a 'birthyear' as 1983, then make your array like this: <?php ( [muid] => 'Mary', [birthyear] => 1983 ) ?> The above arrays refer to the $SoapCallParameters variable. Hope this helps somebody, not having to spend too much time figuring out the problems. ---- Server IP: 83.137.20.135 Probable Submitter: 194.171.252.100 ---- Manual Page -- http://www.php.net/manual/en/soapclient.soapcall.php Edit -- https://master.php.net/note/edit/89308 Del: integrated -- https://master.php.net/note/delete/89308/integrated Del: useless -- https://master.php.net/note/delete/89308/useless Del: bad code -- https://master.php.net/note/delete/89308/bad+code Del: spam -- https://master.php.net/note/delete/89308/spam Del: non-english -- https://master.php.net/note/delete/89308/non-english Del: in docs -- https://master.php.net/note/delete/89308/in+docs Del: other reasons-- https://master.php.net/note/delete/89308 Reject -- https://master.php.net/note/reject/89308 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#151375) next »