Re: keep getting: "method '' not defined in service '"
| From: | (PHPDiscuss - PHP Newsgroups and mailing lists) | Date: | Fri, 30 Jan 2004 16:52:36 +0000 |
| Subject: | Re: keep getting: "method '' not defined in service '" | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-1331@lists.php.net to get a copy of this message | ||
BTW, what I did was:
1) download NuSOAP
2) put nusoap.php on my webserver
3) create server_example.php with the exact code for a basic server
example from the also with NuSOAP included readme.txt
4) open server_example.php with my browser
I figured I should not see this error. I als tried to add a client script,
client_example.php, again from the mentioned readme.txt:
<?php
require_once('nusoap.php');
$parameters = array('name'=>'coen');
$soapclient = new soapclient('http://coen2/nusoap/server_example.php');
echo $soapclient->call('hello',$parameters);
?>
My output is:
Array
Yes, only the word Array, apparently PHP tried to echo an Array. It
appeared to have 4 entries, all empty.
Phpdiscuss - Php Newsgroups And Mailing Lists wrote:
> Ik keep getting:
> method '' not defined in service ''
> even with the most basic sample script. Am I missing something here?
> For example this script:
> <?php
> require_once('nusoap.php');
> $s = new soap_server;
> $s->register('hello');
> function hello($name){
> // optionally catch an error and return a fault
> if($name == ''){
> return new soap_fault('Client','','Must supply a valid
> name.');
> }
> return "hello $name!";
> }
> $s->service($_POST);
> ?>