How to restart the route if no response is returned from the web service call

2014-07-24 Thread Jaishankar
There are three routes, in each route a web service operation are called using CXF endpoint. In each route there is CXF endpoint to call web service. 1st route Begin 2nd route Modify 3rd route Commit If fault is returned from the web service call then stop the route. Lets take a scenario

Re: Sockets getting closed after 200 seconds

2014-07-24 Thread Claus Ibsen
Hi Maybe you have a firewall in between that closes inactive connections after X period of time. On Wed, Jul 23, 2014 at 9:52 PM, ashwin74268 sha.as...@gmail.com wrote: Hi , I am running into a strange problem of sockets getting closed after exact 200seconds. My application is OSGI bases

Re: Set providers property on uri for cxfrs endpoint

2014-07-24 Thread Claus Ibsen
Hi What version of Camel do you use? On Thu, Jul 24, 2014 at 2:01 AM, cdryst cdr...@gmail.com wrote: Hello I'm trying to set the providers property for the endpoint of my rest service: route id=restEndpoint from

Re: How to restart the route if no response is returned from the web service call

2014-07-24 Thread Jaishankar
This is my code.. This is properly executing but if no response then need to retry. Need some help Please -- View this message in context: http://camel.465427.n5.nabble.com/How-to-restart-the-route-if-no-response-is-returned-from-the-web-service-call-tp5754330p5754346.html Sent from the Camel

Re: How to restart the route if no response is returned from the web service call

2014-07-24 Thread Claus Ibsen
Hi I would write a java bean that controls the retry and whatnot as it seems you have a special need. And from the java bean you can use Camel's ProducerTemplate to easily call a Camel route / send a message to an endpoint. Then you can control the retry logic from java code which gives you the

Unit test XA enabled route

2014-07-24 Thread user3152723
Hello, Could someone please help me to get started: I’m looking for (working) example / tutorial on how to set up junit test for Camel route with jms and odbc endpoints (connetion pools) - USING BLUEPRINT OSGi (Karaf) and XA required. (Solution can be Fuse specific.) As an alternative, would it

Re: Unit test XA enabled route

2014-07-24 Thread user3152723
... tutorial on how to set up junit test for Camel route with jms and odbc endpoints (connetion pools) Thanks . osgi novice -- View this message in context: http://camel.465427.n5.nabble.com/Unit-test-XA-enabled-route-tp5754352p5754353.html Sent from the Camel - Users mailing list

Re: Unit test XA enabled route

2014-07-24 Thread user3152723
Third try to fix it right : db connetion with JDBC, not odbc . -- View this message in context: http://camel.465427.n5.nabble.com/Unit-test-XA-enabled-route-tp5754352p5754354.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: setBody(Object body, ClassT type) does not seem to set the body type

2014-07-24 Thread Claus Ibsen
Use a processor instead of a bean if you want to mutate the exchange, or make the bean return exchange On Wed, Jul 23, 2014 at 5:13 PM, bocamel johnz...@gmail.com wrote: I have the following in my camel context: onException exceptionorg.apache.cxf.binding.soap.SoapFault/exception

Re: Adding HTTP Headers to All Jetty Routes

2014-07-24 Thread Claus Ibsen
Hi You can use a custom http binding. See about this at http://camel.apache.org/jetty eg just extend the default, and add those headers in the writeResponse method, and call its super to do the actual writing. On Tue, Jul 22, 2014 at 9:20 PM, Gavagai tim.hoelsc...@gmail.com wrote: Hi all - I

XSLT transformation produces junk charachters

2014-07-24 Thread vdhawan
Hello, In my camel context, i invoke a java bean (which does some processing) and returns the body in the exchange. So far so good. from uri:file://blablba bean ref=myBean / log message=${body}/log convertBodyTo type=String/ to uri=xslt:Myxslt.xslt / log message=${body}/log The second log

Re: XSLT transformation produces junk charachters

2014-07-24 Thread Franz Paul Forsthofer
Hi, what format does return the bean, if it is a byte array or stream then you have to specify the encoding in the convertBodyTo type=String/ step:convertBodyTo type=String charset=your encdong / Regards Franz On Thu, Jul 24, 2014 at 12:17 PM, vdhawan vaibhav.10.dha...@gmail.com wrote: Hello,

naming routes with setId doesn't work on a specific machine

