I am not able to get requester's client IP address in my web service implementation. I am using jws annotations.
Code snippet and result of its execution appended below.
Although JwsContext is injected successfully and returns the protocol (http-soap), jwsContext.getMessageContext() object does not contain much information.
My attempt to read the client IP address from always fails (returns NPE) because there is no such property inside my object. Only property I see is control.callback.context.path but I've no clue what that is.
I have also tried to inject @Resource (import javax.annotation.Resource) WebServiceContext (import javax.xml.ws.WebServiceContext) but it returns null in run-time.
I suspect I am injecting the wrong annotation but I am not able to find the correct one.