User Guide
AddSOAPResponseHeader 465
AddSOAPResponseHeader
Description
Adds a SOAP response header to a web service response. Call only from within a CFC web service
function that is processing a request as a SOAP web service.
Returns
Nothing
Category
XML functions
History
ColdFusion MX 7: Added this function.
Function syntax
AddSOAPResponseHeader(namespace, name, value [, mustunderstand])
See also
AddSOAPRequestHeader
, GetSOAPRequest, GetSOAPRequestHeader, GetSOAPResponse,
GetSOAPResponseHeader, IsSOAPRequest; “Basic web service concepts” in Chapter 36, “Using
Web Services,” in ColdFusion MX Developer’s Guide
Parameters
Usage
Call this function only from within a CFC web service function. It throws an error if it is invoked
in a context that is not a web service request.
If you pass XML in the
value parameter, ColdFusion ignores the namespace and name
parameters. If you require a namespace, define it within the XML itself.
Use the
IsSOAPRequest function to determine if the CFC is running as a web service.
Example
This example creates a CFC web service that illustrates the operation of the
AddSOAPResponseHeader function and also provides a web service that illustrates the operation
of other ColdFusion SOAP functions.
Parameter Description
namespace A string that is the namespace for the header.
name A string that contains the name of the SOAP header in the request.
value The value for the SOAP header; this can be a CFML XML value.
mustunderstand Optional. True or False (default). Sets the SOAP mustunderstand value for this
header.