Hi,
Can you try the latest Camel 2.8-SNAPSHOT, I think this issue may relate
to CAMEL-3792[1] which is fixed in Camel 2.8-SNAPSHOT.
[1]https://issues.apache.org/jira/browse/CAMEL-3792
Willem
On 3/30/11 9:46 AM, hyjshanghai wrote:
I found the answer finally - returning SOAP response with empty body is
caused by using the "try ... catch .. finally" camel DSL.
I regret not having mentioned using this DSL in previous posts.
According to my test, in the following, Route A returns a non-empty SOAP
message to the client correctly; Route B will return a SOAP message with
empty body, which is the wrong case I asked for help previously:
(Note that I replaced the< and> symbols with parentheses.)
Route A:
(camel:camelContext id="camelContext")
(camel:route streamCache="true")
(camel:from uri="cxf:bean:serviceEndpoint" /)
(camel:process ref="dummyProcessor" /)
(camel:process ref="endProcessor" /)
(/camel:route)
(/camel:camelContext)
Route B:
(camel:camelContext id="camelContext")
(camel:route streamCache="true")
(camel:from uri="cxf:bean:serviceEndpoint" /)
(camel:doTry)
(camel:process ref="dummyProcessor" /)
(camel:doCatch)
(camel:exception)java.lang.Exception(/camel:exception)
(camel:handled)
(camel:constant)true(/camel:constant)
(/camel:handled)
(camel:process ref="errorProcessor" /)
(/camel:doCatch)
(camel:doFinally)
(camel:process ref="endProcessor" /)
(/camel:doFinally)
(/camel:doTry)
(/camel:route)
(/camel:camelContext)
In the above, dummyProcessor and errorProcessor have empty process() method;
endProcessor set the response to client by
exchange_.getOut().setBody(cxfPayload).
Why Route B returns empty SOAP message while Route A does not?
--
View this message in context:
http://camel.465427.n5.nabble.com/How-to-Get-SOAP-Response-from-the-Last-Camel-Processor-in-the-Route-tp4127850p4270601.html
Sent from the Camel - Users mailing list archive at Nabble.com.
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang