i wrote this code to create the webservice (server.php)
<?php
require_once 'SOAP/Server.php';
// Your class
class HelloServer {
var $__dispatch_map = array();
function HelloServer() {
// Define the signature of the dispatch map
$this->__dispatch_map['sayHello'] =
array('in' => array('inputString' => 'string'),
'out' => array('outputString' => 'string'),
);
}
// Required function by SOAP_Server
function __dispatch($methodname) {
if (isset($this->__dispatch_map[$methodname]))
return $this->__dispatch_map[$methodname];
return NULL;
}
// Your function
function sayHello($inputString)
{
return 'Hello '.$inputString;
}
}
// Fire up PEAR::SOAP_Server
$server = new SOAP_Server;
// Fire up your class
$helloServer = new HelloServer();
// Add your object to SOAP server (note namespace)
$server->addObjectMap($helloServer,'urn:HelloServer');
// Handle SOAP requests coming is as POST data
if (isset($_SERVER['REQUEST_METHOD']) &&
$_SERVER['REQUEST_METHOD']=='POST') {
$server->service($HTTP_RAW_POST_DATA);
} else {
// Deal with WSDL / Disco here
require_once 'SOAP/Disco.php';
// Create the Disco server
$disco = new SOAP_DISCO_Server($server,'HelloServer');
header("Content-type: text/xml");
if (isset($_SERVER['QUERY_STRING']) &&
strcasecmp($_SERVER['QUERY_STRING'],'wsdl')==0) {
echo $disco->getWSDL(); // if we're talking http://www.example.com/index.php?wsdl
} else {
echo $disco->getDISCO();
}
exit;
}
?>
but instead it gives me this error as:
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Server.php on line 134
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Server.php on line 359
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Server.php on line 360
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Server.php on line 372
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Server.php on line 382
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Server.php on line 507
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Server.php on line 508
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Server.php on line 793
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Server.php on line 806
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Base.php on line 201
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Base.php on line 522
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Base.php on line 627
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Base.php on line 628
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Base.php on line 743
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Base.php on line 882
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Base.php on line 1052
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Base.php on line 1081
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Base.php on line 1112
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Base.php on line 1159
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Base.php on line 1203
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\PEAR.php on line 563
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\PEAR.php on line 566
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Parser.php on line 212
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Parser.php on line 213
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Parser.php on line 214
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Parser.php on line 219
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Parser.php on line 220
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Parser.php on line 221
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Parser.php on line 275
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Parser.php on line 322
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Parser.php on line 343
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Parser.php on line 350
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Parser.php on line 415
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Value.php on line 90
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\Value.php on line 93
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\WSDL.php on line 217
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\WSDL.php on line 238
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\WSDL.php on line 792
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\WSDL.php on line 1070
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\WSDL.php on line 1153
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\WSDL.php on line 1195
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\WSDL.php on line 1243
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\WSDL.php on line 1257
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\WSDL.php on line 1271
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\WSDL.php on line 1306
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\WSDL.php on line 1351
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\WSDL.php on line 1354
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\WSDL.php on line 1379
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\WSDL.php on line 1381
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\WSDL.php on line 1420
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\WSDL.php on line 1631
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\WSDL.php on line 1679
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\WSDL.php on line 1734
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\SOAP\WSDL.php on line 1753
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\HTTP\Request.php on line 341
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\HTTP\Request.php on line 659
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\HTTP\Request.php on line 672
Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\HTTP\Request.php on line 717
Strict Standards: Redefining already defined constructor for class Net_URL in C:\xampp\php\PEAR\Net\URL.php on line 122
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\php\PEAR\SOAP\Server.php:134) in C:\xampp\eclipse\workspace\PhpPrograms\server.php on line 49
is there any configuration to do with PEAR please do let me know