Re: JCIFS component and overwriting
Hi, Great thanks, Indeed, using "fileExist=Override" did the trick. I was thinking it was globally the default, but clearly not for the smb component. Thanks for your support. Regards. -- View this message in context: http://camel.465427.n5.nabble.com/JCIFS-component-and-overwriting-tp5773458p5773529.html Sent from the Camel - Users mailing list archive at Nabble.com.
JCIFS component and overwriting
Hi, I'm using : wireTap to smb:/// And when trying to overwrite, I get org.apache.camel.component.file.GenericFileOperationFailedException: Cannot store file smb:/// at org.apacheextras.camel.component.jcifs.SmbOperations.storeFile(SmbOperations.java:296) at org.apacheextras.camel.component.jcifs.SmbProducer.writeFile(SmbProducer.java:267) at org.apacheextras.camel.component.jcifs.SmbProducer.processExchange(SmbProducer.java:122) at org.apacheextras.camel.component.jcifs.SmbProducer.process(SmbProducer.java:70) at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61) at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:416) at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105) at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87) at org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:98) at org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:94) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: jcifs.smb.SmbException: The system cannot find the path specified. at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:563) at jcifs.smb.SmbTransport.send(SmbTransport.java:663) at jcifs.smb.SmbSession.send(SmbSession.java:238) at jcifs.smb.SmbTree.send(SmbTree.java:119) at jcifs.smb.SmbFile.send(SmbFile.java:775) at jcifs.smb.SmbFile.open0(SmbFile.java:989) at jcifs.smb.SmbFile.open(SmbFile.java:1006) at jcifs.smb.SmbFileOutputStream.(SmbFileOutputStream.java:142) at jcifs.smb.SmbFileOutputStream.(SmbFileOutputStream.java:97) at org.apacheextras.camel.component.jcifs.JcifsSmbApiFactory.createSmbFileOutputStream(JcifsSmbApiFactory.java:50) at org.apacheextras.camel.component.jcifs.DefaultSmbClient.storeFile(DefaultSmbClient.java:134) at org.apacheextras.camel.component.jcifs.SmbOperations.storeFile(SmbOperations.java:293) ... 14 more ERROR | Camel (PoplidaysCamelContext) thread #19 - WireTap | Could not locate or create direction 'smb:///' due to 'jcifs.smb.SmbException: Cannot create a file when that file already exists.' I review component documentation, and I didn't find any additionnal parameters, is there a simple way to do so ? Thanks in advance. -- View this message in context: http://camel.465427.n5.nabble.com/JCIFS-component-and-overwriting-tp5773458.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Quartz trigger problem
Hi, I suggest you to simply use this : Regards. -- View this message in context: http://camel.465427.n5.nabble.com/Quartz-trigger-problem-tp5772349p5772364.html Sent from the Camel - Users mailing list archive at Nabble.com.
concurrent consummers and threads
Hi, I'm trying to read on multithread way, new files in a folder, I'm playing this : route from uri=/some/path/here?scheduler=quartz2amp;scheduler.cron=0+10+3,10+*+*+?/ threads maxPoolSize=8 poolSize=8 process ref=myProcessor/ /threads /route I have the feeling it is not really synchronious multi-threading execution, Is it suppose to work such way ? Thanks in advance, Francois -- View this message in context: http://camel.465427.n5.nabble.com/concurrent-consummers-and-threads-tp5768698.html Sent from the Camel - Users mailing list archive at Nabble.com.
HeaderFilterStrategy example
Hi, I globbaly would like to do this : camelContext ... route from uri=activemq:test/ setHeader headerName=SecretInformationsimple${body}/simple/setHeader setHeader headerName=CamelHttpMethodconstantGET/constant/setHeader setHeader headerName=Acceptsimpletext/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8/simple/setHeader setHeader headerName=Accept-Languagesimplefr,en-US;q=0.8,en;q=0.6,es;q=0.4/simple/setHeader to uri=http://some-nice-remote-api/proc?HeaderFilterStrategy=z.mystrategy.myclass/ transformsimple${header.SecretInformation}/simple/transform to uri=http://advise-passed/ /route /camelContext Can you give me code example of HeaderFilterStrategy to avoid header.SecretInformation to be send to some-nice-remote-api, But reamainging available in the current exchange ? Thanks in advance, Francois -- View this message in context: http://camel.465427.n5.nabble.com/HeaderFilterStrategy-example-tp5767972.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Enrich/poolEnrich how to work with for file component ?
Thanks Claus. -- View this message in context: http://camel.465427.n5.nabble.com/Enrich-poolEnrich-how-to-work-with-for-file-component-tp5762573p5762605.html Sent from the Camel - Users mailing list archive at Nabble.com.
Enrich/poolEnrich how to work with for file component ?
This kind or routes don't work as expected : route from uri=activemq:in/ setHeader headerName=CamelFileNamesimplesome-known-file.xml/simple/setHeader enrich uri=file:/tmp/some/place?noop=true strategyRef=XmlAggregatorStrategy/ to uri=activemq:out/ /route (XmlAggregtorStrategy bean is working pretty fine, working as a charm with http2 component for example) Firing some message into activemq:in It modify me the content of /tmp/some/place/some-known-file.xml Instead of only enriching me my message... It must consider file component as producer instead of as consummer, Any idea how to reach my goal (without writing code, but only xml/spring routes) ? Thanks in advance -- View this message in context: http://camel.465427.n5.nabble.com/Enrich-poolEnrich-how-to-work-with-for-file-component-tp5762573.html Sent from the Camel - Users mailing list archive at Nabble.com.
Camel InOut time out
Hi, I would like to extend InOut timeout (to pass from 20 seconds to 40, and avoiding org.apache.camel.ExchangeTimedOutException). A way to do it easily in Spring ? Thanks in advance, Regards. -- View this message in context: http://camel.465427.n5.nabble.com/Camel-InOut-time-out-tp5761324.html Sent from the Camel - Users mailing list archive at Nabble.com.
Dynamic URI too short documentation
Hi, I spent hours to build dynamic URI with multiple parameters, header variables, and properties, both mixed. I believe it worth to extend little bit this document: http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html typically using {{myProperty}} would not work, mixed with ${header.myVar} values I propose you put a complete example, -- View this message in context: http://camel.465427.n5.nabble.com/Dynamic-URI-too-short-documentation-tp5758377.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Dynamic URI too short documentation
I propose you put a complete example, bean class=org.springframework.beans.factory.config.PropertyPlaceholderConfigurer property name=locations list valueclasspath:camel.properties/value /list /property /bean spring:camelContext routeContext route from uri=activemq:myQueue/ setHeader headerName=myVarxpath resultType=java.lang.String/root/myVar/xpath/setHeader recipientListsimplefile:/somePath/${properties:myProperty}/${header.myVar}/someSubDir/simple/recipientList /route -- View this message in context: http://camel.465427.n5.nabble.com/Dynamic-URI-too-short-documentation-tp5758377p5758378.html Sent from the Camel - Users mailing list archive at Nabble.com.
Logger on route level
Hi, I run a project with multiple routes. For debug purpose, I would like to know if it's possible to globally change logging option to a route (not to one of componenent but to the route itself. Something like route loggref=newLogger /route And everything inside this route, will by default, inherit of the predefined logger. Thanks in advance, Francois -- View this message in context: http://camel.465427.n5.nabble.com/Logger-on-route-level-tp5755666.html Sent from the Camel - Users mailing list archive at Nabble.com.
Aggregator, beyond the simple string example
Hi, I really enjoy the pattern enrich uri=... strategyRef=.../ It's straight forward and really very reusable, really great. Btw, beyond the StringInAggregatingStrategy documented example, does anybody have a real life XML Aggregating Strategy example ? Indeed, since, depending your endpoints, you do not control obviously the encoding variables, either your body type, try to aggregate : ?xml version=1.0 encoding=UTF-8?test1content/test1 with : ?xml version=1.0 encoding=ISO-8859-1?test2éèàù$ê£ë/test2 to obtain : ?xml version=1.0 encoding=UTF-8?xmltest1content/test1test2éèàù$ê£ë/test2/xml (encoded into utf-8) This is slightly more complex than just : String oldBody = oldExchange.getIn().getBody(String.class); String newBody = newExchange.getIn().getBody(String.class); result = xml + oldBody + newBody + /xml; ... I didn't get success trying to read newExchange as something else that a String.class, to get better Bytes level reading. Thanks in advance for any advice. Best regards, Francois -- View this message in context: http://camel.465427.n5.nabble.com/Aggregator-beyond-the-simple-string-example-tp5745012.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: xmljson in DSL without custom format ?
May serve to all, Find the answer to myself below : ... from uri=restlet:/myservice/{uid}?restletMethods=get,post / convertBodyTo type=java.lang.String / unmarshal ref=xmljson/ ... Regards. fliot33 wrote Hi, I'm trying to use have some XML of this string {info1:886,infor2: azesdqsd} ... from uri=restlet:/myservice/{uid}?restletMethods=get,post / log message=step1 : ${body}/ unmarshal ref=xmljsonWithOptions/ log message=step1 : ${body}/ ... dataFormats xmljson id=xmljson/ xmljson id=xmljsonWithOptions forceTopLevelObject=true trimSpaces=true rootName=nits skipNamespaces=true removeNamespacePrefixes=true expandableProperties=d e/ /dataFormats But, I get : net.sf.json.JSONException: Invalid JSON String at net.sf.json.JSONSerializer.toJSON(JSONSerializer.java:143) at net.sf.json.JSONSerializer.toJSON(JSONSerializer.java:103) Any idea ? Thanks in advance. -- View this message in context: http://camel.465427.n5.nabble.com/xmljson-in-DSL-without-custom-format-tp5743879p5743922.html Sent from the Camel - Users mailing list archive at Nabble.com.
Message router, multiple values
Hi, As per http://camel.apache.org/message-router.html How could I do something like that : route from uri=direct:a/ choice when allTestsShouldBeTrue xpath$foo1 = 'bar'/xpath xpath$foo2 = 'bar'/xpath xpath$foo3 = 'bar'/xpath /allTestsShouldBeTrue to uri=direct:b/ /when when allTestsShouldBeTrue xpath$foo1 = 'cheese'/xpath xpath$foo2 = 'cheese'/xpath xpath$foo3 = 'cheese'/xpath /allTestsShouldBeTrue to uri=direct:c/ /when otherwise to uri=direct:d/ /otherwise /choice /route Thanks in advance, Regards. -- View this message in context: http://camel.465427.n5.nabble.com/Message-router-multiple-values-tp5743857.html Sent from the Camel - Users mailing list archive at Nabble.com.
xmljson in DSL without custom format ?
Hi, I'm trying to use have some XML of this string {info1:886,infor2: azesdqsd} ... from uri=restlet:/myservice/{uid}?restletMethods=get,post / log message=step1 : ${body}/ unmarshal ref=xmljsonWithOptions/ log message=step1 : ${body}/ ... dataFormats xmljson id=xmljson/ xmljson id=xmljsonWithOptions forceTopLevelObject=true trimSpaces=true rootName=nits skipNamespaces=true removeNamespacePrefixes=true expandableProperties=d e/ /dataFormats But, I get : net.sf.json.JSONException: Invalid JSON String at net.sf.json.JSONSerializer.toJSON(JSONSerializer.java:143) at net.sf.json.JSONSerializer.toJSON(JSONSerializer.java:103) Any idea ? Thanks in advance. -- View this message in context: http://camel.465427.n5.nabble.com/xmljson-in-DSL-without-custom-format-tp5743879.html Sent from the Camel - Users mailing list archive at Nabble.com.