users@camel.apache.org

2013-05-14 Thread Claus Ibsen
Use %26 to encode the & http://en.wikipedia.org/wiki/Url_encode And also can you paste the stacktrace? And tell us which Camel version you use? On Wed, May 15, 2013 at 8:34 AM, jamalissimo wrote: > Hi, > > I will try to be more specific. This is how I call the service: > > /path/to/service/uploa

users@camel.apache.org

2013-05-14 Thread jamalissimo
Hi, I will try to be more specific. This is how I call the service: /path/to/service/upload?product=MyProduct&index=0&uploader=roman&pathToFile=/path/to/my/fileWhichContains&inTheName.txt&folderId=1 When I try this URL I will get *java.lang.ArrayIndexOutOfBoundsException: 1* error. -Thanks Ro

Re: Problem from Java DSL to Spring DSL

2013-05-14 Thread Claus Ibsen
On Wed, May 15, 2013 at 5:06 AM, Willem jiang wrote: > 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 Yes you can. The DSL has special support for that so it makes converting from java <-> xml easier.

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 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: > http://camel.465427.n5.nabble.com/How-to-create-a-generic-S

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 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: 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 > ca

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) http://jn

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 Gary Liu
OK. I got the set file name part work. request-${date:now:-MM-dd-HHmmssSSS} is equivalent as: setHeader(Exchange.FILE_NAME, constant("request-${date:now:-MM-dd-HHmmssSSS}")) -- View this message in context: h

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

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 date

Re: Problem from Java DSL to Spring DSL

2013-05-14 Thread Gary Liu
When I test using soupUI with the following input: http://schemas.xmlsoap.org/soap/envelope/"; xmlns:rep="http://reportincident.example.camel.apache.org";> 111 2013-05-09 Claus Muller bla bla g...@vha.com 678-447

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 request-${date:now:-MM-dd-HHmmssSSS} -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redha

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=== f

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: http://www.fuseso

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: 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: http://camel.465427.n5.nabble.com/Making-a

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: http:/

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 Web

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 end

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

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.

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)); onException(Throwable.

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 Came

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, Ti

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 sy

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.

users@camel.apache.org

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 wrote: > Hi guys, > > I am working on file upload route and when I want to upload file and it's > name contains & character, then I wil

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 of

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 wrote: > With Open JDK 7 we have been getting some odd issues lately when running > camel in

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 wrote: > Apache camel is using a route wich is listening to

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 ca

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 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. However, once proces

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 Nabble.com

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 bat

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 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 appears to be discard

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 p

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())

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 followi

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 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 configure my context prope

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 i

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 {

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 | http://www.redhat.c

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 mail

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 space,

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

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: http://camel.465427.n5.nabble.

users@camel.apache.org

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: 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 wrote: > I'm having an issue with aggregator. > > I have an i

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 wrote: > When a RouteBuilder defines onExcepti

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: 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}? httpClient.so

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 pojo

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 AM