Re: How do I change message body without changing response status

2013-05-14 Thread kalyan
Thank you for the reply Claus. However, the HTTP response code received is not constant. It changes with the input url (like 400, 404, 500, 503 etc). handled(true) is changing it to 200. Is there a way to preserve the response code with out getting to know its value ? -- View this message in

Re: How do I change message body without changing response status

2013-05-14 Thread kalyan
I'm sorry.. but I have just found the solution. what I needed was: HttpOperationFailedException ex = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, HttpOperationFailedException.class); ex.getStatusCode(); Thank you. -- View this message in context:

How to make route wait for aggregator to aggregate?

2013-05-14 Thread Paulius Gasėnas
Hi guys, I‘m new to this forum. We have an issue with multicast and aggregation. Before calling route direct:putEvent, header correlationId is also set, so correlation is working. Goal, that we are trying to achieve here, is that we need, that after message is sent to routeX, which sends

Re: Simple Example of Using Redis Subscriber Doesn't work

2013-05-14 Thread Claus Ibsen
Hi Thanks for letting us know. I can see there is a 1.0.4 release of spring-data-redis. I wonder if that release works out of the box? On Mon, May 13, 2013 at 10:11 PM, soumya_sd soumya...@yahoo.com wrote: I've posted a solution on the stackoverflow thread in case someone needs it in the

Re: Numbers of lines in a flat file

2013-05-14 Thread Claus Ibsen
Hi Seems a bit overkill to use EIP patterns to count the number of lines in a file. Maybe use a java method call for that instead with code to read the lines, and then at the end you can append the data also

JSON to POJO using Apache Camel and hibernate

2013-05-14 Thread bartleemans
Apache camel is using a route wich is listening to a specific url. the json from this url is then transformed to pojo classes and inserted in a mySQL database. Everything is working fine, except my foreign key still remains null. I'm using spring framework btw. Here is the url where you can find

Re: Slow startup of routes

2013-05-14 Thread Claus Ibsen
Hi Your design is probably not good when you need to create a new route to process each message. Instead reuse the route(s) and use the dynamic EIPs if you need to process the messages a bit differently. http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html On Sun, May 12, 2013 at 9:10

Re: Steps to replace a direct call by a JMS proxy?

2013-05-14 Thread Christian Schneider
There is one additional thing you need. You have to call your route in some way. There are two methods: 1. camelContext.createProducerTemplate().sendBody or similar 2. pojo messaging: http://camel.apache.org/pojo-messaging-example.html Depending on your application it may make sense to use

Re: Slow startup of routes

