Sample SOAP: Capture SOAP/XML
This reference provides examples of common ways to capture SOAP in various programming environments.
The Zuora API documentation includes many code samples based in SOAP. Many developers new to SOAP often do not realize that their programming is only generating and receiving XML from a webservice. Even if they do, they are often unsure how to view the XML, even when debugging their code.
Perl
PHP5
PHP4
C++
Compile the stdsoap2.cpp source code with C/C++ compiler option ‘-DDEBUG’ (‘/DDEBUG’ in MSVC++). Executing your service or client application logs the activities in the following files:
- SENT.log: This file contains the messages sent.
- RECV.log: This file contains the messages received.
- TEST.log: This file contains the trace information.
C#
Save the following code with the name SqlSoapTracer.cs in the same folder that contains the SOAP client project files.
Perform the following steps in the Solution Explorer window:
Java
Save this file as client-config.wsdd in the working directory of your Axis client. Axis will load it automatically. This configuration tells Axis to save all incoming and outgoing XML into a file named axis.log.
Ruby
Python
When using SOAPpy, make sure to add the import tag below for the object.api.zuora.com schema:
<import namespace="http://api.zuora.<wbr/>com/" />
And also the import tag below for the api.zuora.com schema:
<import namespace="http://object.api.<wbr/>zuora.com/" />
Tips
If you are using the GlassFish application server, add the following configuration information to the domain.xml file: