i have a soap with a method that return nothing
class mySoapService {
foo(){
}
}
$wsdl = ...;
$soapService = new mySoapService();
$soapServer = new \SoapServer($wsdl);
$soapServer->setObject($soapService);
$soapServer->handle(); // write nothing on call foo
some soap client raise an exception because they expect a proper xml-soap empty response, like this:
<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
the questions are:
why PHP SoapServer return an empty response and not a xml-soap empty response?
what say the soap standard for method without return a value?
Changing
to
worked for me