Whatever message this page gives is out now! Go check it out!

GetSOAPResponse

Last update:
May 18, 2026

Description

Returns an XML object that contains the entire SOAP response after invoking a web service.

Returns

An XML object that contains the entire SOAP response.

Category

History

ColdFusion MX 7: Added this function.

Function syntax

GetSOAPResponse(webservice)

See also

GetSOAPResponseHeaderIsSOAPRequestBasic web service concepts in the Developing ColdFusion Applications

Parameters

Parameter
Description
webservice
A webservice object as returned from the cfobject tag or the CreateObject function.

Usage

Invoke the web service before attempting to get the response. You can use CFML XML functions to examine the XML response.

Example

This example makes a request to execute the echo_me function of the headerservice.cfc web service. Following the request, the example calls the GetSOAPResponse function to get the SOAP response, and then calls cfdump to display its content. for information on implementing the headerservice.cfc web service and also to see the echo_me function and the content of the web service CFC, see the example for either the AddSOAPResponseHeader function or the GetSOAPRequestHeader function.
<!--- Note that you might need to modify the URL in the CreateObject function 
 to match your server and the location of the headerservice.cfc file if it is 
 different than shown here. ---> 
 
 <cfscript> 
 ws = CreateObject("webservice", 
 "http://localhost/soapheaders/headerservice.cfc?WSDL"); 
 ws.echo_me("hello world"); 
 resp = getSOAPResponse(ws); 
 </cfscript> 
 <cfdump var="#resp#">

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page