cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <>
Subject Re: Retrieving a MessageContext property from an Async handler
Date Thu, 13 May 2010 01:25:49 GMT


The "Response" object that is passed into your async handler has a getContex() 
method on it that returns the context for that response.   Thus, in your 
handler, if you set a property on the context with application scope, that 
property should be retrievable from the context provided by the Response 


On Wednesday 12 May 2010 8:32:20 pm Glen Mazza wrote
> Hello, I asked this question early this morning on the Metro list and
> didn't get an answer, perhaps the CXF list can help me here:
> s-SOAP-calls-tp28535341p28535341.html
> Basically, I'm making async soap calls and due to a customer desire I also
> need to track the size in bytes of the SOAP response.  I was thinking of
> using a JAX-WS handler to read the SOAP XML and get a count in bytes and
> store it in a MessageContext property, but I don't know how I can get that
> information to the async handler so I can persist that information.
> One possibility might be to have the SOAP client store a Map (soap call
> id#, size in bytes) as a MessageContext property and have the JAX-WS
> handler update that Map.  The async handler could be initialized with the
> same Map object and soap call id# and then just read in bytes from that
> Map--would that work and be safe across multiple async calls?  Any ideas?
> Thanks,
> Glen

Daniel Kulp

View raw message