Client-Side Code
The client implementation of the invoke_addHeaders() method, which calls the addHeaders() service operation method in the proxy, adds a SOAP header to a rwsf::CallInfo object before sending the request message.
 
void invoke_addHeaders(HeadersProxy& proxy)
{
int in1_in = 15;
int return_ret;
try {
rwsf::CallInfo info; //1
info.addRequestSoapHeader(rwsf::XmlName("MyHeader",
rwsf::XmlNamespace("headers",
"http://www.roguewave.com/examples/webservice/headers")),
"MyValue"); //2
return_ret = proxy.addHeaders(info, in1_in); //3
...
}
//1 Instantiates a rwsf::CallInfo object.
//2 Adds a request SOAP header element named MyHeader, in a namespace with the prefix headers, whose value is the literal string "MyValue".
//3 Calls the addHeaders() method in the proxy, passing the rwsf::CallInfo object containing the header data.