Re: HTTPS Endpoint to File

2015-10-28 Thread Claus Ibsen
See the authentication and proxy section at http://camel.apache.org/http You can set the auth to basic and username/password On Thu, Oct 29, 2015 at 7:41 AM, Ishada wrote: > They are HTTP headers. I have tried to implement it as follows but it is > still not working > > from("direct:start") >

Re: HTTPS Endpoint to File

2015-10-28 Thread Ishada
They are HTTP headers. I have tried to implement it as follows but it is still not working from("direct:start") .setHeader(Exchange.HTTP_METHOD, constant("GET")) .process(new Processor() {

Re: Not able to convert Single xml object into jsonArray thorugh Camel Spring DSl.

2015-10-28 Thread Claus Ibsen
camel-jackson can be used for pojo <-> json using the jackson library. And it support a map/list mode. On Tue, Oct 27, 2015 at 1:54 PM, Niraj wrote: > Hi, > can we convert a single json object to jsonArray with use of SpringDSL . > just for example, i have a jsonObject like. > > > Joe > Bloggs

Re: How do I consume from ActiveMQ using the MQTT protocol

2015-10-28 Thread Claus Ibsen
Hi You are not providing much details for people to help. Yeah the rhiot project are using MQTT and Camel as part of the IoT and with AMQ as the broker. https://gautric.github.io/blog/2015/05/20/camel-iot-labs-i2c-gpio-mqtt-lcd.html And camel-mqtt itself is using ActiveMQ for unit testing https:

Re: Spring Boot WS - After receiving request, camel throws NullPointerException

2015-10-28 Thread Claus Ibsen
Hi You can turn off endpointRuntimeStatisticsEnabled in JMX http://camel.apache.org/camel-jmx.html On Tue, Oct 27, 2015 at 9:23 PM, phubner wrote: > Claus, > Is there a way to work around this issue programmatically? > > Thanks, > > > > -- > View this message in context: > http://camel.465427.n

Re: HTTPS Endpoint to File

2015-10-28 Thread Claus Ibsen
What headers do you want to add? Are they to be HTTP query parameters? or HTTP headers? For dynamic uri's see this FAQ http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html And an alternative is that the http component allows to specify the query parameters in a special header named Exchang

Re: split().tokenize() w/regex-type token arg and grouping DOESN'T GROUP split items

2015-10-28 Thread Claus Ibsen
Hi It was recently fixed by a PR with commit id 20259e405e3b349e7c860ae563e8e941446aaaba You can just create the tokenizer expression manually and set all the options TokenizerExpression tz = new TokenizerExpression(); tz.setGroup(1000); tz.setToke

Facing the JMSTimestamp selector issue to prepare dyanamic end point

2015-10-28 Thread ramesh.yakk...@gmail.com
Hi, I have quartz scheduler, which is configured as routerPolicy and I am fetching the all jms message based on JMSTimestamp selector before the current date time stamp. It used the bean date to get the timestamp while sending the date to JMSTimestamp selector on the end point. During the startu

Re: split().tokenize() w/regex-type token arg and grouping DOESN'T GROUP split items

2015-10-28 Thread furchess123
Just checked the Camel source code: /** * Evaluates a token expression on the message body * * @param token the token * @param regex whether the token is a regular expression or not * @param group to group by the given number * @return the builder to continue proc

split().tokenize() w/regex-type token arg and grouping DOESN'T GROUP split items

2015-10-28 Thread furchess123
If a regular expression used in the /tokenize(...)/ method when splitting a file payload by lines, the "group" method argument is ignored and no lines are grouped. For example, consider the following code to split the file into exchanges with 100 lines per exchange. The regular expression (the fir

Re: trying to use Rest with restlet component still getting "Cannot find RestConsumerFactory in Registry"

2015-10-28 Thread Claus Ibsen
Can you tell how you run Camel as that can affect if components can be discovered. On Wed, Oct 28, 2015 at 6:31 PM, dermoritz wrote: > I am trying to get a simple rest service to work: > > > restConfiguration().component("restlet"); > from(rest:get:hello).process(answer) > > I added > > >

trying to use Rest with restlet component still getting "Cannot find RestConsumerFactory in Registry"

2015-10-28 Thread dermoritz
I am trying to get a simple rest service to work: restConfiguration().component("restlet"); from(rest:get:hello).process(answer) I added org.apache.camel camel-restlet 2.16.0 " to my pom. But i still get "java.lang.IllegalStateException: Cannot find RestConsumerFactor

Re: splitter().tokenize(...) does not recognize new lines in file uploaded using Spring MVC MultipartFile

2015-10-28 Thread furchess123
Well, it turns out that the uploaded files had ONLY the '\r' (x0D) character for the "new line". I was too blind to see - assuming that it could only be either '\n' (UNIX) or "\r\n" (MS Windows.) So, I was staring at 'x0D' not even questioning the fact that it represented '\n', while it is, of cour

HTTPS Endpoint to File

2015-10-28 Thread Ishada
I need to access a HTTPS Resource which is using Basic Authentication and It is a GET Resource. I have written a code in java using URIBuilder and adding the username, password etc as Headers to the URIBuilder and using Apache HTTP Client to access the resource and it is working well. Now my requir

How do I consume from ActiveMQ using the MQTT protocol

2015-10-28 Thread S-camel
Hello, I have developed a MQTT route to consume from activemq, but it isnt working. In the console i can clearly see that it is consuming. The route works with HiveMQ and Mosquito broker. Only ActiveMQ isnt working. Are there people who faced the same problem? -- View this message in context

Re: How do I maintain custom ojbect in the camel context scope?

2015-10-28 Thread furchess123
You could always have an application-global object (an instance that lives in your application context) injected into your Camel processor classes. Assuming you implement your exchange processing logic in endpoint-specific POJO "processors", you could wire/inject a reference to that bean into each

How do I maintain custom ojbect in the camel context scope?

2015-10-28 Thread 차정호
Dear Camel developers and users, I like to share some data among routes in the same camel context. For example, camel context scoped cache object. I know CamelContext have the below methods : package org.apache.camel; … public interface CamelContext extends SuspendableService, Runtim

Re: splitter().tokenize(...) does not recognize new lines in file uploaded using Spring MVC MultipartFile

2015-10-28 Thread furchess123
That's what baffles me: the file is created on the same system, on the same server. In this case it is Mac OS. This even happens if the Camel route runs within the same Spring MVC application that uploads the file! I have tried using the explicit "\n" for the line separator in the tokenizer, got s

Re: Upgrade to 2.16.0

2015-10-28 Thread Claus Ibsen
The wrong would have no impact in the route and essentially will not be in-use in those older Camel releases On Wed, Oct 28, 2015 at 10:52 AM, Clemens wrote: > Hi, > > You are absolutely right, but it was possible to use in 2.15 > without problems. > > > > Claus Ibsen-2 wrote >> Hi >> >> You su

Re: Upgrade to 2.16.0

2015-10-28 Thread Clemens
Hi, You are absolutely right, but it was possible to use in 2.15 without problems. Claus Ibsen-2 wrote > Hi > > You surely need to add > > in the route. Having > > standalone > is not intended. So do > > See filter > http://camel.apache.org/message-filter.html > > On Wed, Oct 28, 201

Apache Camel Optaplanner Component

2015-10-28 Thread AhmedAlaa333
Hello, I tried to change the "OptaPlannerSyncSolverTest" function to solve Vehicle Routing Problem instead of CloudBalancing CloudBalance: CloudBalancingGenerator generator = new CloudBalancingGenerator(true); final CloudBalance planningProblem = generator.createCloudBalance(4, 12)

Re: Upgrade to 2.16.0

2015-10-28 Thread Claus Ibsen
Hi You surely need to add in the route. Having standalone is not intended. So do See filter http://camel.apache.org/message-filter.html On Wed, Oct 28, 2015 at 10:06 AM, Clemens wrote: > Hi, > > Sample camel route that will throw "ClassCastException: > org.apache.camel.model.WhenDefinition ca

Re: Upgrade to 2.16.0

2015-10-28 Thread Clemens
Hi, Sample camel route that will throw "ClassCastException: org.apache.camel.model.WhenDefinition cannot be cast to org.apache.camel.model.FilterDefinition" at DefaultManagementObjectStragety#310. ${body} != null Claus Ibsen-2 wrote > Can anyone show some r

Re: splitter().tokenize(...) does not recognize new lines in file uploaded using Spring MVC MultipartFile

2015-10-28 Thread mailingl...@j-b-s.de
Hi! Can you check both files in a Hex Editor/Viewer? Text Editors usually understand all kind of line breaks but eventually the splitter does not recognize it (you are using the line sep from your hosting system eg unix and your file is created under windows)? Jens Von meinem iPhone gesendet