The following scenario was working with apache camel 2.14.0, spring-ws 1.5.9 and axiom 1.2.9
Scenario - When our soap service is called, it should optional return an error - This error should be in the response as soap fault
Problem detection
I already detected the problem: - The org.springframework.ws.soap.axiom.AxiomHandler(2.3.0) of Spring-WS does not create SOAPFault objects - The org.apache.axiom.soap.impl.llom.SOAPBodyImpl (1.2.15) no longer checks the local name of the element
Question It there a better way to handle the soap faults with apache camel?
- One possibility is to use throwException but than my log will contain a lot of stacktrace in case of a functional error
Snippet Below is snippet of the camel configuration
<camel:from uri="spring-ws:uri:/contextPath/soapServices?endpointMapping=#endpointMapping"/>
<camel:to uri="bean:someBean" />
<camel:choice>
<camel:when>
<camel:xpath>//error</camel:xpath>
<camel:to uri="xslt:transform_event_response_to_soapfault.xslt?saxon=true" />
</camel:when>
</camel:choice>
</camel:from>