Re: how to read json in a file and use jsonpath

2014-11-24 Thread gmh
I guess the more appropriate question is how do I convert BSON into JSON. Timestamp is not been converted into JSON is the problem. Gordon -- View this message in context: http://camel.465427.n5.nabble.com/how-to-read-json-in-a-file-and-use-jsonpath-tp5759546p5759562.html Sent from the Camel -

Re: how to read json in a file and use jsonpath

2014-11-24 Thread gmh
Claus, It looks like the problem with my json. "ts": Timestamp(1415124334, 1), Once it is removed I had no problems. The json file is from Mongodb oplog. It is used to synchronize data between Mongodb and Redis. Do you have suggestions for dealing with that name: value pair? Maybe something al

Re: how to read json in a file and use jsonpath

2014-11-24 Thread Taariq Levack
Hi Gordon I don't think your json is valid[1], once that's sorted try this unit test[2] which shows how to achieve what you want. [1] http://jsonlint.com/ The following works, I added some quotes, you'll have to check if your format is supposed to be supported. { "ts": "Timestamp(1415124334, 1)

Re: Camel-Restlet 2.14.0 DecodeRepresentation

2014-11-24 Thread Willem Jiang
I think we could add a check point to verify if the entity is Representation and using DecodeRepresentation to decode the representation. In this way the user can get the decoded text from the message body directly. I just created a JIRA for it[1]. [1] https://issues.apache.org/jira/browse/CAME

Re: Quartz job data deletion in clustered quartz2

2014-11-24 Thread Willem Jiang
Hi Lakshmi, We did some work in camel-quartz2 recently such as reschedule the job for cluster[1], do you mind test them to see if it fix some of your cluster issue? You can use Camel 2.14.1-SNAPSHOT for verification. [1]https://issues.apache.org/jira/browse/CAMEL-7627 -- Willem Jiang Red Ha

Re: how to read json in a file and use jsonpath

2014-11-24 Thread gmh
Claus, I tried that approach first and did not work. I took the maven java dsl archetype and changed the route to point to the .json file and then added the additional route. Do I need to add any other configurations or libraries? Gordon -- View this message in context: http://camel.465427.n5.n

Re: how to read json in a file and use jsonpath

2014-11-24 Thread Claus Ibsen
I guess you should do something a like http://camel.apache.org/jsonpath .when().jsonpath("$.op == 'i'") On Mon, Nov 24, 2014 at 5:36 PM, gmh wrote: > All, > In my sample code I am reading a json file and doing a jsonpath to do > content based routing. > > Here is the simple route > from("file

how to read json in a file and use jsonpath

2014-11-24 Thread gmh
All, In my sample code I am reading a json file and doing a jsonpath to do content based routing. Here is the simple route from("file:src/data2/test.json?noop=true") .choice() .when(PredicateBuilder.isEqualTo(ExpressionBuilder.languageExpression("jsonpath", "$.op"

Deadlock at smpp startRoute with negative bind response

2014-11-24 Thread SwanMountain
I have a problem with deadlock at start of SMPP route. The scenario i am testing is a startRoute when the SMSC will reject the bind responding with a Negative response 000f. The behaviour seen is the SmppProducer.onStateChange listener is periodically attempting a reconnect (which in my test

Re: how does it work ? if no schema location

2014-11-24 Thread Claus Ibsen
Hi The placeholder namepsace is just a synonym, that the parser in camel-spring / camel-blueprint detects, and then knows its for property placeholder. The examples on the website should work. On Mon, Nov 24, 2014 at 2:59 PM, nono wrote: > Here is example of > > Using property placeholders for

how does it work ? if no schema location

2014-11-24 Thread nono
Here is example of Using property placeholders for any kind of attribute in the XML DSL Available as of Camel 2.7 http://www.springframework.org/schema/beans"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:prop="http://camel.apache.org/schema/placeholder"; xsi:sch

Re: Camel-Restlet 2.14.0 DecodeRepresentation

2014-11-24 Thread sandp
Hi, I just looked at the code on master https://github.com/apache/camel/blob/camel-2.14.x/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java This code is different than the one in camel-restlet 2.14.0. Someone updated the file 5 days ago. *The me

Re: AHS-WS problem?

2014-11-24 Thread Aki Yoshida
cool ;-) thanks for posting your code example. 2014-11-22 17:25 GMT+01:00 jogro : > Adding the following method to the java config worked liked a charm: > > @Bean > public ServletRegistrationBean camelWsServletRegistrationBean() { > ServletRegistrationBean registra

Re: FTP Component configuration

2014-11-24 Thread Claus Ibsen
Hi No you cannot do that, you need to set the host/port etc in the uri, when you define the endpoint as an uri string. On Sat, Nov 22, 2014 at 7:13 PM, Atanas Shindov wrote: > Hi guys, > > After I've watched the Riding Camel > presen

Re: Impossible to configure HttpBinding for ServletComponent

2014-11-24 Thread Pavel Lechev
Apologies, perhaps it wasn't clear - the component is specifically defined for REST: restservlet*" class="org.apache.camel...ServletComponent"> In fact, in my XML config and the DSL, the ServletComponent bean ID is not "servlet". I just changed it in the email to avoid confusion, but I am assumi

Re: Impossible to configure HttpBinding for ServletComponent

2014-11-24 Thread Claus Ibsen
Just define a new component for rest. On Mon, Nov 24, 2014 at 10:26 AM, Pavel Lechev wrote: > Hi Claus, > Thanks for your response. > Am I to understand that the REST DSL in combination with the `servlet` > consumer does not allow setting a custom HttpBinding? If so, I believe this > is a huge

Re: Impossible to configure HttpBinding for ServletComponent

2014-11-24 Thread Pavel Lechev
Hi Claus, Thanks for your response. Am I to understand that the REST DSL in combination with the `servlet` consumer does not allow setting a custom HttpBinding? If so, I believe this is a huge limitation given that these two are very commonly used together. It is also not very clear from the docum

Issue on Maven 3.2.3 - Camel Idea/Eclipse examples

2014-11-24 Thread mmatteo
Hi, I try to run site examples (http://camel.apache.org/running-examples.html) but I'm stuck on creating an IDEA/Eclipse project with Maven, I always get: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.apache.maven.plugins:maven-idea-plugin:2.2:idea failed. Cau

Issue in FILE consumer URI having startingDirectoryMustExist set to true

2014-11-24 Thread Himanshu Mittal
Hi, I am observing one strange behavior with consumer route in camel FILE component Here is how I am configuring my camel route public void configure() throws Exception { onException(Exception.class) .handled(true)