cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: Obtaining source address and operation name
Date Fri, 31 Aug 2007 16:08:50 GMT

Jervis,

Those properties are on the message, not the exchange.   I just checked 
both the DocLitInInterceptor and RPCInInterceptor and they put them on 
the message.

That said, I just added the code to the RPCInInterceptor earlier this 
week.   If the service is RPC, that information won't be there unless 
you are using a SNAPSHOT version.  (even then, I'm not sure.  I don't 
remember when I did the last snapshot)

Dan
 


On Thursday 30 August 2007, Liu, Jervis wrote:
> these properties are stored in Exchange, not in Message. following
> should work for you:
>
> Object operation = message.getExchange().get( Message.WSDL_OPERATION
> ); Object port = message.getExchange().get( Message.WSDL_PORT );
> Object service = message.getExchange().get( Message.WSDL_SERVICE );
> Object context = message.getExchange().get( Message.INVOCATION_CONTEXT
> ); Object endpointAddress = message.getExchange().get(
> Message.ENDPOINT_ADDRESS );
>
> Their types are defined in JAX-WS spec, section 9.4.1.
>
> .description URI
> .service QName
> .port QName
> .interface QName
> .operation QName
>
> Jervis
>
> > -----Original Message-----
> > From: James Royalty [mailto:james@pando.com]
> > Sent: 2007?8?31? 10:07
> > To: cxf-user@incubator.apache.org
> > Subject: Re: Obtaining source address and operation name
> >
> >
> > Hi Jervis,
> >
> > As I test, I was doing:
> >
> > Object operation = message.get( Message.WSDL_OPERATION );
> > Object port = message.get( Message.WSDL_PORT );
> > Object service = message.get( Message.WSDL_SERVICE );
> > Object context = message.get( Message.INVOCATION_CONTEXT );
> > Object endpointAddress = message.get( Message.ENDPOINT_ADDRESS );
> >
> > ... as I didn't know what type would be returned.  All ended up
> > being null.  The services are using a servlet transport, btw.
> >
> > Thanks!
> > --
> > James
> >
> > Liu, Jervis wrote:
> > > Hi What code did you use to retrieve WSDL_OPERATION, WSDL_PORT
> > > etc?
> > >
> > > Thanks,
> > > Jervis
> > >
> > >> -----Original Message-----
> > >> From: James Royalty [mailto:james@pando.com]
> > >> Sent: 2007?8?31? 8:28
> > >> To: cxf-user@incubator.apache.org
> > >> Subject: Obtaining source address and operation name
> > >>
> > >>
> > >> Hi,
> > >>
> > >> I'm trying to write an "in" interceptor, using
> > >> org.apache.cxf.interceptor.LoggingInInterceptor as a
> >
> > starting point.
> >
> > >> I'm trying to log
> > >>
> > >> - the source (IP) address that originate the (SOAP) Message;
> > >> - the SOAP operation that was invoked.
> > >>
> > >> Any hints on how I can obtain either of these?
> > >>
> > >> I've tried adding the interceptor at various phases (RECEIVE,
> > >> PRE_INVOKE, INVOKE) and getting several values from the Messsage:
> > >> WSDL_OPERATION, WSDL_PORT, WSDL_SERVICE, INVOCATION_CONTEXT,
> > >> ENDPOINT_ADDRESS.  All these end up being null.
> > >>
> > >> Thanks!
> > >
> > > ----------------------------
> > > IONA Technologies PLC (registered in Ireland)
> > > Registered Number: 171387
> > > Registered Address: The IONA Building, Shelbourne Road,
> >
> > Dublin 4, Ireland
>
> ----------------------------
> IONA Technologies PLC (registered in Ireland)
> Registered Number: 171387
> Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
> Ireland



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog

Mime
View raw message