Hi Willem,

thanks for your help!



willem.jiang wrote:
> 
> 
>> 1. My primary concern is, that in the case the server returns a
>> SOAPFault, I
>> can not extract the details of the fault. The SoapFault is thrown, and
>> the
>> corresponding onException clause is triggered, but according to the log
>> below, the detail attribute is null.
> As the detail is a element , if you want to get the message detail, you 
> should call fault.getDetail().getTextContent().
> 
ah, my bad. I mistook the [detail: null] output of the getDetail() as a null
detail, and dindn't go any further :(


willem.jiang wrote:
> 
>> 2. A second remark is, that the handleFault()  does not seem to have any
>> effect on the flow. The SoapFault is thrown regardless of it. I expected
>> it
>> to work similar to jbi faults: when it is present throw the exception,
>> otherwise just set the EXCEPTION_CAUGHT property on the exchange, and let
>> the flow continue.
> handleFault() just turn a fault message into exception so we can 
> leverage Camel error handler to deal with it.
> As camel-cxf just throw the exception out and didn't put the exception 
> into the fault message as JBI does, using the handleFault() will not 
> change anything in your case.
> 
Well, that is my point. 
In the case of jbi I was told that for a jbi fault, no exception is thrown,
and the causing jbi FaultException is set as a property of the exchange
(rather than as the exception of the exchange) -- so that one may continue
routing.
In an analog manner I expected cfx tu put the exception into the fault
message, and not to throw an SoapFault exception. Isn't this some kind
inconsistency? Or am I getting it all wrong?

On the other hand, if cxf does throw the SoapFault, shouldn't it set the
exception of the exchange (exchange.getException(), exchange.getFault()) ?





> 
> 3. My third question, isn't there a simple way to send a SOAP message with
> CXF? I mean I have the SOAPBody prepared (as string or
> org.w3c.dom.Document), and I expect cxf to wrap it in an envelope, and
> also
> return a SOAPBody. Do I really have to do the cumbersome payload
> conversions
> prior and after the request?
> 
You may take a look at the camel-soap[1] component, which just wrap the 
soap message for you and don't touch any other CXF stack, you can use it 
as a DataFormat[2]
[1]http://camel.apache.org/soap.html
[2]http://camel.apache.org/data-format.html

nice feature for 2.3! Too bad I'm stuck with camel2.2 as of
servicemix-camel-2010.01 :(

regards,
attilav

-- 
View this message in context: 
http://old.nabble.com/How-to-extract-SOAPFault-details-from-CXF-tp28739489p28753937.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to