JBoss.org Community Documentation

9.15.2.1. Accessing the message context

There is currently no portable way of doing this in 4.0.5. @WebServiceContext injection will be available with 4.2. In the meantime you can access the message context like this:

 
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext(); 
msgContext.setProperty(<Name>, <Value>);