Я пишу перехватчик для тестирования. Но я получаю, что тело сообщения Soap в перехватчике всегда равно null.
Мой Cxf - это Apache-CXF-2.4.0
bean.xml выглядит следующим образом:
<cxf:bus>
<cxf:outInterceptors>
<ref bean="myOutSoapInterceptor"/>
</cxf:outInterceptors>
</cxf:bus>
Файл перехватчика:
public class MySoapInterceptorImpl extends AbstractSoapInterceptor implements IMySoapInterceptor {
public MySoapInterceptorImpl()
{
super(Phase.WRITE );
addAfter(SoapOutInterceptor.class.getName());
}
public void handleMessage(SoapMessage msg) throws Fault {
// TODO Auto-generated method stub
String soapContent ;
SOAPMessage sm = msg.getContent(SOAPMessage.class);
/*sm is always null!*/
}
}