Re: Modifying SOAP:Fault errors raised by endpoints

2010-03-19 Thread Claus Ibsen
On Fri, Mar 19, 2010 at 8:04 AM, Jim Talbut wrote: > Thanks Claus, but that still doesn't let me do what I want and is > inefficient. > We love contributions. See feel free to go ahead and create a patch and attach it to a JIRA. And we love more when the patch have unit tests :) http://camel.apa

Re: Modifying SOAP:Fault errors raised by endpoints

2010-03-19 Thread Jim Talbut
Thanks Claus, but that still doesn't let me do what I want and is inefficient. What it won't let me do: I want to be able to correlate the "out" trace with the "in" trace, in one database row without commiting the row until the route has completed. This requires a JPA transaction to exist aroun

Re: Modifying SOAP:Fault errors raised by endpoints

2010-03-17 Thread Claus Ibsen
Hi Looks like the getTracedExchange method was removed a bit later. I have adde a ticket to track this https://issues.apache.org/activemq/browse/CAMEL-2556 On Wed, Mar 17, 2010 at 7:06 PM, Jim Talbut wrote: > I'm sorry, but I'm afraid I must be missing something. > You say "just use your own J

Re: Modifying SOAP:Fault errors raised by endpoints

2010-03-17 Thread Jim Talbut
I'm sorry, but I'm afraid I must be missing something. You say "just use your own JPA code to persist the message" like it's a simple thing to do, but it doesn't appear to be. The out of the box TraceInterceptor hard codes the canonical name of the class that it's loading, and loads it excplic

Re: Modifying SOAP:Fault errors raised by endpoints

2010-03-13 Thread Claus Ibsen
You can just use your own JPA code to persist the message instead of the out of the box feature. On Sat, Mar 13, 2010 at 9:54 AM, Jim Talbut wrote: > On 13/03/2010 07:36, Claus Ibsen wrote: >> >> On Sat, Mar 13, 2010 at 8:27 AM, Jim Talbut >>  wrote: >> >>> >>> Willem, >>> >>> Ah. >>> I still h

Re: Modifying SOAP:Fault errors raised by endpoints

2010-03-13 Thread Jim Talbut
On 13/03/2010 07:36, Claus Ibsen wrote: On Sat, Mar 13, 2010 at 8:27 AM, Jim Talbut wrote: Willem, Ah. I still have no idea how the TypeConverter is being called, but it's working great :). I can make my SOAP:Fault converter into an interceptor, which has the benefit of making the routes

Re: Modifying SOAP:Fault errors raised by endpoints

2010-03-12 Thread Claus Ibsen
On Sat, Mar 13, 2010 at 8:27 AM, Jim Talbut wrote: > Willem, > > Ah. > I still have no idea how the TypeConverter is being called, but it's working > great :). > > I can make my SOAP:Fault converter into an interceptor, which has the > benefit of making the routes simpler and thus more understanda

Re: Modifying SOAP:Fault errors raised by endpoints

2010-03-12 Thread Jim Talbut
Willem, Ah. I still have no idea how the TypeConverter is being called, but it's working great :). I can make my SOAP:Fault converter into an interceptor, which has the benefit of making the routes simpler and thus more understandable by my clients. However if I do so the Tracer (using JPA)

Re: Modifying SOAP:Fault errors raised by endpoints

2010-03-09 Thread Willem Jiang
Hi Jim, I'm already committed a patch[1] for the issue, and I just change the CxfPayLoad class's toString() method. If you want to do some customer change on that , you just need to add TypeConverter[2] to turn the CxfPayLoad object into String. [1]http://svn.apache.org/viewvc?rev=920708&view

Re: Modifying SOAP:Fault errors raised by endpoints

2010-03-09 Thread Jim Talbut
Thanks Willem. Whilst that change will solve my particular problem, wouldn't it be better to have a more generic way to specify how the message should be formatted? Something like the equivalent of the formatter that can be passed in for the log messages? I'm happy to have a look at doing a p

