I send a request to WSDL server in this way:
$soap = new SoapClient('WSDL_URI');
$soap->SomeFunction(array('Param1' => 123, 'Param2' => 456));
it works fine, and __getLastRequest returns:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://tempuri.org/">
<SOAP-ENV:Body>
<ns1:SomeFunction>
<ns1:Param1>123</ns1:Param1>
<ns1:Param2>456</ns1:Param2>
</ns1:SomeFunction>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
but if I call SomeFunction by __soapCall, WSDL server brakes down and doesn’t return a correct response.
$soap->__soapCall('SomeFunction', array('Param1' => 123, 'Param2' => 456));
__getLastRequest returns:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://tempuri.org/">
<SOAP-ENV:Body>
<ns1:SomeFunction/>
<param1>123</param1>
<param2>456</param2>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
you see, because requests are different, it doesn’t work..
How to resolve it?
As shown in php documentation SoapClient::__soapCall,
So I think if you want to call the webservice with
__soapCall, you should make the call like that: