You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by Tawfik <ta...@yahoo.com> on 2007/10/05 22:20:27 UTC
Access to the name of the method being called in an inbound
interceptor
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
--
View this message in context: http://www.nabble.com/Access-to-the-name-of-the-method-being-called-in-an-inbound-interceptor-tf4577419.html#a13066743
Sent from the cxf-issues mailing list archive at Nabble.com.
Re: Access to the name of the method being called in an inbound interceptor
Posted by Daniel Kulp <dk...@apache.org>.
soapMessage.getExchange().get(BindingOperationInfo.class)
will get you the BindingOperationInfo object from which you can get a
whole bunch of information, including the name.
Dan
On Friday 05 October 2007, 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
--
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727 C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog
Re: Access to the name of the method being called in an inbound interceptor
Posted by Willem Jiang <ni...@iona.com>.
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
>