remove XML from SOAP responses

I am trying to deploy a non-wsdl php soapserver, the code as follows if very basic:

function notify($string) {
    return null;
 }
 
$server = new SoapServer(null,
            array('uri' => "http://localhost/"));

$server->addFunction("notify");
   $server->handle(); 

The above seems to work fine, the only problem is that the soap client requires a 200 OK and empty notifyResponse XML element. As you can see from the above, I tried a “return null” on the notify function but that still builds a “notifyResponse” element.

Unfortunately I cannot modify the client to accept anything different. I also tried removing the soapServer for tests and generated a http response with just a 200ok without any XML response and that was acceptable, unfortunately I cannot find a way to do this when soapServer is used.

The most simplified response I was able to generate is shown below, I achieved that by using:

return new SoapVar(”,XSD_ANYXML);

But this is still not accepted by the client as a good response, I either need to remove the whole XML layer or at least remove the “notifyResponse”

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
                   xmlns:ns1="http://localhost/"
                   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                   xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
                   SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <SOAP-ENV:Body><ns1:notifyResponse></ns1:notifyResponse></SOAP-ENV:Body>
</SOAP-ENV:Envelope>