The example is misleading. No errors when passing XML object to addSOAPRequestHeader(). However, the other end won't be able to process XML object. Use cfsavecontent instead of cfxml when building XML node.
Are you saying this from experience? I don't understand what you mean by "the other end".
Surely, it cannot be the web service. The addSOAPRequestHeader function is local to ColdFusion, and does not communicate with the web service. It only supplies a header to the eventual caller of the service. One would therefore assume that ColdFusion would know how to add the XML to the request.
I should have posted my comment under AddSOAPRequestHeader page. Sorry for the confusion.
What I meant by "the other end" was the Web Service. I do understand that addSOAPRequestHeader function only supplies a header to SOAP. If we want to supply XML into the header, we cannot use ColdFusion XML document object. Instead, we should use plain XML string.
That's the point I was trying to make.
Europe, Middle East and Africa