2014-07-24 Thread dermoritz
We encountered a very strange behavior. In our camel app we set the id of all routes via setId(id). This is working fine so far. One of our route builders generates n routes in a for loop and uses Prefix+EndUri as route id. Here set Route is called on a ThrottleDefinition. This is working fin on

Re: XSLT transformation produces junk charachters

2014-07-24 Thread vdhawan
Thanks for response Franz. Bean returns an object of javax.xml.transform.Source. Source s = new DOMSource(myObj) exchange.getOut().setBody(s); Thanks -- View this message in context: http://camel.465427.n5.nabble.com/XSLT-transformation-produces-junk-charachters-tp5754357p5754366.html Sent

Re: XSLT transformation produces junk charachters

2014-07-24 Thread Franz Paul Forsthofer
Hi, then you should try to find out how the DOMSource is transformed to String. I guess it is transfomed first to a Stream and then to String. In this case you need the correct encoding. Regards Franz On Thu, Jul 24, 2014 at 2:02 PM, vdhawan vaibhav.10.dha...@gmail.com wrote: Thanks for

Re: naming routes with setId doesn't work on a specific machine

2014-07-24 Thread Claus Ibsen
Hi Use .setRouteId to set the route id On Thu, Jul 24, 2014 at 2:00 PM, dermoritz tantea...@hotmail.com wrote: We encountered a very strange behavior. In our camel app we set the id of all routes via setId(id). This is working fine so far. One of our route builders generates n routes in a for

Only one, but difrent endpoints in same route, is this the way ?

2014-07-24 Thread Frankiboy
I have information in my header, where i look in a property fil, to get the correct url. So in my SetRoutingKey.class i have this line where i put the correct endpoint requestHeaders.put(CentralRouter.ENDPOINT, Util.getEndpoint()); but my .to(header(ENDPOINT).convertToString().toString())

Not able to define processor in Camel

2014-07-24 Thread nettome
Hi, I'm new to Camel and learning it step by step. I have a scenario where i have to process a task in a route. I'm creating a XML file and loading the routes from it. Below is my xml file - routes xmlns=http://camel.apache.org/schema/spring; bean id= jsonProcessor

Re: Not able to define processor in Camel

2014-07-24 Thread Claus Ibsen
Hi bean id= jsonProcessor class=com.validator.parser.JsonParser / should be outside route On Thu, Jul 24, 2014 at 2:22 PM, nettome gsharm...@gmail.com wrote: Hi, I'm new to Camel and learning it step by step. I have a scenario where i have to process a task in a route. I'm creating a XML

Re: Only one, but difrent endpoints in same route, is this the way ?

2014-07-24 Thread Claus Ibsen
Hi Maybe its this what you are looking for http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html On Thu, Jul 24, 2014 at 2:21 PM, Frankiboy mail.to.fra...@gmail.com wrote: I have information in my header, where i look in a property fil, to get the correct url. So in my

Re: XSLT transformation produces junk charachters

2014-07-24 Thread vdhawan
Thanks again Franz. Debugged a little bit more and it doesnt look like a type conversion issue. If i pass just tinker with input xml to the xslt, it works in some cases. More specifically *does not* work and ns:A xmlns:ns=http://mynamespace works. P.S - I am using xsl:copy-of

Re: Not able to define processor in Camel

2014-07-24 Thread nettome
Hi Claus, I tried that as below - bean id= jsonProcessor class=com.ericsson.pmed.validator.parser.JsonParser / routes xmlns=http://camel.apache.org/schema/spring; route id=fromFile from uri=file:/data/inbox/ process ref=jsonProcessor / to

Re: Not able to define processor in Camel

2014-07-24 Thread Claus Ibsen
Ah you load routes from an xml file, then you cannot define spring beans etc. You can use the class component http://camel.apache.org/class And instead of process then use to where the uri is using the class component And then remove the bean On Thu, Jul 24, 2014 at 2:37 PM, nettome

Re: XSLT transformation produces junk charachters

2014-07-24 Thread Grzegorz Grzybek
Hello See this issue in CAMEL: https://issues.apache.org/jira/browse/CAMEL-7424 and this issue in CXF: https://issues.apache.org/jira/browse/CXF-5733 What version of Camel do you use? regards Grzegorz Grzybek 2014-07-24 14:34 GMT+02:00 vdhawan vaibhav.10.dha...@gmail.com: Thanks again

