Client/WsApiClient.php
function __doRequest($request, $location, $action, $version, $oneWay = 0)
    {
        $request1 = preg_replace('/<ns1:(\w+)/', '<$1 xmlns="' . $this->namespace . '"', $request, 1);
        $request2 = preg_replace('/<ns1:(\w+)/', '<$1', $request1);
        $request3 = str_replace(array('/ns1:', 'xmlns:ns1="' . $this->namespace . '"'), array('/', ''), $request2);

        $response = parent::__doRequest($request3, $location, $action, $version, $oneWay = 0);

        // *************** SOAP DEBUG COMMANDS **************
        // 
        // --note: trace must be set to true on client request.
        // 
        // echo "REQUEST HEADERS:\n<br>" . parent::__getLastRequestHeaders() . "\n<br>";
        // echo "REQUEST:\n<br>" . parent::__getLastRequest() . "\n<br>";
        // echo "RESPONSE HEADERS:\n<br>" . parent::__getLastResponseHeaders() . "\n<br>";
        // echo "RESPONSE:\n<br>" . parent::__getLastResponse() . "\n<br>";
        // var_dump(parent::__getFunctions());
        //
        // *************************************************

        return ($response);
    }
function __doRequest($request, $location, $action, $version, $oneWay = 0)
    {
        $request1 = preg_replace('/<ns1:(\w+)/', '<$1 xmlns="' . $this->namespace . '"', $request, 1);
        $request2 = preg_replace('/<ns1:(\w+)/', '<$1', $request1);
        $request3 = str_replace(array('/ns1:', 'xmlns:ns1="' . $this->namespace . '"'), array('/', ''), $request2);

        $response = parent::__doRequest($request3, $location, $action, $version, $oneWay = 0);

        // *************** SOAP DEBUG COMMANDS **************
        // 
        // --note: trace must be set to true on client request.
        // 
        // echo "REQUEST HEADERS:\n<br>" . parent::__getLastRequestHeaders() . "\n<br>";
        // echo "REQUEST:\n<br>" . parent::__getLastRequest() . "\n<br>";
        // echo "RESPONSE HEADERS:\n<br>" . parent::__getLastResponseHeaders() . "\n<br>";
        // echo "RESPONSE:\n<br>" . parent::__getLastResponse() . "\n<br>";
        // var_dump(parent::__getFunctions());
        //
        // *************************************************

        return ($response);
    }
Override PHP SOAP Client __doRequest call to regex Cisco UC Gateway API XML data.

NOTE: Leave the SOAP debug commands because they intercept the call better here.