This task explains how to enable an existing Web services client to send values in HTTP transport headers. By modifying your client code to send transport headers, you can send specific information within the HTTP transport headers of outgoing requests.
Before you begin
You need a Web services client that you can enable to send HTTP transport headers.Sending transport headers is supported by Web services clients only, and over the HTTP transport only. The Web services client must call the Java API for XML-based RPC (JAX-RPC) APIs directly and not through any intermediary layers, such as a gateway-like function. Sending and retrieving HTTP transport headers on the Web services server-side is done through non-Web services APIs.
Why and when to perform this task
The client must set a property on the Stub to send values in HTTP transport headers. Once the property is set, the values are set in all the HTTP requests for subsequent remote method invocations against the Stub until the associated property is set to null or the Stub is discarded. To send values in the HTTP transport headers on outbound requests, modify the client code as follows:
Steps for this task
Common header identifier string constants, such as HTTP_HEADER_SET_COOKIE can be found in the com.ibm.websphere.webservices.Constants class. The HashMap entry value does not need to be set; it is ignored. An empty HashMap (one that is non-null, but does not contain keys), causes values from all headers in the HTTP response to be received.
Result
You have a Web service client that is configured to send HTTP transport headers.Related reference
Extensions to the JAX-RPC and Web Services for J2EE programming models
HTTP transport header properties best practices