Re: naming routes with setId doesn't work on a specific machine

2014-07-24 Thread dermoritz
on which class i can found setRouteId? It seems not part of RouteDefinition (http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/model/RouteDefinition.html) - i can't put it within route definition (from...to)?! but why to use another method here, until now this is

Re: XSLT transformation produces junk charachters

2014-07-24 Thread vdhawan
Bingo!! Exactly what i am facing. . I am using camel 2.12. As per the bug definition, this issue is a known issue for Xalan 2.7.1. Just checked my maven dependency tree, i can see *xalan:xalan:jar:2.7.0:compile* net.sf.saxon:Saxon-HE:jar:9.4:compile [INFO] | +- org.jdom:jdom:jar:1.1:compile

Re: Not able to define processor in Camel

2014-07-24 Thread nettome
Hi Claus, I did that and that has removed the error, thanks! check the xml below - routes xmlns=http://camel.apache.org/schema/spring; route id=fromFile from uri=file:/data/inbox?noop=ture/ to uri = class:com.validator.parser.JsonParser / to uri=cache:default

Re: Not able to define processor in Camel

2014-07-24 Thread Claus Ibsen
Hi You code had a sleep 4 sec that is not a lot of time. See how to keep running camel http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html On Thu, Jul 24, 2014 at 3:09 PM, nettome gsharm...@gmail.com wrote: Hi Claus, I did that and that has removed the error,

Re: Problem encrypting the password using Camel Jasypt component

2014-07-24 Thread Claus Ibsen
Hi There is also this ticket, maybe related to your issue https://issues.apache.org/jira/browse/CAMEL-7630 On Thu, Jul 24, 2014 at 3:07 PM, arvind arvindpradha...@gmail.com wrote: Thanks for your great help Ravi. I have regenerated the encrypted password using the master password and reading

Use Properties in a Predicate

2014-07-24 Thread arnoldmad
Hi ! I'm pretty new to camel and have the following Question: I have a route that uses multiple different components. based on the availability of external systems I might want to use a component or not. f.e. from('direct:startingPoint') .to('comp1:callToExternalComp1')

Re: Use Properties in a Predicate

