Hi At part 5 of this tutorial I can send a OK response. http://camel.apache.org/tutorial-example-reportincident-part5.html
On Mon, Jan 19, 2009 at 8:21 PM, Lars Ivar Igesund <[email protected]> wrote: > Hi! > > I have had a working CXF endpoint (server) connected to my route for a > short while now, but the service only had an in message and the route > looked like this: > > from (cxfEndpoint).process(new FooProcessor()).to ( "bean:FooHandler"); > > However, the caller of the service wants a response which is fairly > simple. OK if the processor (which I guess really should be transform > instead) succeeds, an error message describing the issue if it fails. > > So I defined an out message for the operation, and in the first test > (for OK), I expected to be able to do > > from (cxfEndpoint).process(new FooProcessor()).to ( > "bean:FooHandler").transform(constant(OK)); > > This does however fail in the handler step because the out message of > the exchange processed in the FooProcessor is no longer a FooMessage > (even if I do exchange.getOut().setBody(new FooMessage()); but rather > a CxfMessage. > > I always assume that I use the API wrong, but in this case the router > acts inconsistently depending on whether the exchange expects an out > message or not. I thought that the out message part where it is > returned to the originating endpoint only should happen at the end of > the route. > > As for the fault, I think I want to use the exchange.getFault() > message, but I had some trouble finding a WSDL example where such a > message is defined. > > Please help me suggest how the route should look, how to propagate the > messages correctly and properly and how to define the fault message > (in the WSDL). Actually, can I possibly just put an Exception instance into > the fault message? > > Best, > Lars Ivar > > -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/
