Dear pros,
I'm trying to get familiar with SOAPs.
I copied NuSoap to my site.
Then I made hello.php
<?php
require_once('nusoap.php');
$server = new soap_server;
$server->register('hello');
function hello ($name){
return "Hello $name.";
}
$server->service($HTTP_RAW_POST_DATA);
?>
but when I run it on browser at
http://www.kaamos.net/saippua/hello.php
It says
<?xml version="1.0" ?> - <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:si="">http://soapinterop.org/xsd">
- <SOAP-ENV:Body>
- <SOAP-ENV:Fault>
<faultcode>Server</faultcode> <faultactor>method '' not defined in service ''</faultactor> <faultstring /> <faultdetail /> </SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
- <!-- soap_server: entering parseRequest() on 23:12 2003-01-09
soap_server: method name: soap_server: method '' not found!
soap_server: parser debug: soap_parser: xml was empty, didn't parse!
soap_server: server sending...
-->
Have I understood something totally wrong?
I also made saippua_clnt.php in same folder
(http://www.kaamos.net/saippua/saippua_clnt.php)
<?php
require_once('nusoap.php');
$soapclient = new soapclient('http://www.kaamos.net/saippua/hello.php');
echo $soapclient->call('hello',array('name'=>'dietrich'));
?>
It shows nothing on browser.
Any idea?
Thanks a lot