You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Santosh Kulkarni <ku...@gmail.com> on 2011/09/02 18:04:30 UTC

Re: identifying client type

I'm sorry I am not clear on where do I inject the WebServiceContext?, my web
service impl class or somewhere else?
Santosh

--
View this message in context: http://cxf.547215.n5.nabble.com/identifying-client-type-tp4750991p4762898.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: identifying client type

Posted by Daniel Kulp <dk...@apache.org>.
On Friday, September 02, 2011 9:04:30 AM Santosh Kulkarni wrote:
> I'm sorry I am not clear on where do I inject the WebServiceContext?, my web
> service impl class or somewhere else?

If you do:
@Resource
WebServiceContext context;

in your impl, it should get injected.


That said, it's likely easier to just call 
PhaseInterceptorChain.getCurrentMessage() to get the CXF message out of there.   
There is more information in there that you can use.  For example:

message.getExchange().getDestination() instanceof JMSDestination 

would immediately tell you if it's JMS of:

message.getExchange().getDestination() instanceof AbstractHTTPDestination

if its HTTP.

Dan
 



> Santosh
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/identifying-client-type-tp4750991p4762898.h
> tml Sent from the cxf-user mailing list archive at Nabble.com.
-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com