User Guide

Table Of Contents
914 Chapter 36: Using Web Services
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="SOAP-ENC:Array[]" /
>
</restriction>
</complexContent>
</complexType>
<complexType name="ArrayOf_SOAP-ENC_string">
<complexContent>
<restriction base="SOAP-ENC:Array">
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="xsd:string[]" />
</restriction>
</complexContent>
</complexType>
Troubleshooting SOAP requests and responses
ColdFusion MX provides the following facilities for troubleshooting SOAP requests and
responses:
The getSOAPRequest and getSOAPResponse functions.
The TCP monitor.
Viewing SOAP requests and responses
You can use the
getSOAPRequest and getSOAPResponse functions to retrieve and display the
XML passed to and from a web service. Although advanced users may use this information for
custom functionality, you typically use these functions for debugging.
Use these functions in the following places:
GetSOAPRequest Clients call this function after the web service request; web service CFCs
call this function in the web service CFC method.
GetSOAPResponse Clients call this function after the web service request completes; web
service CFCs cannot use this method.
The following example uses the
GetSOAPRequest and GetSOAPResponse functions in a web
service client:
<cfscript>
ws = CreateObject("webservice", "http://localhost:8500/soapexamples/
tester.cfc?WSDL");
addSOAPRequestHeader(ws, "http://mynamespace/", "username", "randy");
ret = ws.echo_me("value");
</cfscript>
<cfset soapreq = GetSOAPRequest(ws)>
<h2>SOAP Request</h2>
<cfdump var="#soapreq#">
<cfset soapresp = GetSOAPResponse(ws)>
<h2>SOAP Response</h2>
<cfdump var="#soapresp#">
...