Print this page

Enable SOAP Logging to troubleshoot the Marketing Cloud SOAP API

Knowledge Article Number 000213333
Description
When troubleshooting requests for the Marketing Cloud SOAP API, it is helpful to capture the raw SOAP envelope generated by the application code to better understand the request that is made. 
Resolution


In Visual Studio 2005 (VB/C# .NET)


Add the following XML into the app.config or web.config file:
 
<configuration> 
<microsoft.web.services3> 
<diagnostics> 
<trace enabled=“true" input="InputTrace.webinfo" 
output="OutputTrace.webinfo"/> 
<detailedErrors enabled="true"/> 
</diagnostics> 
</microsoft.web.services3> 
</configuration>



In Visual Studio 2008/2010/2012/2013 (VB/C# .NET)


Follow the example for "Recommended Settings for Deployment or Debugging" provided by Microsoft



PHP


1. Modify the "exacttarget_soap_client.php" file. Near or at line 18, there's a line that calls the  "__doRequest" method for example: 
 
return parent::__doRequest($objWSSE->saveXML(), $location, $saction, $version);
 
2. Immediately before this line, add the following code in order to have it print the SOAP envelope to the screen: 
 
print_r($objWSSE->saveXML());

 

Java

 
1. Log4J must be setup in java project. For details about getting started or setting up Log4J, please see instructions on apache.org.
2. Once Log4J is setup, add the following lines to the log4j.properties file for the project:

 
log4j.logger.httpclient.wire.content=DEBUG 
log4j.logger.httpclient.wire.header=DEBUG

 

 

 




promote demote