User Guide

GetSOAPResponseHeader 635
GetSOAPResponseHeader
Description
Returns a SOAP response header. Call this function from within code that is invoking a web
service after making a web service request.
Returns
A SOAP response header.
Category
XML functions
History
ColdFusion MX 7: Added this function.
Function syntax
GetSOAPResponseHeader(webservice, namespace, name [, asXML])
See also
AddSOAPRequestHeader
, AddSOAPResponseHeader, GetSOAPRequest,
GetSOAPRequestHeader, GetSOAPResponse, IsSOAPRequest; “Basic web service concepts” in
Chapter 36, “Using Web Services,” in ColdFusion MX Developer’s Guide
Parameters
Usage
If you specify false for the asXML parameter, ColdFusion first attempts to retrieve the header using
the data type specified in the headers
xsi:type attribute. If the xsi:type attribute is not
available, ColdFusion attempts to retrieve the header as a string. If you specify True for the
asXML
parameter, ColdFusion retrieves the header as raw XML.
Used within CFML code by a consumer of a web service after it calls the web service with
cfinvoke.
Example
There are two parts to this example. The first part is the web service CFC that this function (as
well as the other ColdFusion SOAP functions) uses to demonstrate its interaction with a web
service. To implement the web service for this function, see the example for either the
AddSOAPResponseHeader function or the GetSOAPRequestHeader function.
Parameter Description
webservice A webservice object as returned from the
cfobject tag or the CreateObject
function.
namespace A String that is the namespace for the header.
name A String that is the name of the SOAP header.
asXML If True, the header is returned as a CFML XML object. If False (default), the header
is returned as a Java object.