i have some problems with the soap client and soap server.
server.php on server side
class Server {
public function hello($someone) {
return "Hello ". $someone;
}
}
$options= array('uri'=>'http://localhost/');
$server=new SoapServer(NULL, $options);
$server->setClass('Server');
$server->handle();
index.php on client side
<?php
$options = array('location' => 'http://localhost/server.php',
'uri' =>'http://localhost/');
$client = new SoapClient(NULL, $options);
echo $client->hello('Greg');
I'm testing this local on xampp and get the Error: What do i make wrong ? Can i test it localy or do i have to set up a server for this. If yes, is it possible to run this on IIS ?
Fatal error: Uncaught SoapFault exception: [HTTP] Not Found in C:\xampp\htdocs\SOAP\index.php:8 Stack trace: #0 [internal function]: SoapClient->__doRequest('http://localhos...', 'http://localhos...', 1, 0) #1 C:\xampp\htdocs\SOAP\index.php(8): SoapClient->__call('hello', Array) #2 C:\xampp\htdocs\SOAP\index.php(8): SoapClient->hello('Greg') #3 {main} thrown in C:\xampp\htdocs\SOAP\index.php on line 8