Simple SOAP Error ...
Always error:
Nobelium?
Fatal error:uncaught SoapFault exception: [Client] looks like we got no XML document in E:\xampp\htdocs\photowall\registe Raction.php:22 Stack Trace: #0 E:\xampp\htdocs\photowall\registeraction.php: Soapclient->__call (' Test ', Array ) #1 E:\xampp\htdocs\photowall\registeraction.php: Soapclient->test () #2 {main} thrown in E:\xampp\htdocs\ photowall\registeraction.php on line 22
The above that garbled a bit strange .... Because it happens when I don't export anything ....
Do not know is God horse meaning ....
Ask you what the big God is wrong ...
Here's the code:
A class, in usrhelper.php:
Class Usrhelper
{
Public Function test ()
{
Return "This is a test";
}
}
?>
Server.php is:
Require_once ' usrhelper.php ';
Array (' uri ' = ' = ' usr_service '));
$server->setclass (' Usrhelper ');
$server->handle ();
?>
When invoking the service:
$client = new SoapClient (NULL, Array (
' Location ' = ' http://127.0.0.1/photowall/server.php ',
' uri ' = ' usr_service ',
' Trace ' = 1));
$client->addusr ($username, $password);
$ans = $client Test ();
Echo $ans;
------Solution--------------------
Don't you have a WSDL or asmx file? The error seems to be that you can provide a file in XML format
------Solution--------------------
After testing, the code you posted doesn't have any problems. Can get results This is a test
Observe the error message you posted (this is not garbled), and the error appears in the code that is related to line 22nd of registeraction.php,
And the code you put out is much less.