Re: Can not resolve simple un http uri

2014-05-22 Thread sergarci
Thanks it works well! -- View this message in context: http://camel.465427.n5.nabble.com/Can-not-resolve-simple-un-http-uri-tp5751434p5751454.html Sent from the Camel - Users mailing list archive at Nabble.com.

recipientList and ExchangePattern do not work

2014-05-22 Thread damien
Hi, I'm using recipientList and set the exchange pattern to InOnly. It looks like this: It failed because of the error: org.apache.camel.ExchangeTimedOutException: The OUT message was no

Re: recipientList and ExchangePattern do not work

2014-05-22 Thread Claus Ibsen
Hi The code you show and the message history are not the same. I guess you just setExchangePattern=InOnly on the which is not the same. The JMS consumer will use InOnly or InOut depending on the JMS message has a JMSReplyTo or not. There is some options you can use to force disabling that http:/

validate properties (from .cfg) in blueprint routes

2014-05-22 Thread Jv Naidu
I have defined property placeholder in blueprint.xml of osgi bundle. and i have myappconfig.cfg placed in etc folder of servicemix. This is working as expected as i have been using like Now i would like to validate properties if property1 doesnt exist then use property2 ? and also i have

RE: Java DSL question

2014-05-22 Thread Glattfelder, Beat
Correct, but I need to call the get method on the body Object which is a HashMap like in the following example. msg.getBody(Map.class).get("user_name")); But the body() method returns a ValueBuilder Object so the following code won't compile setHeader("uid").body(String.class) .get("user_name

recipientList together with UseLatestAggregationStrategy results in original in message to be returned

2014-05-22 Thread nbertram
I am using the recipientList to forward a message to a dynamic vm:// endpoint. I also enabled parallel processing and specified the UseLatestAggregationStrategy in the hope to get the response message from the last consumer. However what I observe is that the message is sent to the dynamic recipie

Problem in WS url with params

2014-05-22 Thread sergarci
Hi I have a root that looks like this: GET http://localhost:7001/wsUrl?param=${body.prop1}¶m=${body.prop2} This reads a csv file line by line, parses each line to a class and then try to call to a WS using some

Re: Endpoint exception handling

2014-05-22 Thread rams
Hi, Here you used two methods of same name handleEndpointException(). Out of these two which one should use in someService class to handle endpoint exception. Could you please provide complete example for my understanding? Thanks Ram -- View this message in context: http://camel.465427.n5

Camel lock while multiple routes polling from same file endpoint

2014-05-22 Thread Jishnu
There exist a scenario where multiple routes are polling from same folder .And when a file is locked by one route the other route gives an IOEXception and moves on to the next file to poll. Is there any way i could bypass the Exception throwing by setting any attribute. -- View this message i

Re: Camel lock while multiple routes polling from same file endpoint

2014-05-22 Thread Claus Ibsen
Hi Look at the various read lock options you can use http://camel.apache.org/file2 On Thu, May 22, 2014 at 1:12 PM, Jishnu wrote: > There exist a scenario where multiple routes are polling from same folder > .And when a file is locked by one route the other route gives an IOEXception > and mov

Compound expression for idempotent consumer

2014-05-22 Thread David Karlsen
Hi. I'm wanting to setup a idempotent consumer, but combine several expressions as the key. (an xpath-expression on the payload + a property set on the exchange. Is this possible? //somens:MsgId/text() <--only xpath - works, but: <--how can I use this to combine several expressions? //somens

Re: Compound expression for idempotent consumer

2014-05-22 Thread Claus Ibsen
Hi Not so easy in pure XML. Write a java bean with a method and do whatever you want there. There is ExpressioBuilder to combine them using and/or etc. On Thu, May 22, 2014 at 3:27 PM, David Karlsen wrote: > Hi. > > I'm wanting to setup a idempotent consumer, but combine several expressions > as

Re: MQTT component topic header missing

2014-05-22 Thread Claus Ibsen
Hi Yeah we should maybe add a header to the Camel message from the MqttConsumer with the topic destination name from MQTT. Fell free to log a JIRA ticket. MQTTDestination or something could be the header name. On Tue, May 20, 2014 at 1:20 PM, Carlo Simeone wrote: > Hi, > I'm using the Camel M

gauth uses oauth version 1 or 2?

2014-05-22 Thread Camel Guy
Hello, For Camel 2.13.1, does the gauth component use version 1 or 2? If 1, are there plans to upgrade? Thank you

org.apache.camel.TypeConversionException: Error during type conversion from type: org.apache.camel.component.file.GenericFile to the required type

2014-05-22 Thread Wilkerson, Daniel
Hi everyone. I working on a data integration prototype/proof-of-concept using Camel 2.12, Fuse 7.1, Smooks 1.5.2, and ActiveMQ 5.9. I'm stuck currently in a unit test I'm writing to test binding an CSV file read from the file system using the file:// component and passed to smooks for transformi

Re: org.apache.camel.TypeConversionException: Error during type conversion from type: org.apache.camel.component.file.GenericFile to the required type

2014-05-22 Thread Claus Ibsen
Hi Add a before the smooks so the data is in a format that smooks can read. On Thu, May 22, 2014 at 4:55 PM, Wilkerson, Daniel wrote: > Hi everyone. I working on a data integration prototype/proof-of-concept using > Camel 2.12, Fuse 7.1, Smooks 1.5.2, and ActiveMQ 5.9. I'm stuck currently in

