<? xml version = "1.0" encoding = "UTF-8"?>
<Wsdl: definitions
name = "Library"
xmlns: xsd = "http://www.w3.org/2001/XMLSchema"
targetNamespace = "Library"
xmlns: soap = "http://schemas.xmlsoap.org/wsdl/soap/"
xmlns: tns = "Library"
xmlns: wsdl = "http://schemas.xmlsoap.org/wsdl/">
<Xsd: documentation> </ xsd: documentation>
<Wsdl: types>
<xsd: schema xmlns: xsd = "http://www.w3.org/2001/XMLSchema" targetNamespace = "Library">
<xsd: complexType name = "my_value">
<Xsd: sequence>
<xsd: element name = "my_var" type = "xsd: string"> </ xsd: element>
</ Xsd: sequence>
</ Xsd: complexType>
</ Xsd: schema>
</ Wsdl: types>
<wsdl: message name = "MyFunctionRequest">
<wsdl: part name = "_ request_" type = "xsd: book"> </ wsdl: part>
</ Wsdl: message>
<wsdl: message name = "MyFunctionResponse">
<wsdl: part name = "_ response_" type = "tns: string"> </ wsdl: part>
</ Wsdl: message>
<wsdl: portType name = "Library">
<wsdl: operation name = "MyFunction_1">
<wsdl: input message = "tns: MyFunctionRequest" />
<wsdl: output message = "tns: MyFunctionResponse" />
</ Wsdl: operation>
<wsdl: operation name = "MyFunction_2">
<wsdl: input message = "tns: MyFunctionRequest" />
<wsdl: output message = "tns: MyFunctionResponse" />
</ Wsdl: operation>
</ Wsdl: portType>
<wsdl: binding name = "Library" type = "tns: Library">
<soap: binding style = "rpc" transport = "http://schemas.xmlsoap.org/soap/http" />
<wsdl: operation name = "MyFunction_1">
<soap: operation soapAction = "http://127.0.0.1/ws_soap/server.php" />
<Wsdl: input>
<soap: body use = "literal" namespace = "Library" />
</ Wsdl: input>
<Wsdl: output>
<soap: body use = "literal" namespace = "Library" />
</ Wsdl: output>
</ Wsdl: operation>
<wsdl: operation name = "MyFunction_2">
<soap: operation soapAction = "http://127.0.0.1/ws_soap/server.php" />
<Wsdl: input>
<soap: body use = "literal" namespace = "Library" />
</ Wsdl: input>
<Wsdl: output>
<soap: body use = "literal" namespace = "Library" />
</ Wsdl: output>
</ Wsdl: operation>
</ Wsdl: binding>
<wsdl: service name = "Library">
<wsdl: port binding = "tns: Library" name = "BookLibrary">
<soap: address location = "http://127.0.0.1/ws_soap/server.php" />
</ Wsdl: port>
</ Wsdl: service>
</ Wsdl: definitions>
[/ Code]
This is the server:
[Code]
ini_set ('soap.wsdl_cache_enabled', 0);
class MyClass
{
public function MyFunction_1 ($ my_value_1)
{
return $ my_value_1;
}
public function MyFunction_2 ($ my_value_2)
{
return $ my_value_2;
}
}
$ Service = new MyClass ();
$ server = new SoapServer ("ws.wsdl");
$ Server-> setObject ($ service);
$ Server-> handle ();
[/ Code]
This is the client:
[Code]
ini_set ('soap.wsdl_cache_enabled', 0);
ini_set ('soap.wsdl_cache_ttl', 0);
$ wsdl = 'http://127.0.0.1/ws_soap/server.php/method?WSDL';
$ options = array (
'Uri' => 'http://schemas.xmlsoap.org/soap/envelope/',
'Style' => SOAP_RPC,
'Use' => SOAP_ENCODED,
'Soap_version' => SOAP_1_1,
'Cache_wsdl' => WSDL_CACHE_NONE,
'Connection_timeout' => 15,
'Trace' => true,
'Encoding' => 'UTF-8',
'Exceptions' => true,
);
$ objClient = new SoapClient ($ wsdl, $ options);
try
{
if (isset ($ objClient))
{
$ resp1 = $ objClient-> MyFunction_1 ("Hello");
$ resp2 = $ objClient-> MyFunction_2 ("sono Mario");
echo $ resp1. $ resp2;
}
}
catch (SoapFault $ ex)
{
echo var_dump ($ ex);
}
[/ Code] [/ QUOTE]
Read this comment This is very useful, I also have a suggestion for those people who want to face the problem or do not be able to do this. simply take a help of https://dellsupports.org/ to solve the problem properly. If anyone faces any problem related to Dell they can also help.