2013-05-14 Thread hussainpirosha
Thanks Claus for pointing out the mistake. Changed the design to have a single route per protocol and now using the dynamic EIP pattern to pass in the endpoint url and other parameters. The new route looks like : from(direct:http) .recipientList(simple(http:${header.url}?

Re: Streaming a PDF from remote machine

2013-05-14 Thread Chinababu Illa
Thanks Willem. A bit more details on the problem. There are 3 applications involved in this issue. FrontEnd, Link and Host. Link sits between FrontEnd and Host. When FrontEnd sends a request (http post) to Link it in turn sends a request to Host and also creates two streams one to read from Host

Re: onException: Global declaration at CamelHttpTransportServlet

2013-05-14 Thread Claus Ibsen
No you would need to create a base class, and have the onException in that base class. And then extend your base class and call super.configure(). (i.e. OO inheritence) then you can have it for all your routes. On Mon, May 13, 2013 at 8:00 PM, kalyan register.kal...@gmail.com wrote: When a

Re: How to persist data from aggregator?

2013-05-14 Thread Claus Ibsen
Hi See this EIP http://camel.apache.org/composed-message-processor.html And use the splitter with the aggregation repository. Then you can aggregate them easily back again in the same route. On Mon, May 13, 2013 at 7:10 PM, RTernier ryan_tern...@hotmail.com wrote: I'm having an issue with

QueryParam value with (ampersand)

2013-05-14 Thread jamalissimo
Hi guys, I am working on file upload route and when I want to upload file and it's name contains character, then I will get this error: java.lang.ArrayIndexOutOfBoundsException: 1 Camel awaits certain number of QueryParams which are defined beforehand. When it finds it will detect it as next

Re: Steps to replace a direct call by a JMS proxy?

2013-05-14 Thread Al Ferguson
Thank you. As a first step, I would like to get it working using a template. When done, Maybe I'll separate the logic in a separate bean. But... How to make throttling with using a producertemplate? Is is possible? Thanks, Al. F -- View this message in context:

Re: Steps to replace a direct call by a JMS proxy?

2013-05-14 Thread Christian Schneider
You just send to direct:endpoint. This will trigger the route Christian Posta described and the throttling should work. You can of course not directly define the throttling in the producerTemplate as you only can define an endpoint uri. For this case we have the direct endpoint that can then

Why is lazyLoadTypeConverters deprecated ?

2013-05-14 Thread kalyan
Hello, I see that lazyLoadTypeConverters of DefaultCamelContext is deprecated. I notice that when this option is enabled by default, it is loading 181 TypeConverters by default. Does this mean 181 classes (including inner/anonymous classes) Assuming that this is quite a amount of PermGen

Re: onException: Global declaration at CamelHttpTransportServlet

2013-05-14 Thread kalyan
Thank you. So I guess, the same holds good for handling the exceptions in vm, direct-vm calls. -- View this message in context: http://camel.465427.n5.nabble.com/onException-Global-declaration-at-CamelHttpTransportServlet-and-bestpractices-tp5732428p5732491.html Sent from the Camel - Users

Re: Streaming a PDF from remote machine

2013-05-14 Thread Willem jiang
I'm afraid you have to implement the timeout mechanism yourself. I don't aware camel provides this feature out of box. BTW, I think the solution2 that you have is a good one. -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com |

bind programmatically

2013-05-14 Thread Jean Francois LE BESCONT
Hey ! I would like to programmatically marshal and bind my body to do : from(file://C:/Temp/camel/rep1/?noop=true) .split().tokenize(\n) .unmarshal() .bindy(BindyType.Csv, Ticket.class) .process(new Processor() { public void process(Exchange exchange) throws Exception {

CamelContext not loaded during Tests

2013-05-14 Thread lawrence
Hi, I am kind of new to Camel, and I can't figure out why my camel context is not loaded when running my tests. I want to configure my context properly before deep diving into code, and even with a basic example, and I can't make it. I'd like to test existing routes (to avoid duplicating routes

Re: CamelContext not loaded during Tests

2013-05-14 Thread Claus Ibsen
Hi You should use CamelSpringTestSupport from camel-test-spring to test spring xml apps. On Tue, May 14, 2013 at 5:00 PM, lawrence lawrence.car...@pressinnov.com wrote: Hi, I am kind of new to Camel, and I can't figure out why my camel context is not loaded when running my tests. I want to

JAXB Interface Issue

2013-05-14 Thread David Carver
With Open JDK 7 we have been getting some odd issues lately when running camel in an equinox container. The following is the stack trace we get: org.springframework.beans.factory.config.BeanPostProcessor is an interface, and JAXB can't handle interfaces. this problem is related to the

Why is Camel silently dropping exceptions?

2013-05-14 Thread Chris Wolf
I implemented a custom route policy, which never appeared to be starting. I finally traced with a debugger and found that it's throwing an exception, which appears to be discarded. In the DefaultCamelContext.addRoutes(...) is this code: if (routePolicyList != null !routePolicyList.isEmpty()) {

Logging cause of failure with deadLetterChannel error handler?

2013-05-14 Thread Peter Hilton
How should I approach the following scenario? I’m starting to suspect that I'm doing it wrong… I'm using: Camel 2.11.0, Scala DSL, Scala 2.10.0, sbt 0.12.2, JDK 1.6.0_43, OSX 10.8.3 I have a route that takes a file, parses it and then sends JSON to a web service. If the Camel processor that

Re: Why is Camel silently dropping exceptions? *** DISREGARD ***

2013-05-14 Thread Chris Wolf
After RTFM, I see what's happening - sorry for the noise... On Tue, May 14, 2013 at 11:49 AM, Chris Wolf cwolf.a...@gmail.com wrote: I implemented a custom route policy, which never appeared to be starting. I finally traced with a debugger and found that it's throwing an exception, which

Re: How to persist data from aggregator?

2013-05-14 Thread RTernier
Hey Claus, Thanks for the reply. I looked at that pattern, and I do get the aggregated results back properly - in the Aggregate route. However, once processing continues past that the exchange reverts back to what it was before it got split-aggregated. Using the link you posted, I changed my

Re: Issue with Camel-aws (SQS) and aws-java-sdk-1.4.3

2013-05-14 Thread Shauna Harris
Thanks, that helped me. I reverted to that version and fixed the original problem I had there. -- View this message in context: http://camel.465427.n5.nabble.com/Issue-with-Camel-aws-SQS-and-aws-java-sdk-1-4-3-tp5732228p5732504.html Sent from the Camel - Users mailing list archive at

Re: How to persist data from aggregator?

2013-05-14 Thread Claus Ibsen
Hi See the link again, and use *only* the splitter, as it has built-in aggregation. On Tue, May 14, 2013 at 6:36 PM, RTernier ryan_tern...@hotmail.com wrote: Hey Claus, Thanks for the reply. I looked at that pattern, and I do get the aggregated results back properly - in the Aggregate route.

Re: bind programmatically

2013-05-14 Thread Claus Ibsen
From your processor you can just create the bindy data format and invoke the marshal method. eg add camel-bindy to your class path, and find the BindyDataFormat class and create a new instance, configure it, and invoke the marshal method manually. Its a bit unusual to do it like that, but you

Re: JSON to POJO using Apache Camel and hibernate

2013-05-14 Thread Claus Ibsen
Hi For the foregin key stuff, you may want to ask on Hibernate forums how to do that. And what hibernate component do you use? And what version is that? As well what version of Hibernate. On Tue, May 14, 2013 at 8:59 AM, bartleemans bartleema...@msn.com wrote: Apache camel is using a route

Re: JAXB Interface Issue

2013-05-14 Thread Claus Ibsen
Hi You can possible add jaxb-impl JAR to the classpath so you can control which JAXB impl is in use. The ones from the JDK is sometimes outdated and buggy. On Tue, May 14, 2013 at 5:04 PM, David Carver dcar...@intalio.com wrote: With Open JDK 7 we have been getting some odd issues lately when

Re: Why is lazyLoadTypeConverters deprecated ?

2013-05-14 Thread Claus Ibsen
Hi Type converters should be loaded and instantiated as part of booting up Camel. Doing this lazy just causes problems as you need to sync access to the converters on first lazy loading and whatnot. And there is no noticeable memory savings as the .class is on your classpath and loaded as part

Re: QueryParam value with (ampersand)

2013-05-14 Thread Claus Ibsen
Hi You need to add more details before people can help you. See some points here http://camel.apache.org/support On Tue, May 14, 2013 at 2:12 PM, jamalissimo roman.janu...@gmail.com wrote: Hi guys, I am working on file upload route and when I want to upload file and it's name contains

Re: How to persist data from aggregator?

2013-05-14 Thread RTernier
works perfectly! Thanks Claus. Didn't realize the splitter had that built in. -- View this message in context: http://camel.465427.n5.nabble.com/How-to-persist-data-from-aggregator-tp5732421p5732512.html Sent from the Camel - Users mailing list archive at Nabble.com.

Making a route depend on multiple criteria

2013-05-14 Thread cwhistler
I need a way to create a Camel route that uses a file from endpoint but cannot start processing that file until some other things are complete. So here's a simplified scenario just to provide an example: A camel route extracts data from a database and writes the records to a file on the file

Re: bind programmatically

2013-05-14 Thread Jean Francois LE BESCONT
Thanks ( like always :) Claus ! It is right that it is a little bit unusual, I have to modify a CSV and add one new field which is the original field. the code is : from(file://C:/Temp/camel/rep1/?noop=true) .split().tokenize(\n) .streaming() .unmarshal() .bindy(BindyType.Csv,

Re: Using camel-servlet with Multipart - unable to fetch the file

2013-05-14 Thread crmanoj
This is resolved by using/parsing the input stream from camel body instead of using the HttpServletRequest from camel Headers. -- View this message in context: http://camel.465427.n5.nabble.com/Using-camel-servlet-with-Multipart-unable-to-fetch-the-file-tp5732204p5732534.html Sent from the

Why dead letter channel doesn't work after adding Processor to onException?

2013-05-14 Thread rafaljaw
Hi all, I have simple route that takes messages from [Input] and forwards them to [Output], or to [Failed] (dead letter queue) if something bad happens: errorHandler(deadLetterChannel(jms:queue:Failed) .maximumRedeliveries(1) .redeliveryDelay(0));

Re: How to create a generic SOAP consumer?

2013-05-14 Thread Smith-John
Will someone please help me? -- View this message in context: http://camel.465427.n5.nabble.com/How-to-create-a-generic-SOAP-consumer-tp5731741p5732538.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Why do Camel core methods still throw Checked Exceptions (everyone agrees they're 'bad' now, right?)

2013-05-14 Thread Christian Müller
Hi pmcb55! I would like to understand what your issue is with the checked exception in the Processors process method. As a Camel user, you may derive from Processor and implement your custom business code in the process method. By declaring throws Exception on this method, you are free to throw

How do I determine which endpoint validation exception came from?

2013-05-14 Thread toomanyedwards
Hi all, I'm relatively new to camel. I have a route where I need to do validation twice (once on the initial input and the then after processing). I have a SchemaValidationException handler defined which catches validation errors. My question is what is the best practice to determine which

Re: How to create a generic SOAP consumer?

2013-05-14 Thread Willem jiang
Hi, It looks like you are deploying the camel route into OSGi container? The warning means there are more than on javax.xml.ws.WebServiceProvider classes are loaded by deferent Classloader. Are you using Karaf or ServiceMix? -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat

Re: Using camel-servlet with Multipart - unable to fetch the file

2013-05-14 Thread Willem jiang
camel will try to digest the HttpServletRequest and setup the message headers and body. It's a common practice to consume the input stream from message body :) -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog:

Re: Making a route depend on multiple criteria

2013-05-14 Thread kalyan
I'm a newbie here. But what ever you described may be handled with multiple routes. Use direct: for synchronous and seda: for asynchronous routing as described in documentation for joining all the routes you create. -- View this message in context:

Re: Steps to replace a direct call by a JMS proxy?

2013-05-14 Thread Al Ferguson
Got it, thanks -- View this message in context: http://camel.465427.n5.nabble.com/Steps-to-replace-a-direct-call-by-a-JMS-proxy-tp5732430p5732516.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JAXB Interface Issue

2013-05-14 Thread Willem jiang
Hi, I just found you are using equinox container. You can either put the jar into JDK endorse directory, or hack the properties file to make sure the com.sun.xml.internal.bind packages are not exported. -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web:

Problem from Java DSL to Spring DSL

2013-05-14 Thread Gary Liu
Hello, I am trying to translate the following Java DSL (This is the example from 2.10.4). The Java DSL works fine. But I after I translate to Spring DSL, several things are not working as expected. Would someone please help? Java DSL===

Re: Problem from Java DSL to Spring DSL

2013-05-14 Thread Willem jiang
Hi, I think you cannot use the constant of Exchange.FILE_NAME directly in the Spring DSL. You should use the String directly like this camel:setHeader headerName=CamelFileName/ camel:constantrequest-${date:now:-MM-dd-HHmmssSSS}/camel:constant -- Willem Jiang Red Hat, Inc. FuseSource

Re: Problem from Java DSL to Spring DSL

2013-05-14 Thread Gary Liu
When I test using soupUI with the following input: soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:rep=http://reportincident.example.camel.apache.org; soapenv:Header/ soapenv:Body rep:inputReportIncident incidentId111/incidentId

Sharing a solution for discussion

2013-05-14 Thread wagnermarques
Hello camel riders, I would like to share a solution and ask if it was the best aproach. I think it can be util for some one in the future and because is a interesting example of integration using camel! The use case: I have a orbeon forms installed that was configured to: 1) save the form

Re: Sharing a solution for discussion

2013-05-14 Thread Willem jiang
Hi, I'm not sure why you chose camel-cxfrs component to accept the request. If you just want to process the form, you can use the camel-jetty or camel-servlet directly. It could be more easy to add the basic autentications supports out of box. -- Willem Jiang Red Hat, Inc. FuseSource is now

Re: Problem from Java DSL to Spring DSL

2013-05-14 Thread Gary Liu
OK. I got the set file name part work. camel:setHeader headerName=CamelFileName camel:constantrequest-${date:now:-MM-dd-HHmmssSSS}/camel:constant /camel:setHeader is equivalent as: setHeader(Exchange.FILE_NAME,

Re: Problem from Java DSL to Spring DSL

2013-05-14 Thread Gary Liu
Thanks William! That works. Now, my transform part is still not working. Any sugguestions? -- View this message in context: http://camel.465427.n5.nabble.com/Problem-from-Java-DSL-to-Spring-DSL-tp5732558p5732563.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Problem from Java DSL to Spring DSL

2013-05-14 Thread Willem jiang
Hi, Can you check if you put the camel-jaxb jar into your class path? -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)

Re: Making a route depend on multiple criteria

2013-05-14 Thread boday
sounds like you could just explicitly invoke the 4th route (direct:route4) at the end of the 3rd route and enrich the 4th route with the hold file...see http://camel.apache.org/content-enricher.html cwhistler wrote I need a way to create a Camel route that uses a file from endpoint but cannot

Re: How do I determine which endpoint validation exception came from?

2013-05-14 Thread boday
you generally can isolate individual exceptions by either throwing/catching more explicit exceptions or by using granular doTry/doCatch clauses within routes... another option is to use the Exchange property Exchange.TO_ENDPOINT/FAILURE_ENDPOINT to indicate the last endpoint that was tried before

Re: Streaming a PDF from remote machine

2013-05-14 Thread Chinababu Illa
Thanks Willem. Regards, Chinna -- View this message in context: http://camel.465427.n5.nabble.com/Streaming-a-PDF-from-remote-machine-tp5732401p5732571.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to create a generic SOAP consumer?

2013-05-14 Thread Claus Ibsen
On Tue, May 14, 2013 at 11:35 PM, Smith-John mich...@gmail.com wrote: Will someone please help me? If you want to get help faster then check the bottom sections of this page http://camel.apache.org/support -- View this message in context: