
1120
DEVELOPING
COLDFUSION 9 APPLICATIONS
Using Web Elements and External Objects
Las
t
upda
te
d 8/5/2010
<complexType name="ArrayOf_SOAP-ENC_Array">
<complexContent>
<restriction base="SOAP-ENC:Array">
<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 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 can 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#">
...
The following example uses the
GetSOAPRequest
function in a web service CFC method:
Содержание COLDFUSION 9
Страница 1: ...Developing Applications ADOBE COLDFUSION 9...