addclass.php
<?php
class addclass{
public function add($x,$y){
return $x+$y;
}
}
server.php
<?php
require "addclass.php";
$soap = new SoapServer('test.wsdl');
$soap->setClass("addclass");
$soap->handle();
?>
client.php
<?php
try{
$client = new SoapClient("test.wsdl");
echo $client->add(7,8);
//echo $client->__soapCall("add", array(7, 8));
}catch (SoapFault $e){
echo $e;
}
?>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
wsdl:types
xsd:complexType
xsd:sequence
/xsd:sequence
/xsd:complexType
/xsd:element
xsd:complexType
xsd:sequence
/xsd:sequence
/xsd:complexType
/xsd:element
/xsd:schema
/wsdl:types
/wsdl:part
/wsdl:message
/wsdl:message
/wsdl:operation
/wsdl:portType
transport="http://schemas.xmlsoap.org/soap/http" />
wsdl:input
/wsdl:input
wsdl:output
/wsdl:output
/wsdl:operation
/wsdl:binding
/wsdl:port
/wsdl:service
/wsdl:definitions