Re: onException and .process()

2010-08-30 Thread Morten Engel
Well, what I really want to do is something along the lines of editing the body, to include both the original content, as well as info on the exception, along the lines of: public void process(Exchange exchange) { Message in = exchange.getIn(); Exception ex = exchange.getException(); in.

SMPP type connection.

2010-08-30 Thread Pavel Suhotyuk
Hello, I have to connect to SMS center with "transceiver" connection type. I've supposed that "systemType" parameter is exactly responsible for that, but my SMS provider told me that this parameter must not be set at all. For now, how i should properly configure camel-smpp plugin for transmitter

Re: onException and .process()

2010-08-30 Thread Claus Ibsen
Hi It works fine. The problem you have is that you handle the exception, which cases the exchange.getException() to return null. See this unit test how to get the caused exception as a property http://svn.apache.org/viewvc?rev=990770&view=rev On Mon, Aug 30, 2010 at 10:24 AM, Morten Engel wro

Re: SMPP type connection.

2010-08-30 Thread Willem Jiang
Hi, camel-smpp is using the jsmpp[1] to talk to SMS center. Can you try to use it to set the connection type, then we can put this option into camel-smpp. [1]http://code.google.com/p/jsmpp/ Willem Pavel Suhotyuk wrote: Hello, I have to connect to SMS center with "transceiver" connection typ

InOut problem

2010-08-30 Thread Muhammad Ichsan
I have the following routes: http://pastebin.ca/1929016 If the link is broken, see the following: The problem is, if I uncomment the XML comment 'Problem cause', the route will be error. Unpredicted behaviour occurs. Why this happens? This bean:interMessa

TimeoutAwareAggregationStrategy access to Exchange properties

2010-08-30 Thread Marco Crivellaro
Hello, is there a way to access the exchange properties within the timeout callback of TimeoutAwareAggregationStrategy associated to a recipientList? I can use the oldExchange parameter but if the all the endpoints defined in the recipienList runs in timeout this value is set to null. -- View

Re: onException and .process()

2010-08-30 Thread Morten Engel
Thank you very much Claus! Got it working now. -- View this message in context: http://camel.465427.n5.nabble.com/onException-and-process-tp2740331p2796799.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: onException and .process()

2010-08-30 Thread Claus Ibsen
On Mon, Aug 30, 2010 at 3:53 PM, Morten Engel wrote: > > Thank you very much Claus! > > Got it working now. Good. But if you had the Camel book, then you could have found a working sample in section 5.4.4 which shows you exactly what you are doing. > -- > View this message in context: > htt

Re: TimeoutAwareAggregationStrategy access to Exchange properties

2010-08-30 Thread Claus Ibsen
On Mon, Aug 30, 2010 at 3:52 PM, Marco Crivellaro wrote: > > Hello, is there a way to access the exchange properties within the timeout > callback of TimeoutAwareAggregationStrategy associated to a recipientList? > > I can use the oldExchange parameter but if the all the endpoints defined in > the

Re: TimeoutAwareAggregationStrategy access to Exchange properties

2010-08-30 Thread Claus Ibsen
Hi I have committed a fix on trunk for this. Now you get the original Exchange if there hasn't been done any aggregation at all. On Mon, Aug 30, 2010 at 5:02 PM, Claus Ibsen wrote: > On Mon, Aug 30, 2010 at 3:52 PM, Marco Crivellaro > wrote: >> >> Hello, is there a way to access the exchange p

(newbie) process() method eating Exchange packet

2010-08-30 Thread Glen Mazza
Hello, the following route makes SOAP client calls and places the SOAP responses in files in the given testfile folder: public void configure() { from("jms:queue:numbersToDouble") .process(new SOAPMessagePreparer()) .to(CXF_URI) //.process(new SOAPResponseReader()) .to(

Re: Add header for each message

2010-08-30 Thread senthil.arumugam
Hi Willem, I thank you for your reply. That was a way we were thinking, using which we can differentiate various messages and route them as needed. Now we have achieved it by wrapping the actual message with another object of type Message which use generics to return the entity and holds a value

Re: Problem with cron expression configuration in camel-context with spring

2010-08-30 Thread Hadrian Zbarcea
Hi, Try this: uri="quartz://sample/trigger1?job.name=sampleJob&cron=0+0/5+*+?+*+1-7" or even: uri="quartz://sample/trigger1?cron=0+0/5+*+?+*+1-7" Note the double slashes after "quartz:" and the spaces replaced with '+'. it seems to me that the job name is not set properly anyway, and I am looking

Re: (newbie) process() method eating Exchange packet

2010-08-30 Thread Willem Jiang
Hi Glen, That's because your SOAPResponseReader consumer the response. you just need to put the Body back as a string like this public class SOAPResponseReader implements Processor { @Override public void process(Exchange e) { String response = e.getIn().getBody(String.class);

Re: (newbie) process() method eating Exchange packet

2010-08-30 Thread Glen Mazza
Thanks, Willem, but why would String response = e.getIn().getBody(String.class); consume the response? Why does Camel delete the response when you call getBody()? Also, for your second solution, why does converting the Body to a String result in the above call *not* consuming it anymore? Cam

Re: Problem with cron expression configuration in camel-context with spring

2010-08-30 Thread senthil.arumugam
Hi Hadrian, Thanks for your quick response. When I use like how you suggested and I got it working fine, Thank you. But I would like to know the significance in using '//' after quartz. If I don't use it, I am getting the following exception. It occurs when I use '?' in the cron expression. Ca

Re: Add header for each message

2010-08-30 Thread Willem Jiang
senthil.arumugam wrote: Hi Willem, I thank you for your reply. That was a way we were thinking, using which we can differentiate various messages and route them as needed. Now we have achieved it by wrapping the actual message with another object of type Message which use generics to return the

Re: Problem with cron expression configuration in camel-context with spring

2010-08-30 Thread Hadrian Zbarcea
The job name is properly set now (see https://issues.apache.org/activemq/browse/CAMEL-3091) and if not set it defaults to "quartz-{endpoint.getId()}". The rest should work and I'll try get the double slash issue resolved. It's not a big deal, but components should behave consistently wether the

Re: (newbie) process() method eating Exchange packet

2010-08-30 Thread Willem Jiang
Glen Mazza wrote: Thanks, Willem, but why would String response = e.getIn().getBody(String.class); consume the response? Why does Camel delete the response when you call getBody()? No, Camel didn't delete the response. It's just because the body instance is an instance of InputStream, and it

Re: Problem with cron expression configuration in camel-context with spring

2010-08-30 Thread Hadrian Zbarcea
Yeah, it's a parameter parsing and url normalizing issue, I'll have to look into. But you are correct, that is the wrong, unexpected but consistent and predictable outcome of not having the double slashes. Not nice, I know but it's easy to avoid it. Watch the CAMEL-3091 issue for more details (

Re: Add header for each message

2010-08-30 Thread senthil.arumugam
Hi Willem, Our use case is, we need to save or update the entity. For eg, We have a message of instance Foo and we need to decide whether the instance to be saved or updated etc. This behavior is common across all the messages. So we are wrapping Foo (actual message entity) with SampleMessage

Re: Add header for each message

2010-08-30 Thread senthil.arumugam
Hi Willem, I am using Camel 2.4.0 and let me try the same with 2.5-SNAPSHOT as you mentioned and update the same once I am done. Thanks, - SK -- View this message in context: http://camel.465427.n5.nabble.com/Add-header-for-each-message-tp2651224p2797607.html Sent from the Camel - Users mailin

Error using inOut pattern

2010-08-30 Thread Muhammad Ichsan
Dear All I have problem related to inOut in my attachment. The problem is that, Exchange.getIn().getBody() is null after inOut invocation. This problem doesn't occur if I do not have any after activemq:mm01.rin Thanks for your guidance. -- ~The best men are men who benefit