Re: How to stop a dynamic route

2016-06-08 Thread Daniel P22
Quinn and Ranx, guys have an example for controlbus, I don't understand how works and how can I use it. I read camel.apache.org/controlbus.html -- View this message in context: http://camel.465427.n5.nabble.com/How-to-stop-a-dynamic-route-tp5783385p5783611.html Sent from the Camel - Users maili

How to add Service on before camel route start

2016-06-08 Thread deepaktaker
Hi, I have written junits which mocks the endpoints. but my problem is my code uses a service. so if i start the route i always get nullpointer exception because the service is not initialized. So my question is there a way to mock a service or add a service before a route starts. Regards, De

Re: How to add Service on before camel route start

2016-06-08 Thread Steve973
Hi, Deepak. When you say "service", are you referring to a bean that you need to reference, by name, within the CamelContext that your route needs to invoke a method on? You can bind a bean to the registry of the context before you start it. How are you initializing the context for your tests? I

Re: Camel Tracer doesn't work

2016-06-08 Thread nicolasduminil
Hi Claus, Thanks for clarifying that. Reading the doc it didn't appear obviously. Kind regards, Nicolas -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Tracer-doesn-t-work-tp5783296p5783621.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to add Service on before camel route start

2016-06-08 Thread souciance
What is the service? On Wed, Jun 8, 2016 at 11:11 AM, Steve973 [via Camel] < ml-node+s465427n5783617...@n5.nabble.com> wrote: > Hi, Deepak. When you say "service", are you referring to a bean that you > need to reference, by name, within the CamelContext that your route needs > to invoke a metho

Re: SWAGGER same service into different war file!

2016-06-08 Thread Sergey Beryozkin
FYI, https://issues.apache.org/jira/browse/CXF-6740 Note my colleagues worked on a patch which was accepted for Swagger 1.5.10 Not sure 100% it is the same issue which causes problems in your case but sounds like it is the one Sergey On 06/06/16 21:39, Sergey Beryozkin wrote: It is a Swagger

Trying to use the TarSplitter ...

2016-06-08 Thread nicolasduminil
Hello, I need to process a .tar.gz file in a route and, after some googling, I came at something like the following: ... from("direct:unzip").unmarshal().gzip() .split(new TarSplitter()).process("debug") ... I didn't find much documentation concerning TarSplitter and I'm wondering whethe

query param

2016-06-08 Thread miri eyni
hi i try to routing url with query param but i got the 400 server code . http://{{fromUrl}}/billing/{paymentMethod}/{product}/{frequency}?matchOnUriPrefix=true"/> http://{{toUrl}}/metadata/billing/{paymentMethod}/{product}/{frequ

Camel CXF authentication

