Re: Calling dynamically multiple http endpoints

2009-05-15 Thread Claus Ibsen
Hi BTW You can also always just use a Processor and implement the failover logic yourself as pure Java with try .. catch and use the ProducerTemplate to send the exchange to the endpoint based on the URI. Something like ProducerTemplate template = // get it from CamelContext and get it once List

Re: Calling dynamically multiple http endpoints

2009-05-15 Thread Nasim Anza
Hi, I’ve tried this solution: I started by developing a processor that loops on URIs until getting a valid answer. The only problem is my route is interrupted at the end of the first processing, so no way to pass from first block (addressA) to next block (AddressB). The process() method loops on

Re: Calling dynamically multiple http endpoints

2009-05-15 Thread Claus Ibsen
Hi You should *not* route after your custom failover processor. You custom failover processor should be the end of the route (eg no more .to after your processor). On Fri, May 15, 2009 at 11:05 AM, Nasim Anza wrote: > Hi, > > I’ve tried this solution: > I started by developing a processor that

Re: Newbie: how to unmarshal and then route using object member value?

2009-05-15 Thread Willem Jiang
My bad, I should test the dsl before I click the send button. After digging the code , I confirmed that we don't support the expression(bean(MyBean.class, "isGradeA")) in current development version of Camel. I just added a JIRA[1] to trace it and will do a quick fix for that. Before that, you nee

Re: Calling dynamically multiple http endpoints

2009-05-15 Thread Nasim Anza
I I understood, the route should be similar to the folllowing : from("direct:endpointA") .setHeader(HttpProducer.HTTP_URI).simple("http://myAddressA ") .process(myFailOverProcessor("direct:endPointB")); from("direct:endpointB") .setHeader(HttpProducer.HTTP_URI).simple("http://

Camel Printing

2009-05-15 Thread Martin Gilday
Hi, This last week where I work we have made a Camel component for javax.print. Our use case is that we have a JMS queue where a customer ID is placed. The consumer of this generates a personalised PDF document by merging in their name, address etc. Then the filename is placed on another JMS qu

Re: Calling dynamically multiple http endpoints

2009-05-15 Thread Claus Ibsen
On Fri, May 15, 2009 at 11:58 AM, Nasim Anza wrote: > I I understood, the route should be similar to the folllowing : > > from("direct:endpointA") > .setHeader(HttpProducer.HTTP_URI).simple("http://myAddressA > ") > .process(myFailOverProcessor("direct:endPointB")); > > from("d

Re: Camel Printing

2009-05-15 Thread Peter Maas
I haven't actually searched for it... but would find the useful! On May 15, 2009, at 12:02 , Martin Gilday wrote: Hi, This last week where I work we have made a Camel component for javax.print. Our use case is that we have a JMS queue where a customer ID is placed. The consumer of this g

Re: Camel Printing

2009-05-15 Thread Jon Anstey
As far as interest goes, I think a lot of people would find this very useful. From my own experience I know message queuing + label printing is very popular in the manufacturing sector. Looking forward to more on this project! :) On Fri, May 15, 2009 at 7:32 AM, Martin Gilday wrote: > Hi, > > Th

Re: Camel Printing

2009-05-15 Thread Claus Ibsen
On Fri, May 15, 2009 at 2:37 PM, Jon Anstey wrote: > As far as interest goes, I think a lot of people would find this very > useful. From my own experience I know message queuing + label printing is > very popular in the manufacturing sector. Looking forward to more on this > project! :) And not t

DSL Strings pitfalls, how to avoid them?

2009-05-15 Thread uprooter
Hello all. My first camel ride was really fun, keep up the good work. I'm concerned about DSL strings. Specifying strings as methods/beans/pojos is something I'd like to avoid from two reasons: Let's say I have something like this in my code: from("jms").unmarshal(jaxb).choice().when().method("

Re: DSL Strings pitfalls, how to avoid them?

2009-05-15 Thread Claus Ibsen
On Fri, May 15, 2009 at 2:56 PM, uprooter wrote: > > Hello all. > My first camel ride was really fun, keep up the good work. > I'm concerned about DSL strings. > Specifying strings as methods/beans/pojos is something I'd like to avoid > from two reasons: > Let's say I have something like this in m

Re: DSL Strings pitfalls, how to avoid them?

2009-05-15 Thread Claus Ibsen
Hi See more in the bean binding wiki documentation http://camel.apache.org/bean-binding.html And this ticket is about if we should add some general annotation for hinting Camel which method to invoke https://issues.apache.org/activemq/browse/CAMEL-1005 On Fri, May 15, 2009 at 2:59 PM, Claus Ib

Re: DSL Strings pitfalls, how to avoid them?

2009-05-15 Thread uprooter
Thank you for your quick reply. I have only method(String) and method(String,String). Is it another version ? Or maybe I am missing something ? uprooter wrote: > > Hello all. > My first camel ride was really fun, keep up the good work. > I'm concerned about DSL strings. > Specifying strings a

Re: DSL Strings pitfalls, how to avoid them?

2009-05-15 Thread Claus Ibsen
On Fri, May 15, 2009 at 3:16 PM, uprooter wrote: > > Thank you for your quick reply. > I have only method(String) and method(String,String). > Is it another version ? > Or maybe  I am missing something ? They are being added as we speak. Willem Jiang spotted it this morning and have just commited

Re: DSL Strings pitfalls, how to avoid them?

2009-05-15 Thread uprooter
Funny .It must be something with the way I program :) I got started with camel just few hours ago and I already came across this ticket twice, from two different aspects. (see http://www.nabble.com/Newbie%3A-how-to-unmarshal-and-then-route-using-object-member-value--td23549158.html this ) I gues

Re: DSL Strings pitfalls, how to avoid them?

2009-05-15 Thread Willem Jiang
We deploy the snapshot[1] every day. I just committed the patch into the camel trunk, and will merge the change to camel 1.x branch. I suggest you try the Camel 2.0-snapshot first, since we are planing to do a Camel-2.0 M2 release in a week. [1]https://repository.apache.org/content/repositories/

Re: Newbie: how to unmarshal and then route using object member value?

2009-05-15 Thread Willem Jiang
Hi, Now the DSL choice().when().expression(bean(MyBean.class, "isGradeA")) ... is supported in Camel, please check out the last snapshot for it. You can also use this DSL choice().when().method(MyBean.class, "isGradeA")) ... to do the same thing :) You can find the unit test here. http://svn.ap

Re: Calling dynamically multiple http endpoints

2009-05-15 Thread Nasim Anza
Thanks Claus for answers. My processor is working fine and it finds the URL to invoke but the problem is on the last step : the next endpoint is not called with right XML input : Just to explain my actual problem : Let's assume that my route is : from("direct:endpointA") .setHeader(HttpProducer.