Hi All,
I'm just getting into using NuSoap and am having an issue with soap errors.
I've set up a soap server, and I have a simple function call that returns a string. I'm trying out the soap error stuff, and can't seem to pass errors from the soap server to the client.
Below is the code I'm using:
$NAMESPACE = 'http://localhost/soap.php';
$soap_server = new soap_server();
$soap_server->configureWSDL('awmsoap', $NAMESPACE, 'http://localhost/soap.php');
$soap_server->register(
'getVersion',
array(),
array('return'=>'xsd:string'),
$NAMESPACE
);
function getVersion() {
GLOBAL $soap_server;
//DebugBreak();
$soap_server->setError("Error test");
return 'test';
} |
Calling the function via the soap client just returns the string 'test', not the soap error.
If I use $soap_server->wsdl->setError("Error test") then I get a serializing error.
Any light that can be shown on this would be appreciated. I'm basically wanting to throw a soap error if a user isn't authenticated, but I can't even get this simple test working!
Cameron