2014-07-24 Thread Claus Ibsen
Use .when(simple('${properties:comp1URI} != 'DISABLED')) On Thu, Jul 24, 2014 at 3:23 PM, arnoldmad arn...@maderthaner.me wrote: Hi ! I'm pretty new to camel and have the following Question: I have a route that uses multiple different components. based on the availability of external

Re: Use Properties in a Predicate

2014-07-24 Thread arnoldmad
Thats the same thing I already tried with the following problem afterwards: route: .when(simple(${properties:pix.iti9.url} != 'DISABLED')) Caused by: groovy.lang.MissingPropertyException: No such property: pix for class: com.test.ClientRoute -- View this message in context:

Re: XSLT transformation produces junk charachters

2014-07-24 Thread vdhawan
Fixed it finally. I did not intend to use xalan for my transformations however Fuse was being forced to use this because of one the dependencies in my pom Saxon-HE. I upgraded to 9.5.1.1, and the maven dependency tree depicted that it no longer depended on xalan. I then used ?saxon=ture in my

Re: Use Properties in a Predicate

2014-07-24 Thread Claus Ibsen
Ah you are using groovy - you didnt tell. Or i didnt spot it. groovy thinks ${ } is a gstring. So use $simple{ xxx } to use the camel simple language syntax On Thu, Jul 24, 2014 at 3:33 PM, arnoldmad arn...@maderthaner.me wrote: Thats the same thing I already tried with the following problem

Re: Use Properties in a Predicate

2014-07-24 Thread arnoldmad
sorry forgot to mention but I'm also new to groovy :) so how do I need to change the when() line ? -- View this message in context: http://camel.465427.n5.nabble.com/Use-Properties-in-a-Predicate-tp5754392p5754398.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Unit test XA enabled route

2014-07-24 Thread arnaudeprez
Hi, Christian Mueler did a great camel in transaction sample : https://github.com/muellerc/camel-in-transaction Thx to him. -- View this message in context: http://camel.465427.n5.nabble.com/Unit-test-XA-enabled-route-tp5754352p5754402.html Sent from the Camel - Users mailing list archive at

Re: Set providers property on uri for cxfrs endpoint

2014-07-24 Thread cdryst
Hi Claus, I was using 2.12.2 and upgraded to 2.13.2 -- View this message in context: http://camel.465427.n5.nabble.com/Set-providers-property-on-uri-for-cxfrs-endpoint-tp5754319p5754403.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: naming routes with setId doesn't work on a specific machine

2014-07-24 Thread Matt Sicker
In the from...to... you would do: from(foo).routeId(CustomId).to(...) On 24 July 2014 07:49, dermoritz tantea...@hotmail.com wrote: on which class i can found setRouteId? It seems not part of RouteDefinition (

Re: naming routes with setId doesn't work on a specific machine

2014-07-24 Thread dermoritz
ok i found the solution: the problem was - the config on production was slightly diferent - without throttle. Calling setId on a ThrottleDefinition simply doesn't work (or at least does not set the route id). So i changed the code to set the id before doing routeDef = routeDef.throttle (How to

Re: Not able to define processor in Camel

2014-07-24 Thread nettome
I increased the time to 20 seconds still I my producer is not called. I don't think that's the problem. -- View this message in context: http://camel.465427.n5.nabble.com/Not-able-to-define-processor-in-Camel-tp5754376p5754406.html Sent from the Camel - Users mailing list archive at

RE: Camel Java routes using Timer firing only once

2014-07-24 Thread mikes300
*Hi Ravi,* I tried, but same results. Runs once but not again. Here are the log entries for it. I even tried omitting the context.stop, no success... 7:32:12,460 INFO [org.apache.camel.impl.DefaultCamelContext] (default task-4) Apache Camel 2.13.1 (CamelContext: camel-1) is starting

Re: Sockets getting closed after 200 seconds

2014-07-24 Thread ashwin74268
After analysis, I found that the socket were getting closed because of expiration of maxIdleTime in JettyHTTPServerEngine which is defaulted to 200 seconds. Is there a way to keep the socket connection alive forever? -- View this message in context:

Re: Not able to define processor in Camel

2014-07-24 Thread Claus Ibsen
And you are sure there is a file for the Camel route to pickup? On Thu, Jul 24, 2014 at 6:24 PM, nettome gsharm...@gmail.com wrote: I increased the time to 20 seconds still I my producer is not called. I don't think that's the problem. -- View this message in context:

Re: Unit test XA enabled route

2014-07-24 Thread user3152723
If you choose to run your integration (api) components in osgi (- Karaf - Fuse), you simply have to (that is: you have no alternative but) forget about TDD. May be not in theory, but take a dev team of Spring specialists, who can’t but start coding test cases to define required functionality…

RE: Camel Java routes using Timer firing only once

2014-07-24 Thread Ravindra.Godbole
It looks like in the sample code which starts camel context, you are also stopping the context. If you want timer to run continuously, your context should always be up and running as well. Can you also add a very long sleep command just to ensure that and test the same ? -Ravi

RE: Problem encrypting the password using Camel Jasypt component

2014-07-24 Thread Ravindra.Godbole
Enhancing the exception logging will help developer in such cases. If detailed message is not provided by the exception, name of the exception should be printed in logs . In this case FailedToCreateRouteException should check if cause.getMessage() is not null. In case it is null, name of

Re: Sockets getting closed after 200 seconds

2014-07-24 Thread Matt Sicker
I don't think TCP/IP works like that. You have to keep reconnecting every so often. On 24 July 2014 12:35, ashwin74268 sha.as...@gmail.com wrote: After analysis, I found that the socket were getting closed because of expiration of maxIdleTime in JettyHTTPServerEngine which is defaulted to

Re: Camel 2.13.1 MyBatis Batch Insert to Oracle 11g Table ORA-00933: SQL command not properly ended

2014-07-24 Thread sandeepreddip
Can someone help me with the issue??? -- View this message in context: http://camel.465427.n5.nabble.com/Camel-2-13-1-MyBatis-Batch-Insert-to-Oracle-11g-Table-ORA-00933-SQL-command-not-properly-ended-tp5754248p5754410.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Set providers property on uri for cxfrs endpoint

2014-07-24 Thread Willem Jiang
Provides can only takes a list as the parameter, if you just have one provider you can use provider option instead of providers option. I also find something wrong in your spring configuration file. Please don’t set the bean id with the string which starts with “#”. Camel treats the string