Two SOAP Issues
| From: | Christian Dickmann | Date: | Mon, 18 Mar 2002 14:50:32 +0000 |
| Subject: | Two SOAP Issues | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-5017@lists.php.net to get a copy of this message | ||
Hi,
after some nice talks about Microsofts .NET on Cebit,
i decided to test SOAP. I tried a really simple
example, but got 2 behaviors i didn't expect.
First of all my two scripts (Client and Server):
Server:
<?php
include("SOAP/Server.php");
function echoInteger()
{
return (int) 5;
};
$server = new SOAP_Server;
$server->service($HTTP_RAW_POST_DATA, TRUE);
?>
Client:
<?php
include("SOAP/Client.php");
$soapclient = new SOAP_Client("http://xxx/soap/server1.php");
$res = $soapclient->call("echoInteger");
echo $soapclient->response;
echo "<!-- ";
var_dump($res);
echo "-->";
?>
First unexpected behavior:
$res is not an Integer! Var_dump() outputs:
string(1) "5", but the Server XML Code seems
to be OK:
- <echoIntegerResponse>
<return xsi:type="xsd:int">5</return>
</echoIntegerResponse>
Second unexpected behavior:
It is possible to execute every Funktion on the
Server. I just tried phpinfo() and strlen(), but
it worked fine ...
If this es expected behavior just tell me :)
Christian Dickmann