2010/1/13 Daniel Kulp <[email protected]>:
>>
>> new MessageContextImpl(message).getHttpHeaders().getCookies()
>>
>
> That's probably the easiest.    I guess the more "standard" way would be to
> pull the stuff off the message directly instead of using the
> MessageContextImpl wrapper thing, but the wrapper avoids a bunch of casts and
> stuff.
>
> You could do:
>
> ((Map<String, List<String>>)message.get(Message.PROTOCOL_HEADERS)
> to get the map of all the protocol headers and process the cookie things
> yourself.   Probably not fun.
>
> You could also to:
>
> (HTTPServletRequest)message.get("HTTP.REQUEST")
> to get the request object and grab the session and everything from there.
> Not sure how valuable that is to you.
>
> Dan
>

That's really helpful to know, that you very much for your advice. I'm
not sure which route I'm going to chose. Do you think there's a risk
in depending on the implementation class MessageContextImpl? I'm
slightly uneasy about using it directly and would prefer to depend on
MessageContext.

I'm using Spring to configure the jaxrs:server and hence the
interceptor. Is there any way to have the MessageContext
implementation injected into the Interceptor by CXF?

Best wishes,

Michael

Reply via email to