cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From New Groovy <newtogro...@gmail.com>
Subject Re: How to retrieve return value in out interceptor?
Date Thu, 31 Jul 2014 14:24:26 GMT
Thanks, Dan!

One more question, how do I retrieve the method called (I need to retrieve
the annotations from it) if it's a JAX-RS method?

I have used this for in interceptors, but doesn't seem to be working for
out interceptor:

    private Method getTargetMethod(Message m) {
        BindingOperationInfo bop =
m.getExchange().get(BindingOperationInfo.class);
        if (bop != null) {
            MethodDispatcher md = (MethodDispatcher)

m.getExchange().get(Service.class).get(MethodDispatcher.class.getName());
            return md.getMethod(bop);
        }

        return (Method)m.get("org.apache.cxf.resource.method");
    }



On Mon, Jul 28, 2014 at 10:06 AM, Daniel Kulp <dkulp@apache.org> wrote:

>
> Move your interceptor up into the PRE_LOGICAL with a
> addBefore(WrapperClassOutInterceptor.class.getName()).  The list should
> then just have the return value (and any holders for other outs).   The
> WrapperClassOutInterceptor combines those into the asm generate object.
>
> Dan
>
>
> On Jul 27, 2014, at 10:47 PM, New Groovy <newtogroovy@gmail.com> wrote:
>
> > Hi,
> >
> > I want to filter some return values in an out interceptor, but am
> > struggling to figure out how to retrieve it.
> >
> > I have tried this:
> >
> >        MessageContentsList outObjects =
> > MessageContentsList.getContentsList(message);
> >        Exchange exchange = message.getExchange();
> >        OperationInfo op = exchange.getBindingOperationInfo() == null
> >                ? null
> >                : exchange.getBindingOperationInfo().getOperationInfo();
> >
> > and see a lot of info...but can't figure out how to retrieve the _return
> > value I see in the xxx.jaxws_asm
> >
> > Any pointers?
>
> --
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message