A little bit about Message Context in JAX-WS
Sometimes, Invoking Web Services require exchange of additional information or metadata (not captured in SOAP message). This metadata forms the context of message exchange and may in-turn change the way the message is processed. JAX-WS Specification defines some standard properties to describe the metadata and also provides a standard way to manipulate or exchange such information. I will briefly describe how such metadata is exchanged between various parts of the application and then go over the common usage of the standard properties defined by JAX-WS.
A client application can configure metadata through request context and response context of the BindingProvider ( instance of proxy or Dispatch). The request and response contexts are of type java.util.Map and are obtained using getRequestContext and getResponseContext methods of the BindingProvider. The following example shows how you can access/update request and response context.