Re: org.apache.camel.TypeConversionException: Error during type conversion from type: org.apache.camel.component.file.GenericFile to the required type

2014-05-22 Thread Wilkerson, Daniel
Thank you for the quick reply Claus. I sincerely appreciate it. I placed the ahead of the Smooks as you mentioned but get a strange error that I suspect is BOM characters at the beginning of the CSV file. Is there a quick, clever way to strip BOM characters in a route before passing along to the

Email Error on Route Exception

2014-05-22 Thread Matt Raible
Hello all, I'm getting up to speed on Apache Camel and trying to replace a "message flow" that was originally written for IBM Message Broker 6.1. The flow involves receiving input from a SOAP service, looking up a value in a database, and returning that to the client (again, via SOAP). I have a ro

Re: org.apache.camel.TypeConversionException: Error during type conversion from type: org.apache.camel.component.file.GenericFile to the required type

2014-05-22 Thread Claus Ibsen
Hi Are you sure smooks is reading it as a CSV as the code failure is in sax which is usually about XML. Btw an alternative to smooks is beanio which I find good http://camel.apache.org/beanio http://beanio.org/ On Thu, May 22, 2014 at 5:34 PM, Wilkerson, Daniel wrote: > Thank you for the quick

Re: recipientList together with UseLatestAggregationStrategy results in original in message to be returned

2014-05-22 Thread Claus Ibsen
Hi What is the MEP of the Exchange you send to the vm. If its InOnly it would not wait for the exchange to be processed. You would need InOut for that. See about that at seda (as vm extends seda) http://camel.apache.org/seda On Thu, May 22, 2014 at 11:26 AM, nbertram wrote: > I am using the rec

Re: org.apache.camel.TypeConversionException: Error during type conversion from type: org.apache.camel.component.file.GenericFile to the required type

2014-05-22 Thread Wilkerson, Daniel
I just tripped on that idea while looking over my code more and searching the net. Had a duh moment…been having a few of those the past couple of days. lol. Switched to the CSV Reader and the message went away. The only problem now is my CSV field names don't match the names of the member variable

Re: Camel lock while multiple routes polling from same file endpoint

2014-05-22 Thread Reji Mathews
Hi Jishnu What exactly is the business requirement ? On 22/05/2014 5:29 pm, "Jishnu" wrote: > There exist a scenario where multiple routes are polling from same folder > .And when a file is locked by one route the other route gives an > IOEXception > and moves on to the next file to poll. Is th

Idempotent inconsistencies

2014-05-22 Thread David Karlsen
IdempotentConsumer demands that the messageId is a string: final String messageId = messageIdExpression.evaluate(exchange, String.class); if (messageId == null) { throw new NoMessageIdException(exchange, messageIdExpression); } boolean newKey; if (eager

Re: EventNotifierSupport in all contexts

2014-05-22 Thread Chubutin
Thank you Charles and Claus! I supposed there was a mechanism to intercept all the registrations of t he Camel Contexts. I'll try with a notifier bean as a osgi service and a implementation of Activation to register that bean in all the contexts. If all goes well my solution will be posted here, or

Re: Email Error on Route Exception

2014-05-22 Thread Matt Raible
I figured out a solution for this. First of all, I changed my route to be a Spring bean so dependency injection would work: @Component public class FooRoute extends RouteBuilder { } Then I changed my Camel configuration to use Spring annotations and @ComponentScan. I also configured things so p

How to Implment Informative Transactional Error Handling?

2014-05-22 Thread kraythe .
Greetings, I have many routes that read from AMQ queues and write to other AMQ queues. For error handling I have been using the following paradigm: from("activemq:queue:inbox") .onException(Exception.class).useOriginalMessage().handled(handled).maximumRedeliveries(0) .setHeader(Exchange.FAILURE

Re: Email Error on Route Exception

2014-05-22 Thread Charles Moulliard
Matt, You ca retrieve using ${body} and ${headers.} within the freemarker template ( https://github.com/apache/camel/blob/master/components/camel-freemarker/src/test/resources/org/apache/camel/component/freemarker/letterWithoutHeader.ftl#L21) the content of your body or headers/properties like

Re: Idempotent inconsistencies

2014-05-22 Thread Charles Moulliard
You are right. The type define in the interface is but unfortunately in the code, we are using as type 1) constructor of idempotentconsumer defines the type as String public IdempotentConsumer(Expression messageIdExpression, IdempotentRepository idempotentRepository,

Re: Idempotent inconsistencies

2014-05-22 Thread Claus Ibsen
Hi I think its historical reasons with using strings first in Camel. You are welcome to log a ticket to get this improved in a future release On Thu, May 22, 2014 at 9:12 PM, David Karlsen wrote: > IdempotentConsumer demands that the messageId is a string: > > final String messageId = messageId

Re: Email Error on Route Exception

2014-05-22 Thread Claus Ibsen
Hi Yeah a good idea is to check the unit tests for camel-freemarker for examples. Also take a note that Camel stores various information from the Exchange etc. and provides that to freemarker in the process method. https://github.com/apache/camel/blob/master/components/camel-freemarker/src/main/j