RE: getting the ip address in the action method

2008-07-16 Thread Yair Ben-Meir
didn't thought of that... Thanks! -Original Message- From: Daniel Kulp [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 16, 2008 5:31 PM To: users@cxf.apache.org Subject: Re: getting the ip address in the action method Why go through the trouble of using an interceptor for

Re: getting the ip address in the action method

2008-07-16 Thread Daniel Kulp
Why go through the trouble of using an interceptor for this? If you do @Resource WebServiceContext ctx; The ctx itself has the HttpServletRequest in it as well. MessageContext.SERVLET_REQUEST key. Dan On Jul 16, 2008, at 8:35 AM, Yair Ben-Meir wrote: Hi I have a class implementing

RE: getting the ip address in the action method

2008-07-16 Thread Yair Ben-Meir
Thanks! This works like a charm. I m still happy I've learnt about ThreadLocal today... -Original Message- From: Ian Roberts [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 16, 2008 4:09 PM To: users@cxf.apache.org Subject: Re: getting the ip address in the action method Yair Ben

RE: getting the ip address in the action method

2008-07-16 Thread David Soroko
(all?) solutions will have a hacky feeling to them. -- david -Original Message- From: Yair Ben-Meir [mailto:[EMAIL PROTECTED] Sent: 16 July 2008 14:08 To: users@cxf.apache.org Subject: RE: getting the ip address in the action method Thanks David, Let me start by saying I consider myself

Re: getting the ip address in the action method

2008-07-16 Thread Ulhas Bhole
I guess you mean you need access to the ip address in the implementation of the method. If you are using JAX-WS frontend you can add a custom header in the message and inject webServiceContext into your service implementation. once you are inside your method implementation you can retrive your

Re: getting the ip address in the action method

2008-07-16 Thread Ian Roberts
Yair Ben-Meir wrote: The problem is - how can I pass the IP to the method? The method's arguments are according to the WSDL, I can't change them and add "ip" or something like that. Store the IP address as a property of the Message in your interceptor: message.put("my.package.ClientIP", ipAddr

RE: getting the ip address in the action method

2008-07-16 Thread Yair Ben-Meir
al Message- From: David Soroko [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 16, 2008 3:42 PM To: users@cxf.apache.org Subject: RE: getting the ip address in the action method How about a thread local? -Original Message- From: Yair Ben-Meir [mailto:[EMAIL PROTECTED] Sent: 16 July

RE: getting the ip address in the action method

2008-07-16 Thread David Soroko
How about a thread local? -Original Message- From: Yair Ben-Meir [mailto:[EMAIL PROTECTED] Sent: 16 July 2008 13:36 To: users@cxf.apache.org Subject: getting the ip address in the action method Hi I have a class implementing an interface annotated as a web service. In the method of this