Camel Simple regex isn't being executed but shown as string instead

2016-09-03 Thread catshout
Dear community, I'm using following lines in my Camel route ${in.body} regex '\:.\+(.*?)\:' The log entry is like the following S​e​n​d​e​r​G​L​N​:​ ​U​N​B

Issue with dynamic XPath expression in a Camel route

2016-06-23 Thread catshout
Dear community, I've a XML document in message body from what I need to retrieve a value by a XPath expression. This expression is being set dynamically. If I'm going to evaluate the XPath by setting a fixed value it works: /*/IDOC/E1WGRK1/E1WGRP1[1]/LIFNR/text() If I'm going to evaluate the X

Re: Execution of com.jayway.jsonpath.JsonPath methods fail with a CamelExecutionException

2016-05-12 Thread catshout
I di find the reason. I missed the line Import-Package: ..., com.jayway.jsonpath in the MANIFEST.MF I'd expect a ClassDefNotFound Error in this case, the other one does say unfortunately nothing. Best - Gerald -- View this message in context: http://camel.465427.n5.nabble.com/Execution-of-c

Execution of com.jayway.jsonpath.JsonPath methods fail with a CamelExecutionException

2016-05-10 Thread catshout
Dear community, I'm trying to write some Java code and use it within a Camel route like The code looks like (simplified for testing purposes) try { String json = "{\"CONFIGURATION\": \"hello\"}"; log.info("json: " + json.toString()); String config = JsonPath.read(json,

setHeader with dynamic headerName?

2016-05-01 Thread catshout
Dear community, is it possible to set the headerName dynamically in the manner ... Thanks for any reply. Best - Gerald -- View this message in context: http://camel.465427.n5.nabble.com/setHeader-with-dynamic-headerName-tp5782041.html Sent from the Camel - Users mailing list archive at Nab

jsonpath behaviour on arrays misleading?

2016-05-01 Thread catshout
Dear community, I've follwing input in my message body: { "APPLICATION": "Filiale", "ADAPTER": "SAPEIB", "QUEUE": "SIB.data.out.queue", "PROJECT_ID": "225", "PROJECT_NAME": "RETFIL010", "COMMUNICATION"

Re: JSonPath expression works in online validator but not within Camel route

2016-04-29 Thread catshout
A simpler expression $..PARTNER[0].APPLICATION on same content works, so far the body seems to be ok .. -- View this message in context: http://camel.465427.n5.nabble.com/JSonPath-expression-works-in-online-validator-but-not-within-Camel-route-tp5781987p5781993.html Sent from the Camel - User

Re: JSonPath expression works in online validator but not within Camel route

2016-04-29 Thread catshout
mailing list seems to swallow the raw parts .. again .. Dear community, I've following JSON body { "PARTNER": [{ "APPLICATION": "Filiale", "ADAPTER": "SAPEIB", "QUEUE": [], "PROJECT_ID": "225", "PROJECT_NAME"

JSonPath expression works in online validator but not within Camel route

2016-04-29 Thread catshout
Dear community, I've following JSON body the expression gives in an online JSonPath validator but an empty string in Camel. Any ideas? Best - Gerald -- View this message in context: http://camel.465427.n5.nabble.com/JSonPath-expression-works-in-online-validator-but-not-within-Camel-r

How to access a cache entry within a Java bean called from a camel route?

2016-04-28 Thread catshout
Dear Camel community, I'm using ServiceMix with Camel and Camel Cache. I've created a route like this .. Further I've created a bean with some Java code. I want to access the cache value inside the bean. How to refer to the cache and further to the cache entry within the bean? Any help is hig

Re: Convert xs:date in a XML to java.util.Date

2016-04-27 Thread catshout
I've attached the snippet .. route.xml .. and the input .. CAS_MON_EVENT_2.xml -- View this message in context: http://camel.465427.n5.nabble.com/Convert-xs-date

Convert xs:date in a XML to java.util.Date

2016-04-27 Thread catshout
Dear Camel community, I'm getting a XML structure like this START_DATE and END_DATE are defined as "xs:dateTime" datatype in the corresponding XSD. For further processing I need to convert these both into a format "MMdd HH:mm:ss.SSS". My idea was This fails due to "in.header.START_DATE"

Re: DSL route type conversion from InputStream to JSON

2015-09-22 Thread catshout
I did some more research, this line solves the conversion Best - Gerald -- View this message in context: http://camel.465427.n5.nabble.com/DSL-route-type-conversion-from-InputStream-to-JSON-tp5771816p5771818.html Sent from the Camel - Users mailing list archive at Nabble.com.

DSL route type conversion from InputStream to JSON

2015-09-22 Thread catshout
Dear all, I've created a route like (snippet) .. The http writes an InputStream and I want to convert the contained JSON string into XML. I'm getting an error .. Body[Body is instance of java.io.InputStream] ] Stacktrace

Re: XML 2 JSON marshaling fails due to missing library in embedded Camel within ServiceMix

2015-09-22 Thread catshout
Many thanks for the replies. I've executed and restarted the platform. The marshaling/unmarshaling is working now. Best - Gerald -- View this message in context: http://camel.465427.n5.nabble.com/XML-2-JSON-marshaling-fails-due-to-missing-library-in-embedded-Camel-within-ServiceMix-tp57717

Re: XML 2 JSON marshaling fails due to missing library in embedded Camel within ServiceMix

2015-09-22 Thread catshout
karaf@root>feature:info camel-xmljson Feature camel-xmljson 2.15.2 Details: Before using this feature make sure to install this bundle first manually: mvn :xom/xom/1.2.5 Feature has no configuration Feature has no configuration files Feature depends on: camel-core 2.15.2 Feature contains follow

XML 2 JSON marshaling fails due to missing library in embedded Camel within ServiceMix

2015-09-22 Thread catshout
Dear all, with following snippet I'm getting following error while deploying the route (even vice versa while trying to unmarshal) java.lang.NoClassDefFoundError: nu/xom/ParentNode ... java.lang.ClassNotFoundException: nu.xom.ParentNode not found by org.apache.servicemix.bundles.json-lib Seem

Re: Simple expression replaceAll causes an error when the input string containing a "." (dot)

2015-09-22 Thread catshout
Just checked the ServiceMix console, it says camel-2.15.2 -- View this message in context: http://camel.465427.n5.nabble.com/Simple-expression-replaceAll-causes-an-error-when-the-input-string-containing-a-dot-tp5771743p5771768.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Simple expression replaceAll causes an error when the input string containing a "." (dot)

2015-09-22 Thread catshout
Hi Claus, many thanks for the reply. We're working with Apache ServiceMix 6.0.0 that contains Apache Camel 2.14.3. I'm aware of the latest vanilla Apache Camel version 2.15.3. As we're focused on ServiceMix at all, a) is there a possible workaround for Camel 2.14.3 or b) is there a way to upgrad

Simple expression replaceAll causes an error when the input string containing a "." (dot)

2015-09-21 Thread catshout
Dear all, I'm gonna to filter out the value of "clientId" from a string like {"timestamp":1442843609,"status":200,"request":{"mbean":"org.apache.activemq:brokerName=amq-broker,type=Broker","attribute":"DurableTopicSubscribers","type":"read"},"value":[{"objectName":"org.apache.activemq:brokerName=

Simple expression replaceAll causes an error when the input string containing a "." (dot)

2015-09-21 Thread catshout
Dear all, I'm gonna to filter out the value of "clientId" from a string like {"timestamp":1442843609,"status":200,"request":{"mbean":"org.apache.activemq:brokerName=amq-broker,type=Broker","attribute":"DurableTopicSubscribers","type":"read"},"value":[{"objectName":"org.apache.activemq:brokerName=