Исходящий перехватчик CXF получает тело ответа мыла, которое всегда равно нулю?

Я пишу перехватчик для тестирования. Но я получаю, что тело сообщения 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!*/
    }
 }
6
задан Josh Darnell 3 January 2012 в 20:13
поделиться