--- drupal_soap_client.inc      2011-02-25 02:08:51.000000000 +0000
+++ ../../../modules/soapclient/lib/drupal_soap_client.inc      2012-01-12 11:26:32.000000000 +0000
@@ -91,6 +91,21 @@
         return $result;
       }
 
+//Ovation1357 - Added this to dump out trace info into the watchdog log if Option 'trace' is set to TRUE in $options
+if ( $this->options['trace'] === TRUE ) { 
+       try {
+          drupal_set_message("SOAP Tracing Enabled - See the ". l('Watchdog Log','admin/reports/dblog'). " for the data.",'warning');
+          watchdog("soapclient","SOAP Request Header: !msg",array( '!msg' => htmlentities($this->client->__getLastRequestHeaders()), WATCHDOG_DEBUG));
+          watchdog("soapclient","SOAP Request Body: !msg",array( '!msg' => htmlentities($this->client->__getLastRequest()), WATCHDOG_DEBUG));
+          watchdog("soapclient","SOAP Response Header: !msg",array( '!msg' => htmlentities($this->client->__getLastResponseHeaders()), WATCHDOG_DEBUG));
+          watchdog("soapclient","SOAP Response Body: !msg",array( '!msg' => htmlentities($this->client->__getLastResponse()), WATCHDOG_DEBUG));
+       }
+catch (Exception $e) {
+        $result['#error'] = t($e->getMessage());
+        return $result;
+       }
+}
+
       if ( is_soap_fault($result['#return']) ) {
         $result['#error'] = t('Fault !code: !msg', array( '!code' => $result['#return']->faultcode, '!msg' => $result['#return']->faultstring ));
         return $result;
