Maybe you can try those codes:
public class YourInterceptor extends AbstractPhaseInterceptor{
......
public void handleMessage(Message message){
...
String portName =
message.getExchange().getBinding().getBindingInfo().getService().getInterface().getName().toString();
...
}
......
}
Regards
Xilai Dai
-----Original Message-----
From: Fabio souza [mailto:[email protected]]
Sent: 2011-3-11 (星期五) 23:31
To: [email protected]
Subject: How to log service interface name?
Hi,
I am using cxf to build WS solutions and I'd like to log requests and
responses. I saw logging interceptors and I was trying to build something
similar. However, I would like to include the name of the service interface
(java) in the log output. I saw that there are several data that are
included in message and exchange objects, but I could not find that piece of
data. Is there a place where I can find it?
Thank you, very much!
--
Fábio
This message and any attachment (the "message") is intended solely for the
addressees and is confidential. If you receive this message by mistake, please
delete it and notify the sender immediately. Any use not in accordance with its
purpose, any out-spread or disclosure, either as a whole or partially, is
prohibited except with formal approval. Internet cannot guarantee the integrity
of this message, therefore Talend will not be liable for the message if
modified.