2014-02-20 61 views
0

這是事情: 我想通過cxf與自定義驗證事件處理程序設置架構驗證。 我的配置看起來是這樣的:通過ValidationEventHandler記錄SOAP消息

<cxf:cxfEndpoint id="personEndpoint" address="/person" 
    serviceClass="org.apache.servicemix.samples.wsdl_first.Person" 
    wsdlURL="wsdl/person.wsdl"> 
    <cxf:properties> 
     <entry key="schema-validation-enabled" value="true" /> 
     <entry key="jaxb-validation-event-handler"> 
      <bean class="org.dpytel.servicemix.camel.MyCustomHandler" /> 
     </entry> 
    </cxf:properties> 
</cxf:cxfEndpoint> 

這是工作的罰款 - 模式驗證被選中,遇到錯誤時,「MyCustomHandler」得到執行。 我的問題是我想保存導致驗證錯誤的整個消息到一個文件,但在「MyCustomHandler」裏面我沒有這個信息可用(只有一些錯誤信息和位置)

是否有一些用cxf驗證模式的其他方法,並在出現錯誤時記錄消息?

回答