User Guide

AddSOAPRequestHeader 463
AddSOAPRequestHeader
Description
Adds a SOAP header to a web service request before making the request.
Returns
Nothing.
Category
XML functions
History
ColdFusion MX 7: Added this function.
Function syntax
AddSOAPRequestHeader(webservice, namespace, name, value [, mustunderstand])
See also
AddSOAPResponseHeader
, GetSOAPRequest, GetSOAPRequestHeader, GetSOAPResponse,
GetSOAPResponseHeader, IsSOAPRequest; “Basic web service concepts” in Chapter 36, “Using
Web Services,” in ColdFusion MX Developer’s Guide
Parameters
Usage
Used within CFML code by a consumer of a web service before it calls the web service.
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.
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
AddSOAPResponseHeader.
Execute the following example as a client to see how the
AddSOAPRequestHeader function
operates.
Parameter Description
webservice A web service 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 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.