addSOAPResponseHeader

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

namespace

Required: Yes
No Help Available

name

Required: Yes
No Help Available

value

Required: Yes
No Help Available

mustunderstand

Required: No
No Help Available

Examples sample code invoking the addSOAPResponseHeader function


Tag Syntax

<h3>AddSOAPRequestHeader Example</h3> 
 <cfscript> 
     // 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, "http://www.tomj.org/myns", "returnheader"); 
     XMLheader = getSOAPResponseHeader(ws, "http://www.tomj.org/myns", "returnheader", true); 
 </cfscript> 

Fork me on GitHub