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.

addSOAPResponseHeader(namespace, name, value [, mustunderstand]) → returns boolean

Argument Reference for the addSOAPResponseHeader function


Required: Yes
No Help Available


Required: Yes
No Help Available


Required: Yes
No Help Available


Required: No
No Help Available

Examples sample code invoking the addSOAPResponseHeader function

Tag Syntax

<h3>AddSOAPRequestHeader Example</h3> 
     // Create the web service object. 
     ws = createObject("webservice", "http://localhost/soapheaders/headerservice.cfc?WSDL"); 
     // Set the username header as a string. 
 addSOAPRequestHeader(ws, "http://mynamespace/", "username", "tom", false); 
 // Invoke the web service operation. 
     ret = ws.echo_me("argument"); 
     // Get the first header as an object (string) and as XML. 
     header = getSOAPResponseHeader(ws, "", "returnheader"); 
     XMLheader = getSOAPResponseHeader(ws, "", "returnheader", true); 

Fork me on GitHub