Hello,

we have a system consisting of (web and other) clients and our backend (SOAP
web services). Now when we throw a Fault/Exception in a backend operation,
the SOAP fault looks like this:

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/";>
   <env:Header/>
   <env:Body>
      <env:Fault>
         <faultcode>env:Server</faultcode>
         <faultstring>An entity with the same ID already
exists</faultstring>
         <detail>
            <ns2:duplicateEntityFault
xmlns:ns2="http://www.example.com/example/";>
               <reason>Entity was not created. An entity with the same ID
already exists</reason>
            </ns2:duplicateEntityFault>
         </detail>
      </env:Fault>
   </env:Body>
</env:Envelope>

The client side uses the subelement "duplicateEntityFault" of "detail" to
generate the Exception class which we expect and catch
(DuplicateEntityFault_Exception).

So now we added Camel to the setup which routes requests to the backend. We
expected that if a Fault/Exception is thrown on the backend, Camel would
just pass it back to the client. But, no. Instead the client gets this:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
   <soap:Body>
      <soap:Fault>
         <faultcode>soap:Server</faultcode>
         <faultstring>HTTP operation failed invoking
http://www.example.com/example/example-service with statusCode:
500</faultstring>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>

So the problem is that there is no "detail" element in the fault message
from which the client can generate the Exception. Camel logs this:
Exhausted after delivery attempt: 1 caught:
org.apache.camel.component.http.HttpOperationFailedException: HTTP operation
failed invoking http://www.example.com/example/example-service with
statusCode: 500

Could you please tell us what is missing or what we do wrong?
Thanks in advance,

Sebastian

--
View this message in context: 
http://camel.465427.n5.nabble.com/Missing-detail-element-in-SOAP-fault-tp4913512p4913512.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to