我有這樣的駱駝航線:駱駝和CXF:如何獲取出站郵件?
from("cxf:bean:endpointDocs01?loggingFeatureEnabled=true")
.to("direct:CBR")
.transform().method(WebServiceUtils.class,"response()")
.log("Outbound message: ${body}");
endpointDocs01在藍圖定義是這樣的:
<cxf:cxfEndpoint address="/documentos/" id="endpointDocs01"
serviceClass="com.adelco.webservice.ServiceDocs" wsdlURL="wsdl/wsdl03.wsdl">
<cxf:properties>
<entry key="schema-validation-enabled" value="true"/>
</cxf:properties>
</cxf:cxfEndpoint>
這條路線的作品,沒有任何問題,包括架構驗證。
當我送一個正確的請求,我可以用交換的最後一行的「.LOG(」做「事」(在這種情況下記錄)出站消息:$ {機構}」在這種情況下,日誌顯示此:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<outputDocumento xmlns="http://webservice.adelco.com">
<respuesta>0</respuesta>
<mensaje>El mensaje [113282] fue recibido. Fecha recepción Wed Apr 12 17:01:11 CLT 2017</mensaje>
</outputDocumento>
</soap:Body>
</soap:Envelope>
但是,當我發送一個不正確的請求,該行」 .LOG(‘日誌傳出消息:$ {機構}’什麼也不做不過我得到了客戶端的響應(一肥皂:故障響應)
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>Unmarshalling Error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'Sociedad'. One of '{"http://webservice.adelco.com":TipoMovimiento}' is expected.</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
爲什麼這個soap:故障響應不是logge d?
你能更好地解釋一下你的捕捉是什麼意思? CXF具有用於記錄您可以打開的輸入和輸出的功能 –