Problem with soap trace if error

[email protected] (Andy Cress) Tue, 22 Apr 2014 15:44:05 +0000
Newsgroups php.soap
Message-ID <7370b702892443718768a04dd900251e@CO2PR05MB746.namprd05.prod.outlook.com>
--_000_7370b702892443718768a04dd900251eCO2PR05MB746namprd05pro_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable


I am using CentOS6.4 with these versions of php:
  php-5.3.3-27.el6_5.x86_64
  php-soap-5.3.3-27.el6_5.x86_64

When I turn on the trace for my soap calls, it only returns data if the cal=
l succeeds, but the output if empty if it gets an error/exception.
Here is what I'm doing below, perhaps there is something I am missing?

     $client =3D getSoapClient ($wsdl);
    try {
            $response =3D $client->__soapCall('AddServiceTicketViaCompanyId=
', array($serviceTicketViaCompanyId),
                                          array('uri' =3D> 'http://connectw=
ise.com', 'soapaction' =3D> ''));
            if ( $debugxml ) {   // works fine here
               fwrite($logHandle, "AddServiceTicket Headers:\n".
                        $client->__getLastRequestHeaders()."\n");
               fwrite($logHandle, "AddServiceTicket Request:\n".
                        $client->__getLastRequest()."\n");
            }
    }catch (SoapFault $fault){
            if ( $debugxml ) {   // both headers and request return empty h=
ere
               fwrite($logHandle, "AddServiceTicket Error Headers:\n".
                        $client->__getLastRequestHeaders()."\n");
               fwrite($logHandle, "AddServiceTicket Error Request:\n".
                        $client->__getLastRequest()."\n");
            }
            throw new Exception($fault->getMessage());
    }

where
    function getSoapClient ( $wsdl ){
[...]
                if ($trace =3D=3D 0) {
                   $newclient =3D @new SoapClient($wsdl);
                } else {
                   $newclient =3D @new SoapClient($wsdl, array('trace' =3D>=
 1));
                }
                return $newclient;
[...]
}


--_000_7370b702892443718768a04dd900251eCO2PR05MB746namprd05pro_--