cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Liu, Jervis" <j...@iona.com>
Subject RE: Obtaining source address and operation name
Date Fri, 31 Aug 2007 02:33:06 GMT
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

Mime
View raw message