Re: Modifying SOAP:Fault errors raised by endpoints

2010-03-08 Thread Willem Jiang
Hi Jim, It should be easy to implement your requirement by adding a type converter which can help use turn the List into a String. I filled a JIRA[1] for it. [1]https://issues.apache.org/activemq/browse/CAMEL-2531 Willem Jim Talbut wrote: Thank Willem, The first problem I've found with usi

Re: Modifying SOAP:Fault errors raised by endpoints

2010-03-08 Thread Jim Talbut
Thank Willem, The first problem I've found with using PAYLOAD is that the Tracer (which I was using with JPA) is no longer logging the full message contents. This is because it calls toString on the inbound message, but that is now a CxfPayload, which contains a List and Element.toString() doe

Re: Modifying SOAP:Fault errors raised by endpoints

2010-03-07 Thread Willem Jiang
Hi Jim, In MESSAGE DataFormat, camel-cxf endpoint will not read the Message detail information, it just redirect the input stream. PAYLOAD and POJO DataFormat will give you the exception that you want. Willem Jim Talbut wrote: On 07/03/2010 20:08, Jim Talbut wrote: exchange.getIn().On 07/

Re: Modifying SOAP:Fault errors raised by endpoints

2010-03-07 Thread Jim Talbut
On 07/03/2010 20:08, Jim Talbut wrote: exchange.getIn().On 07/03/2010 07:05, Claus Ibsen wrote: Hi You can enable the soapFault=true on the CamelContext which turns faults into exceptions. Or you can simply add a processor step at the end of your route, and check if the exchange is a fault

Re: Modifying SOAP:Fault errors raised by endpoints

2010-03-07 Thread Jim Talbut
exchange.getIn().On 07/03/2010 07:05, Claus Ibsen wrote: Hi You can enable the soapFault=true on the CamelContext which turns faults into exceptions. Or you can simply add a processor step at the end of your route, and check if the exchange is a fault public void process(Exchange exchange) { b

Re: Modifying SOAP:Fault errors raised by endpoints

2010-03-07 Thread Claus Ibsen
Yeah See void setHandleFault(Boolean handleFault); on RuntimeConfiguration which CamelContext extends. So you can do in a Java DSL route builder context.setHandleFault(true); from("direct:start").to("log:foo").to("log:bar").to("mock:result"); Or you can enable it on a per

Re: Modifying SOAP:Fault errors raised by endpoints

2010-03-07 Thread Willem Jiang
Hi Claus, I didn't find there is a soapFault option int he CamelContext or cxfEndpoint URI. BTW, There is HandleFault InterceptStrategy, which could be used to turn a fault message into a exception. Here is the DSL for configure it public void configure() throws Exception { HandleFault

Re: Modifying SOAP:Fault errors raised by endpoints

2010-03-07 Thread Claus Ibsen
On Sun, Mar 7, 2010 at 8:05 AM, Claus Ibsen wrote: > Hi > > You can enable the soapFault=true on the CamelContext which turns > faults into exceptions. > > Or you can simply add a processor step at the end of your route, and > check if the exchange is a fault > > public void process(Exchange excha

Re: Modifying SOAP:Fault errors raised by endpoints

2010-03-07 Thread Christian Schneider
Hi, if you are using the Camel transport for CXF then I have an idea what the problem could be. By default the cxf transport for camel does not handle faults as exceptions. You have to manually add a CamelTransportFactory and configure it like described in http://camel.apache.org/camel-transp

Re: Modifying SOAP:Fault errors raised by endpoints

2010-03-06 Thread Claus Ibsen
Hi You can enable the soapFault=true on the CamelContext which turns faults into exceptions. Or you can simply add a processor step at the end of your route, and check if the exchange is a fault public void process(Exchange exchange) { boolean isFault = exchange.hasOut() && exchange.getOut().isF