I have an InInterceptor that gets some information from the HTTPHeaders and creates a custom object
public void handleMessage(Message message) throws Fault {
final HttpServletRequest request = (HttpServletRequest) message
.get(AbstractHTTPDestination.HTTP_REQUEST);
String a= request.getHeader("A");
String b= request.getHeader("B");
message.put("CustomObject", new CustomObject(a,b));
}
Then in service methods I use below code to get the custom object
final Message message = PhaseInterceptorChain.getCurrentMessage();
final CustomObject customObject=(CustomObject)message.getContextualProperty("CustomObject");
I was wondering if its possible to get this through @Context ..
@GET
@Path("/custom")
@Produces("application/json")
public List<Node> getA(@Context("CustomObject") String user) throws XYZException;
Thanks