-
1. Re: Camel- CXF - Error Handling
davsclaus Mar 5, 2012 3:30 AM (in response to gauthamr)You can transform the message before sending to the JMS queue. And then afterwards transform the message to the fault message.
For example add a for that.
-
2. Re: Camel- CXF - Error Handling
gauthamr Mar 16, 2012 1:48 AM (in response to davsclaus)Hi,
Thanks for reply. I was able to transform accordingly to send to queue, but i am facing issues in setting the fault response.
I am actually invoking a bean implementing the exchange wherein I am trying to create a SOAPMessage.
I found an example for the same in : http://camel.apache.org/cxf-example.html
But I am finding it diffuclt to convert the exchanges's in body to a SOAPMessage i.e by the following:
SOAPMessage soapMessage = (SOAPMessage)exchange.getIn().getBody(List.class).get(0);
This is actually returning me a null but when i print out the exchange i can see the entire SOAP message.
So please help me out here, Am i doing anything wrong in the conversion?
Aslo I have an question, the exchange coming out of an cxf endpoint is of camel exchange message or of cxf exchange message? And is there any way I can convert from one to the other?
Thanks&Regards,
Gautham
-
3. Re: Camel- CXF - Error Handling
davsclaus Mar 17, 2012 5:28 AM (in response to gauthamr)Just get the plain body, and then work your way from there, what it really is
Object body = exchange.getIn().getBody();
And when you say printing a the message you can see the soap message? What do you see? XML data? If so that may be because the object has a toString method that prints it nicely in XML, or that the message is just plain XML etc.