There is a requirement to add a new http header key value pair in a soap request. Something like below.
HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Type: text/xml; charset=utf-8
New-Key: Some dynamic value
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
How can I add a new key value pair (New-Key: Some dynamic value) in http header while making a soap request? Value will later get extracted by server from http header. As a requirement new field should neither be added in soap header nor in soap body.
We are using IBM wsdl2java tool, which implements the IBM JAX-RPC specification to generate the Java clients and invoke the SOAP web service calls.