cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Roberts <i.robe...@dcs.shef.ac.uk>
Subject Re: getting the ip address in the action method
Date Wed, 16 Jul 2008 13:09:13 GMT
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", ipAddress);

In your implementation class, add a

@Resource
private WebServiceContext wsCtx;

and you should then be able to access the message property through that:

wsCtx.getMessageContext().get("my.package.ClientIP")

Ian

-- 
Ian Roberts               | Department of Computer Science
i.roberts@dcs.shef.ac.uk  | University of Sheffield, UK

Mime
View raw message