2016-06-08 Thread mabahma
CamelContext context = new DefaultCamelContext(); context.addRoutes(new RouteBuilder() { public void configure() throws Exception { > Authenticator.setDefault(new MyAuthenticator()); from("direct:test")

XPath Content Based Routine Fails when urn xmlns is specified in base element.

2016-06-08 Thread bbuzzard
I am using JDK1.7 with apache-activemq-5.13.2 which is using canel-core-5.13.2. I am trying to route documents based on the value of an XML element. My test route should routes documents to the "when" folder when the author's name is "Bob" and it routes documents to the "otherwise" folder when t

Re: REST DSL bind mode per endpoint

2016-06-08 Thread Mark
figured it out. You can specify this per get/post..etc. On Tue, Jun 7, 2016 at 11:51 PM, Mark wrote: > I have a REST API that ingests XML via a POST endpoint and I also have an > endpoint that will produce text/plain via GET. Is it possible to have the > POST endpoint use JAXB and the GET end

Re: XPath Content Based Routine Fails when urn xmlns is specified in base element.

2016-06-08 Thread souciance
Take a lot at the namespace section in the documentation: http://camel.apache.org/xpath.html There is an example there for adding namespace support but it seems to be for the java dsl. For the xml dsl you may need to add the namespace manually in the xml declaration. Perhaps someone also knows if y

news from me

2016-06-08 Thread sanjai
Hello, I've got some interesting news for you, you're gonna be pleaseantly surprised. Read more here san...@sanjai.org -- View this message in context: http://camel.465427.n5.nabble.com/news-from-me-tp5783719.html Sent from the Camel - Users

how you're doing?

2016-06-08 Thread sanjai
Hi, Just wanted to say hi and ask how you're doing? I'm OK, you may read my latest article here Sincerely, san...@sanjai.org -- View this message in context: http://camel.465427.n5.nabble.com/how-you-re-doing-tp5783720.html Sent from the Came

Re: Trying to use the TarSplitter ...

2016-06-08 Thread Pontus Ullgren
You can try to convert the input stream to the desired format using convertBodyTo before the debug processor. http://camel.apache.org/convertbodyto.html Best regards Pontus On Wed, 8 Jun 2016, 11:46 nicolasduminil, < nicolas.dumi...@simplex-software.fr> wrote: > Hello, > > I need to process a .

Re: Trying to use the TarSplitter ...

2016-06-08 Thread nicolasduminil
Hello, Thanks for your reply. So, what you're saying is that org.apache.camel.dataformat.tarfile.TarElementInputStreamWrapper would be an input stream, right ? In this case I don't need to convert it, just could read from it. But I tried the following: from("direct:unzip").unmarshal().gzip()

Re: How to stop a dynamic route

2016-06-08 Thread Brad Johnson
I'm going to echo Quinn's question, why do you think you need to remove the route? Even if it is only used once and only once you can (a) disable or (b) make sure it only processes files idempotently so that you don't end up reprocessing the file. You may have a compelling reason I just don't kno

Removing and reloading Rests XML Definitions dynamically

2016-06-08 Thread jmandawg
Hi, I'm trying to remove and reload rest definitions from xml using camel 2.17.1. I have the following code to load them (stolen from camel-spring-boot): for(String restRoutePath : restRoutePaths) { try{ RestsDefinition rd = camelContext.loadRestsDefinition(appContext.g

Re: XPath Content Based Routine Fails when urn xmlns is specified in base element.

2016-06-08 Thread bbuzzard
Thank you for your response, but I think you missed the point. The http://camel.apache.org/xpath.html talks about namespaces that use URLs not URNs. My problem seems to be specifically with namespaces that use URNs. I need to know if there is a way for the CBR to ignore the default URN namespace

Re: How to stop a dynamic route

2016-06-08 Thread Daniel P22
I need to start the route, process the files once and then stop and remove the route. Then the route maybe in future can be started again and I need the route process the same files again. Maybe I dont need to destroy the route but at least stop. And I have to stopped when the CamelBatchComplete

Re: XPath Content Based Routine Fails when urn xmlns is specified in base element.

2016-06-08 Thread bbuzzard
Thanks to souciance's reply I was able to figure out what I was doing wrong. test2.xml defined the default namespace to an URN. In my CBR I had specified an xpath that had no namespace at all. When I added the URN namespace to my camelContext and then prefixed the XPath element with the namespac

Re: How to stop a dynamic route

2016-06-08 Thread Brad Johnson
Processing the files once is what the idempotent flag is for as noted. It won't reprocess the same files. The route is still there but it won't continually respin over your file. On Wed, Jun 8, 2016 at 10:48 AM, Daniel P22 wrote: > I need to start the route, process the files once and then stop

Re: Removing and reloading Rests XML Definitions dynamically

2016-06-08 Thread jmandawg
It seems For some reason RouteBuilder does not check the camelContext for existing restConfiguration before it goes and creates it's own resulting in multple restConfigurations. #RouteBuilder public RestConfigurationDefinition restConfiguration(String component) { if (restConfigurations

Re: Removing and reloading Rests XML Definitions dynamically

2016-06-08 Thread jmandawg
So the real problem is, after the app starts I have like 3 RestConfigurations (jetty, netty-http, restlet) and when i call: List routeDefs = xmlDef.asRouteDefinition(camelContext, getContext().getRestConfiguration()); It creates a route for each RestConfiguration, which is not what i want. I o

Re: Trying to use the TarSplitter ...

2016-06-08 Thread Pontus Ullgren
Yes agree, I also get the same behaviour from a similare route when running Camel 2.17.1. Could you create a issue in Jira for this. // Pontus On Wed, 8 Jun 2016 at 17:23 nicolasduminil < nicolas.dumi...@simplex-software.fr> wrote: > Hello, > > Thanks for your reply. So, what you're saying is

problem Settting camel header value to java enum value

2016-06-08 Thread J-
Trying to set the header to to an enum value but seem like it's only setting it to a string using camel 2.17.1:   ${type:org.apache.camel.Exchange.FILE_NAME} But the value in the header is a string that equals: "org.apache.camel.Exchange.FILE_NAME" What am i doing wrong?? Also tried wit

Camel How to dequeue all messages accumulated every X minutes

2016-06-08 Thread Guls
I am new to Camel. I have a requirement, where I need to dequeue all messages from an activemq every 5 minutes. If I try to introduce a delayer in the route, the very first message is delayed by 5 minutes and subsequently my dequeuebean is called for every message once. Suppose if there were 20 m

Re: Camel How to dequeue all messages accumulated every X minutes

2016-06-08 Thread souciance
Have you looked at using quartz to trigger your flow every 5 min? http://camel.apache.org/quartz2.html On Thu, Jun 9, 2016 at 8:53 AM, Guls [via Camel] < ml-node+s465427n5783739...@n5.nabble.com> wrote: > I am new to Camel. I have a requirement, where I need to dequeue all > messages from an acti