cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <ning.ji...@iona.com>
Subject Re: Access to the name of the method being called in an inbound interceptor
Date Mon, 08 Oct 2007 02:42:51 GMT
Hi ,

You definitely can get the operation name from the interceptor.
Here you are the sample codes for getting the service informations from 
the message.
     
        Exchange ex = message.getExchange();
        Service service = ex.get(Service.class);
        OperationInfo opInfo = ex.get(OperationInfo.class);
        Endpoint endpoint = ex.get(Endpoint.class);
        serviceName = service.getName();
        operationName = opInfo.getName();
        EndpointInfo ei = endpoint.getEndpointInfo();
        portName = ei.getName();

Willem.

Tawfik wrote:
> I am trying to migrate from xfire to cxf.  Is there a way to know from
> whithin an interceptor which web service method was called?  In xfire it was
> somthing like
>
> soapMessage.getExchange().getOperation().getName()
>
> but in cxf I can't find a way to do the same thing...
>
> Thanks
>   

Mime
View raw message