cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Moesel" <>
Subject RE: Accessing Message Context, HttpServletRequest, and HttpServletResponse
Date Mon, 16 Apr 2007 17:19:41 GMT
Good point, Fred.  I've added the following snippet to the end of the

"Of course, it is always a good idea to program defensively if using
transport-specific entities like the HttpServletRequest and
HttpServletResponse. If the transport were changed (for instance to the
JMS transport), then these values would likely be null."


-----Original Message-----
From: Fred Dushin [] 
Sent: Monday, April 16, 2007 12:11 PM
Subject: Re: Accessing Message Context, HttpServletRequest, and

Just bear in mind that this is fragile, and servants should be coded  
defensively for the case in which this information is not available.   
(E.g., due to underlying changes in the transport implementation, or  
an administrative modification that changes the transport type, all  

That being said, the idea that all information about the request  
context is available is laudable, and CXF should be commended for  
it.  You never know when an application is going to need information  
about what's really going on under the hood, and in a managed  
language like Java, it's pretty senseless to throw this information  


On Apr 16, 2007, at 11:52 AM, Christopher Moesel wrote:

> I needed access to the request object from within my service
> implementation. So after finding nothing in the documentation, I dug
> through the samples and found a way.
> I thought this would be useful to others, so I added it to the User
> Guide WIKI at the bottom of:
> If this is the incorrect place for it, or if this is not the  
> recommended
> approach, please feel free to modify, move, or delete it at will.
> Thanks,
> Chris

View raw message