note 92828 added to soapclient.soapcall
| From: | jarrod at squarecrow dot com | Date: | Tue, 11 Aug 2009 02:37:48 +0000 |
| Subject: | note 92828 added to soapclient.soapcall | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-159306@lists.php.net to get a copy of this message | ||
When dealing with .NET web services, its a good to remember that moving data back and forth between
PHP and .NET can be a little cumbersome if you aren't familiar with the object structures of
both.
.NET will return everything inside of an object - usually your function name with "Result"
tagged onto the end.
Example.
<?
$client = new soapclient(SOAP_ADDRESS);
$objectresult = $client->GetDataByID(array('PeopleVendorsID'=> 'N21248'));
?>
.... where GetDataByID is my .NET web service function, PeopleVendorsID is name of the parameter I
pass it, and "N21248" happens to be the value of the parameter.
.NET was supposed to return an array to $objectresult but instead I found myself with a
triple-nested object.
Basically, if you ever find yourself in a situation where you can't seem to access your data,
make use of var_dump.
<?php
var_dump($objectresult);
?>
This will print out a very handy array/object structure for you to sift through - invaluable if
you're dealing with cryptic results from .NET.
----
Server IP: 209.41.74.194
Probable Submitter: 98.215.60.105
----
Manual Page -- http://www.php.net/manual/en/soapclient.soapcall.php
Edit -- https://master.php.net/note/edit/92828
Del: integrated -- https://master.php.net/note/delete/92828/integrated
Del: useless -- https://master.php.net/note/delete/92828/useless
Del: bad code -- https://master.php.net/note/delete/92828/bad+code
Del: spam -- https://master.php.net/note/delete/92828/spam
Del: non-english -- https://master.php.net/note/delete/92828/non-english
Del: in docs -- https://master.php.net/note/delete/92828/in+docs
Del: other reasons-- https://master.php.net/note/delete/92828
Reject -- https://master.php.net/note/reject/92828
Search -- https://master.php.net/manage/user-notes.php