note 97851 added to soapserver.soapserver
| From: | nilzor at gmail dot com | Date: | Wed, 12 May 2010 10:04:35 +0000 |
| Subject: | note 97851 added to soapserver.soapserver | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-169171@lists.php.net to get a copy of this message | ||
Calling a server from .NET:
If you intend to call a PHP SOAP server from a .NET Client, there are a couple of things to be aware
of. First of all, I've only got it working in WSDL mode. If anyone have made it work in
non-WSDL-mode, I'd be interested in hearing that. In WSDL-mode it works, but both input and
output-parameters are wrapped from .NET.
Basically, a function with this signature:
<?php
function SomeFunction($param1, $param2)
{
return $param1+$param2;
}
?>
Must be rewritten to this, without changing the WSDL:
<?php
function SomeFunction($data)
{
$valueArray = get_object_vars($data);
$param1 = $valueArray["param1"];
$param2 = $valueArray["param2"];
return Array("SomeFunctionResult" => $param1+$param2);
}
?>
For a more detailed walk-through, check my blog entry at http://posts.nilzorblog.com/phpnet
----
Server IP: 69.147.83.197
Probable Submitter: 85.165.2.33
----
Manual Page -- http://www.php.net/manual/en/soapserver.soapserver.php
Edit -- https://master.php.net/note/edit/97851
Del: integrated -- https://master.php.net/note/delete/97851/integrated
Del: useless -- https://master.php.net/note/delete/97851/useless
Del: bad code -- https://master.php.net/note/delete/97851/bad+code
Del: spam -- https://master.php.net/note/delete/97851/spam
Del: non-english -- https://master.php.net/note/delete/97851/non-english
Del: in docs -- https://master.php.net/note/delete/97851/in+docs
Del: other reasons-- https://master.php.net/note/delete/97851
Reject -- https://master.php.net/note/reject/97851
Search -- https://master.php.net/manage/user-notes.php