Hi

Dan's solution definitely involves less code.
I guess using org.apache.cxf.jaxrs.ext.MessageContext offers a cheap
way of figuring out if it's a soap request which is in scope or not.
Setting a property  on the current message from say JAX-RS filter and
use PhaseInterceptorChain.getCurrentMessage().get(propertyName) will
do it too

Cheers, Sergey

On Mon, Jun 13, 2011 at 6:06 PM, myerscb <[email protected]> wrote:
> Hi,
>
> This time it really works!  thanks for all your help.
>
> with
>
>         @Resource org.apache.cxf.jaxrs.ext.MessageContext jaxrsContext;
>
>                if (jaxrsContext.getServletContext() == null) {
>                        request = (HttpServletRequest)
> jaxwsContext.getMesgeContext().get(MessageContext.SERVLET_REQUEST);
>                } else {
>                        request = (HttpServletRequest)
> jaxrsContext.get(AbstractHTTPDestination.HTTP_REQUEST);
>                }
>
> works as expected.
>
> Also HttpServletRequest request = (HttpServletRequest)
> PhaseInterceptorChain.getCurrentMessage().get("HTTP.REQUEST"); works as
> well.
>
> Is one solution better to use?  I would probably go with Dan's solution
> because there is less code.  But that may not be the better choice.
>
> Thanks again,
>
> Chris
>
> --
> View this message in context: 
> http://cxf.547215.n5.nabble.com/Getting-the-IP-Address-of-SOAP-Clients-works-for-REST-clients-but-not-for-SOAP-clients-tp4476334p4485072.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>

Reply via email to