RE: CamelCreatedTimestamp exchange property does not seem to be present anymore in camel 3.3.0
Hello Claus, I saw the commits that solve my problem. Thank you for helping me out. -- Met vriendelijke groeten / Kind regards / Cordialement / Mit besten Grüßen, Ronny AERTS Product Owner Integrations / Integrations Manager e: ronny.ae...@wisetechglobal.com | t: +32 (0) 3 326 50 75 https://www.linkedin.com/in/ronnyaerts/ intris.be / wisetechglobal.com | Empowering and enabling the logistics industry globally. This email is subject to our Confidentiality Statement -Original Message- From: Claus Ibsen Sent: Tuesday, 26 May 2020 20:32 To: users@camel.apache.org Subject: Re: CamelCreatedTimestamp exchange property does not seem to be present anymore in camel 3.3.0 Created ticket https://urldefense.com/v3/__https://issues.apache.org/jira/browse/CAMEL-15114__;!!Na5NE8kfbMIR6Ys!59S7myqOQeKiBKA-3Gh8uVkFpzcYIUuf_pzUbxkGGMIZxxrP_VPG_eFQs_WGhsraJE0Oqp8$ On Tue, May 26, 2020 at 7:19 PM Claus Ibsen wrote: > > On Tue, May 26, 2020 at 5:36 PM Ronny Aerts > wrote: > > > > Hello Claus, > > > > No problem to create a ticket but still the exchange property > > CamelCreatedTimestamp is NOT defined and handling a "long" is good but > > would not help in my case because getting the property returns null. > > > > Yeah you would need to store a new exchange property before (or > header) yourself with the timestamp that the simple date function can > use. > > .setExchangeProperty("myCreated", simple("${exchange.created}")) > > > > > -- > > Met vriendelijke groeten / Kind regards / Cordialement / Mit besten > > Grüßen, > > > > Ronny AERTS > > Product Owner Integrations / Integrations Manager > > > > > > > > > > e: ronny.ae...@wisetechglobal.com | t: +32 (0) 3 326 50 75 > > https://urldefense.com/v3/__https://www.linkedin.com/in/ronnyaerts/_ > > _;!!Na5NE8kfbMIR6Ys!59S7myqOQeKiBKA-3Gh8uVkFpzcYIUuf_pzUbxkGGMIZxxrP > > _VPG_eFQs_WGhsraiN_bSVs$ intris.be / wisetechglobal.com | Empowering > > and enabling the logistics industry globally. > > This email is subject to our Confidentiality Statement > > > > > > -Original Message- > > From: Claus Ibsen > > Sent: Tuesday, 26 May 2020 17:26 > > To: users@camel.apache.org > > Subject: Re: CamelCreatedTimestamp exchange property does not seem > > to be present anymore in camel 3.3.0 > > > > On Tue, May 26, 2020 at 4:34 PM Ronny Aerts > > wrote: > > > > > > Hello Claus, > > > > > > Changing into > > > > > /> results in a "java.lang.IllegalArgumentException - Cannot find > > > java.util.Date object at command: exchangeProperty.CamelCreatedTimestamp". > > > Is this due to the fact that the exchange.created is now a java.lang.Long? > > > > > > > Ah yeah that is correct. We can make Camel support long also. You > > are welcome to create a JIRA ticket. > > > > > > > A groovy exchange.getProperty("CamelCreatedTimestamp") return a null. > > > > > > -- > > > Met vriendelijke groeten / Kind regards / Cordialement / Mit > > > besten Grüßen, > > > > > > Ronny AERTS > > > Product Owner Integrations / Integrations Manager > > > > > > > > > > > > > > > e: ronny.ae...@wisetechglobal.com | t: +32 (0) 3 326 50 75 > > > https://urldefense.com/v3/__https://www.linkedin.com/in/ronnyaerts > > > /__;!!Na5NE8kfbMIR6Ys!4uRqqDXlx-3LnTkCIB5OJs-DmvPcapT4A0xanxaCNEkf > > > sCfq9FpxcxpSj6kXDlgJq5SFTfM$ intris.be / wisetechglobal.com | > > > Empowering and enabling the logistics industry globally. > > > This email is subject to our Confidentiality Statement > > > > > > > > > -Original Message- > > > From: Claus Ibsen > > > Sent: Tuesday, 26 May 2020 16:07 > > > To: users@camel.apache.org > > > Subject: Re: CamelCreatedTimestamp exchange property does not seem > > > to be present anymore in camel 3.3.0 > > > > > > Hi > > > > > > Its called exchangeProperty in the simple language - the old property > > > name was deprecated also for 2.x. > > > > > > 3.x > > > https://urldefense.com/v3/__https://camel.apache.org/components/la > > > test/languages/simple-language.html__;!!Na5NE8kfbMIR6Ys!6ke8h_4LiS > > > in2gHySqFVPoznhQUTsWZChIq-IQPoVOnFzKBJXxAKaZn0_iB_IDheA7NFN8g$ > > > > > > 2.x > > > https://urldefense.com/v3/__https://camel.apache.org/components/2. > > > x/languages/simple-language.html__;!!Na5NE8kfbMIR6Ys!6ke8h_4
Re: CamelCreatedTimestamp exchange property does not seem to be present anymore in camel 3.3.0
Hello Claus, I have quite some trouble accepting your solution. The migration of spring dsl camel 2 to camel 3 is already difficult and it's hard for me to accept that I need to add a statement in more then 2000 routes. Especially for functionality which disappeared in the new version. vriendelijke groeten, Ronny Aerts Deze mail werd verstuurd via mijn mobiele telefoon. From: Claus Ibsen Sent: Tuesday, May 26, 2020 7:19:49 PM To: users@camel.apache.org Subject: Re: CamelCreatedTimestamp exchange property does not seem to be present anymore in camel 3.3.0 On Tue, May 26, 2020 at 5:36 PM Ronny Aerts wrote: > > Hello Claus, > > No problem to create a ticket but still the exchange property > CamelCreatedTimestamp is NOT defined and handling a "long" is good but would > not help in my case because getting the property returns null. > Yeah you would need to store a new exchange property before (or header) yourself with the timestamp that the simple date function can use. .setExchangeProperty("myCreated", simple("${exchange.created}")) > -- > Met vriendelijke groeten / Kind regards / Cordialement / Mit besten Grüßen, > > Ronny AERTS > Product Owner Integrations / Integrations Manager > > > > > e: ronny.ae...@wisetechglobal.com | t: +32 (0) 3 326 50 75 > > https://urldefense.com/v3/__https://www.linkedin.com/in/ronnyaerts/__;!!Na5NE8kfbMIR6Ys!4cllVnvJ1gsqp1B0AYAwxW0ahGDtGqnjeeYFw0R9UKIQHazjGz3_2aWH39Q9mOhxZLuInqg$ > intris.be / wisetechglobal.com | Empowering and enabling the logistics > industry globally. > This email is subject to our Confidentiality Statement > > > -Original Message- > From: Claus Ibsen > Sent: Tuesday, 26 May 2020 17:26 > To: users@camel.apache.org > Subject: Re: CamelCreatedTimestamp exchange property does not seem to be > present anymore in camel 3.3.0 > > On Tue, May 26, 2020 at 4:34 PM Ronny Aerts > wrote: > > > > Hello Claus, > > > > Changing into > > > /> results in a "java.lang.IllegalArgumentException - Cannot find > > java.util.Date object at command: exchangeProperty.CamelCreatedTimestamp". > > Is this due to the fact that the exchange.created is now a java.lang.Long? > > > > Ah yeah that is correct. We can make Camel support long also. You are > welcome to create a JIRA ticket. > > > > A groovy exchange.getProperty("CamelCreatedTimestamp") return a null. > > > > -- > > Met vriendelijke groeten / Kind regards / Cordialement / Mit besten Grüßen, > > > > Ronny AERTS > > Product Owner Integrations / Integrations Manager > > > > > > > > > > e: ronny.ae...@wisetechglobal.com | t: +32 (0) 3 326 50 75 > > > > https://urldefense.com/v3/__https://www.linkedin.com/in/ronnyaerts/__;!!Na5NE8kfbMIR6Ys!4uRqqDXlx-3LnTkCIB5OJs-DmvPcapT4A0xanxaCNEkfsCfq9FpxcxpSj6kXDlgJq5SFTfM$ > > intris.be / wisetechglobal.com | Empowering and enabling the logistics > > industry globally. > > This email is subject to our Confidentiality Statement > > > > > > -Original Message- > > From: Claus Ibsen > > Sent: Tuesday, 26 May 2020 16:07 > > To: users@camel.apache.org > > Subject: Re: CamelCreatedTimestamp exchange property does not seem to be > > present anymore in camel 3.3.0 > > > > Hi > > > > Its called exchangeProperty in the simple language - the old property name > > was deprecated also for 2.x. > > > > 3.x > > https://urldefense.com/v3/__https://camel.apache.org/components/latest/languages/simple-language.html__;!!Na5NE8kfbMIR6Ys!6ke8h_4LiSin2gHySqFVPoznhQUTsWZChIq-IQPoVOnFzKBJXxAKaZn0_iB_IDheA7NFN8g$ > > > > 2.x > > https://urldefense.com/v3/__https://camel.apache.org/components/2.x/languages/simple-language.html__;!!Na5NE8kfbMIR6Ys!6ke8h_4LiSin2gHySqFVPoznhQUTsWZChIq-IQPoVOnFzKBJXxAKaZn0_iB_IDhepyDCZkM$ > > > > On Tue, May 26, 2020 at 3:14 PM Ronny Aerts > > wrote: > > > > > > Hello camel community, > > > > > > I’m taking my first steps in migrating from camel 2.25.1 to 3.0.0. Since > > > (nearly) all our camel routes (more then 2000) are written using spring > > > dsl, this migration is a very big job. > > > > > > One of the things I notice is the missing CamelCreatedTimestamp exchange > > > property. We do a lot of things like the one below and that is not > > > possible anymore without the CamelCreatedTimestamp. > > > > > uri="timer://test.exception.standard.scheduler?repeatCount=1" /> > > message="start of route > > > (${date:proper
RE: CamelCreatedTimestamp exchange property does not seem to be present anymore in camel 3.3.0
Hello Claus, No problem to create a ticket but still the exchange property CamelCreatedTimestamp is NOT defined and handling a "long" is good but would not help in my case because getting the property returns null. -- Met vriendelijke groeten / Kind regards / Cordialement / Mit besten Grüßen, Ronny AERTS Product Owner Integrations / Integrations Manager e: ronny.ae...@wisetechglobal.com | t: +32 (0) 3 326 50 75 https://www.linkedin.com/in/ronnyaerts/ intris.be / wisetechglobal.com | Empowering and enabling the logistics industry globally. This email is subject to our Confidentiality Statement -Original Message- From: Claus Ibsen Sent: Tuesday, 26 May 2020 17:26 To: users@camel.apache.org Subject: Re: CamelCreatedTimestamp exchange property does not seem to be present anymore in camel 3.3.0 On Tue, May 26, 2020 at 4:34 PM Ronny Aerts wrote: > > Hello Claus, > > Changing into > > results in a "java.lang.IllegalArgumentException - Cannot find java.util.Date > object at command: exchangeProperty.CamelCreatedTimestamp". > Is this due to the fact that the exchange.created is now a java.lang.Long? > Ah yeah that is correct. We can make Camel support long also. You are welcome to create a JIRA ticket. > A groovy exchange.getProperty("CamelCreatedTimestamp") return a null. > > -- > Met vriendelijke groeten / Kind regards / Cordialement / Mit besten Grüßen, > > Ronny AERTS > Product Owner Integrations / Integrations Manager > > > > > e: ronny.ae...@wisetechglobal.com | t: +32 (0) 3 326 50 75 > > https://urldefense.com/v3/__https://www.linkedin.com/in/ronnyaerts/__;!!Na5NE8kfbMIR6Ys!4uRqqDXlx-3LnTkCIB5OJs-DmvPcapT4A0xanxaCNEkfsCfq9FpxcxpSj6kXDlgJq5SFTfM$ > intris.be / wisetechglobal.com | Empowering and enabling the logistics > industry globally. > This email is subject to our Confidentiality Statement > > > -Original Message- > From: Claus Ibsen > Sent: Tuesday, 26 May 2020 16:07 > To: users@camel.apache.org > Subject: Re: CamelCreatedTimestamp exchange property does not seem to be > present anymore in camel 3.3.0 > > Hi > > Its called exchangeProperty in the simple language - the old property name > was deprecated also for 2.x. > > 3.x > https://urldefense.com/v3/__https://camel.apache.org/components/latest/languages/simple-language.html__;!!Na5NE8kfbMIR6Ys!6ke8h_4LiSin2gHySqFVPoznhQUTsWZChIq-IQPoVOnFzKBJXxAKaZn0_iB_IDheA7NFN8g$ > > 2.x > https://urldefense.com/v3/__https://camel.apache.org/components/2.x/languages/simple-language.html__;!!Na5NE8kfbMIR6Ys!6ke8h_4LiSin2gHySqFVPoznhQUTsWZChIq-IQPoVOnFzKBJXxAKaZn0_iB_IDhepyDCZkM$ > > On Tue, May 26, 2020 at 3:14 PM Ronny Aerts > wrote: > > > > Hello camel community, > > > > I’m taking my first steps in migrating from camel 2.25.1 to 3.0.0. Since > > (nearly) all our camel routes (more then 2000) are written using spring > > dsl, this migration is a very big job. > > > > One of the things I notice is the missing CamelCreatedTimestamp exchange > > property. We do a lot of things like the one below and that is not possible > > anymore without the CamelCreatedTimestamp. > > > uri="timer://test.exception.standard.scheduler?repeatCount=1" /> > message="start of route > > (${date:property.CamelCreatedTimestamp:-MM-dd-HH:mm:ss.SSS})" /> ... > > > > > > > > I know that the context of the property corresponds to > > "exchange.getCreated()" but this statement is not available in spring dsl. > > > > I know that I can replace the "property.CamelCreatedTimestamp" by "now" but > > then the "end of route" values is not the same as the "start of route" > > value. > > > > Is there any workaround available for my problem. > > > > -- > > Met vriendelijke groeten / Kind regards / Cordialement / Mit besten > > Grüßen, > > > > Ronny AERTS > > Product Owner Integrations / Integrations Manager > > e: mailto:ronny.ae...@wisetechglobal.com | t: +32 (0) 3 326 50 75 > > https://urldefense.com/v3/__https://www.linkedin.com/in/ronnyaerts/__; > > !!Na5NE8kfbMIR6Ys!6ke8h_4LiSin2gHySqFVPoznhQUTsWZChIq-IQPoVOnFzKBJXxAK > > aZn0_iB_IDhe5aI4ils$ https://www.intris.be/ / > > https://www.wisetechglobal.com/ | Empowering and enabling the logistics > > industry globally. > > This email is subject to our > > http://www.wisetechglobal.com/ConfidentialityStatement.html > > > > > > > > > > Intris nv Wapenstilstandlaan 47 B-2600 Berchem > > > > DISCLAIMER > > This is an e-mail from Intris. The information contained
how to use global camel context properties in camel 3.3.0 groovy external script file
Hello camel community, I'm taking my first steps in migrating from camel 2.25.1 to 3.0.0. Since (nearly) all our camel routes (more then 2000) are written using spring dsl, this migration is a very big job. Our spring dsl routes regularly use external file scripting for doing some "coding" things. Until now, we used javascript for those scripting requirements. Javascript is not supported anymore in camel3 (and newer java versions) and therefore we will switch to groovy as scripting language. I have several scripts where I need to access global camel context properties. In javascript, I did a properties.resolve("tris.dlq.mailer.to") call to resolve the properties. The groovy language documentation<https://camel.apache.org/components/latest/languages/groovy-language.html> shows that the properties (as org.apache.camel.builder.script.PropertiesFunction) are passed to the external groovy file but I does not seems to work. A display of the groovy properties variables shows something like "{class=class Script_8adfd05454ebe3bbb0f3980896103164, binding=groovy.lang.Binding@62787393}" of type java.util.LinkedHashMap. Examining the content of the "binding" also proves that there is no "properties" available. The question I have for the community is how to work with global camel context properties in groovy. Possible solutions could be: 1. value = camelContext.getPropertiesComponent().resolveProperty("tris.dlq.mailer.to").get(); ==> gives a good result 2. value = camelContext.globalOptions.get("tris.dlq.mailer.to"); ==> gives a good result 3. value = org.apache.camel.builder.Builder.simple("properties:tris.dlq.mailer.to").evaluate(exchange, java.lang.String.class); ==> gives "properties:tris.dlq.mailer.to" as result and is not good 4. value = org.apache.camel.builder.Builder.simple("${properties:tris.dlq.mailer.to}").evaluate(exchange, java.lang.String.class); ==> gives a "No such property: tris for class: Script_56c358fac7b1c2c9df318d99c84d4670" error message. The first option seems to be the best because it also supports default values. -- Met vriendelijke groeten / Kind regards / Cordialement / Mit besten Grüßen, Ronny AERTS Product Owner Integrations / Integrations Manager [signature_1746717844] [cid:image003.png@01D6334D.FA336960] e: ronny.ae...@wisetechglobal.com<mailto:ronny.ae...@wisetechglobal.com> | t: +32 (0) 3 326 50 75 [CE7884FF] https://www.linkedin.com/in/ronnyaerts/ intris.be<https://www.intris.be/> / wisetechglobal.com<https://www.wisetechglobal.com/> | Empowering and enabling the logistics industry globally. This email is subject to our Confidentiality Statement<http://www.wisetechglobal.com/ConfidentialityStatement.html> Intris nv Wapenstilstandlaan 47 B-2600 Berchem DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify intris.supp...@wisetechglobal.com<mailto:intris.supp...@wisetechglobal.com>, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
how to use global camel context properties in camel 3.3.0 groovy external script file
Hello camel community, I’m taking my first steps in migrating from camel 2.25.1 to 3.0.0. Since (nearly) all our camel routes (more then 2000) are written using spring dsl, this migration is a very big job. Our spring dsl routes regularly use external file scripting for doing some “coding” things. Until now, we used javascript for those scripting requirements. Javascript is not supported anymore in camel3 (and newer java versions) and therefore we will switch to groovy as scripting language. I have several scripts where I need to access global camel context properties. In javascript, I did a properties.resolve("tris.dlq.mailer.to") call to resolve the properties. The https://camel.apache.org/components/latest/languages/groovy-language.html shows that the properties (as org.apache.camel.builder.script.PropertiesFunction) are passed to the external groovy file but I does not seems to work. A display of the groovy properties variables shows something like “{class=class Script_8adfd05454ebe3bbb0f3980896103164, binding=groovy.lang.Binding@62787393}” of type java.util.LinkedHashMap. Examining the content of the “binding” also proves that there is no “properties” available. The question I have for the community is how to work with global camel context properties in groovy. Possible solutions could be: 1. value = camelContext.getPropertiesComponent().resolveProperty("tris.dlq.mailer.to").get(); ⇒ gives a good result 2. value = camelContext.globalOptions.get("tris.dlq.mailer.to"); ⇒ gives a good result 3. value = org.apache.camel.builder.Builder.simple("properties:tris.dlq.mailer.to").evaluate(exchange, java.lang.String.class); ⇒ gives “properties:tris.dlq.mailer.to” as result and is not good 4. value = org.apache.camel.builder.Builder.simple("${properties:tris.dlq.mailer.to}").evaluate(exchange, java.lang.String.class); ⇒ gives a “No such property: tris for class: Script_56c358fac7b1c2c9df318d99c84d4670” error message. The first option seems to be the best because it also supports default values. -- Met vriendelijke groeten / Kind regards / Cordialement / Mit besten Grüßen, Ronny AERTS Product Owner Integrations / Integrations Manager e: mailto:ronny.ae...@wisetechglobal.com | t: +32 (0) 3 326 50 75 https://www.linkedin.com/in/ronnyaerts/ https://www.intris.be/ / https://www.wisetechglobal.com/ | Empowering and enabling the logistics industry globally. This email is subject to our http://www.wisetechglobal.com/ConfidentialityStatement.html Intris nv Wapenstilstandlaan 47 B-2600 Berchem DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify intris.supp...@wisetechglobal.com<mailto:intris.supp...@wisetechglobal.com>, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
RE: CamelCreatedTimestamp exchange property does not seem to be present anymore in camel 3.3.0
Hello Claus, Changing into results in a "java.lang.IllegalArgumentException - Cannot find java.util.Date object at command: exchangeProperty.CamelCreatedTimestamp". Is this due to the fact that the exchange.created is now a java.lang.Long? A groovy exchange.getProperty("CamelCreatedTimestamp") return a null. -- Met vriendelijke groeten / Kind regards / Cordialement / Mit besten Grüßen, Ronny AERTS Product Owner Integrations / Integrations Manager e: ronny.ae...@wisetechglobal.com | t: +32 (0) 3 326 50 75 https://www.linkedin.com/in/ronnyaerts/ intris.be / wisetechglobal.com | Empowering and enabling the logistics industry globally. This email is subject to our Confidentiality Statement -Original Message- From: Claus Ibsen Sent: Tuesday, 26 May 2020 16:07 To: users@camel.apache.org Subject: Re: CamelCreatedTimestamp exchange property does not seem to be present anymore in camel 3.3.0 Hi Its called exchangeProperty in the simple language - the old property name was deprecated also for 2.x. 3.x https://urldefense.com/v3/__https://camel.apache.org/components/latest/languages/simple-language.html__;!!Na5NE8kfbMIR6Ys!6ke8h_4LiSin2gHySqFVPoznhQUTsWZChIq-IQPoVOnFzKBJXxAKaZn0_iB_IDheA7NFN8g$ 2.x https://urldefense.com/v3/__https://camel.apache.org/components/2.x/languages/simple-language.html__;!!Na5NE8kfbMIR6Ys!6ke8h_4LiSin2gHySqFVPoznhQUTsWZChIq-IQPoVOnFzKBJXxAKaZn0_iB_IDhepyDCZkM$ On Tue, May 26, 2020 at 3:14 PM Ronny Aerts wrote: > > Hello camel community, > > I’m taking my first steps in migrating from camel 2.25.1 to 3.0.0. Since > (nearly) all our camel routes (more then 2000) are written using spring dsl, > this migration is a very big job. > > One of the things I notice is the missing CamelCreatedTimestamp exchange > property. We do a lot of things like the one below and that is not possible > anymore without the CamelCreatedTimestamp. > uri="timer://test.exception.standard.scheduler?repeatCount=1" /> message="start of route > (${date:property.CamelCreatedTimestamp:-MM-dd-HH:mm:ss.SSS})" /> ... > > > > I know that the context of the property corresponds to > "exchange.getCreated()" but this statement is not available in spring dsl. > > I know that I can replace the "property.CamelCreatedTimestamp" by "now" but > then the "end of route" values is not the same as the "start of route" value. > > Is there any workaround available for my problem. > > -- > Met vriendelijke groeten / Kind regards / Cordialement / Mit besten > Grüßen, > > Ronny AERTS > Product Owner Integrations / Integrations Manager > e: mailto:ronny.ae...@wisetechglobal.com | t: +32 (0) 3 326 50 75 > https://urldefense.com/v3/__https://www.linkedin.com/in/ronnyaerts/__; > !!Na5NE8kfbMIR6Ys!6ke8h_4LiSin2gHySqFVPoznhQUTsWZChIq-IQPoVOnFzKBJXxAK > aZn0_iB_IDhe5aI4ils$ https://www.intris.be/ / > https://www.wisetechglobal.com/ | Empowering and enabling the logistics > industry globally. > This email is subject to our > http://www.wisetechglobal.com/ConfidentialityStatement.html > > > > > Intris nv Wapenstilstandlaan 47 B-2600 Berchem > > DISCLAIMER > This is an e-mail from Intris. The information contained in this > communication is intended solely for use by the individual or entity to whom > it is addressed. > Use of this communication by others is prohibited. If the e-mail message was > sent to you by mistake, please notify > intris.supp...@wisetechglobal.com<mailto:intris.supp...@wisetechglobal.com>, > destroy it without reading, using, copying or disclosing its contents to any > other person. > We accept no liability for damage related to data and/or documents which are > communicated by electronic mail. -- Claus Ibsen - https://urldefense.com/v3/__http://davsclaus.com__;!!Na5NE8kfbMIR6Ys!6ke8h_4LiSin2gHySqFVPoznhQUTsWZChIq-IQPoVOnFzKBJXxAKaZn0_iB_IDheiuhjSRY$ @davsclaus Camel in Action 2: https://urldefense.com/v3/__https://www.manning.com/ibsen2__;!!Na5NE8kfbMIR6Ys!6ke8h_4LiSin2gHySqFVPoznhQUTsWZChIq-IQPoVOnFzKBJXxAKaZn0_iB_IDhesl4LW74$ Intris nv Wapenstilstandlaan 47 B-2600 Berchem DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify intris.supp...@wisetechglobal.com<mailto:intris.supp...@wisetechglobal.com>, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
how to use global camel context properties in camel 3.3.0 groovy external script file
Hello camel community, I’m taking my first steps in migrating from camel 2.25.1 to 3.0.0. Since (nearly) all our camel routes (more then 2000) are written using spring dsl, this migration is a very big job. Our spring dsl routes regularly use external file scripting for doing some “coding” things. Until now, we used javascript for those scripting requirements. Javascript is not supported anymore in camel3 (and newer java versions) and therefore we will switch to groovy as scripting language. I have several scripts where I need to access global camel context properties. In javascript, I did a properties.resolve("tris.dlq.mailer.to") call to resolve the properties. The https://camel.apache.org/components/latest/languages/groovy-language.html shows that the properties (as org.apache.camel.builder.script.PropertiesFunction) are passed to the external groovy file but I does not seems to work. A display of the groovy properties variables shows something like “{class=class Script_8adfd05454ebe3bbb0f3980896103164, binding=groovy.lang.Binding@62787393}” of type java.util.LinkedHashMap. Examining the content of the “binding” also proves that there is no “properties” available. The question I have for the community is how to work with global camel context properties in groovy. Possible solutions could be: 1. value = camelContext.getPropertiesComponent().resolveProperty("tris.dlq.mailer.to").get(); ⇒ gives a good result 2. value = camelContext.globalOptions.get("tris.dlq.mailer.to"); ⇒ gives a good result 3. value = org.apache.camel.builder.Builder.simple("properties:tris.dlq.mailer.to").evaluate(exchange, java.lang.String.class); ⇒ gives “properties:tris.dlq.mailer.to” as result and is not good 4. value = org.apache.camel.builder.Builder.simple("${properties:tris.dlq.mailer.to}").evaluate(exchange, java.lang.String.class); ⇒ gives a “No such property: tris for class: Script_56c358fac7b1c2c9df318d99c84d4670” error message. The first option seems to be the best because it also supports default values. -- Met vriendelijke groeten / Kind regards / Cordialement / Mit besten Grüßen, Ronny AERTS Product Owner Integrations / Integrations Manager e: mailto:ronny.ae...@wisetechglobal.com | t: +32 (0) 3 326 50 75 https://www.linkedin.com/in/ronnyaerts/ https://www.intris.be/ / https://www.wisetechglobal.com/ | Empowering and enabling the logistics industry globally. This email is subject to our http://www.wisetechglobal.com/ConfidentialityStatement.html Intris nv Wapenstilstandlaan 47 B-2600 Berchem DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify intris.supp...@wisetechglobal.com<mailto:intris.supp...@wisetechglobal.com>, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
CamelCreatedTimestamp exchange property does not seem to be present anymore in camel 3.3.0
Hello camel community, I’m taking my first steps in migrating from camel 2.25.1 to 3.0.0. Since (nearly) all our camel routes (more then 2000) are written using spring dsl, this migration is a very big job. One of the things I notice is the missing CamelCreatedTimestamp exchange property. We do a lot of things like the one below and that is not possible anymore without the CamelCreatedTimestamp. ... I know that the context of the property corresponds to "exchange.getCreated()" but this statement is not available in spring dsl. I know that I can replace the "property.CamelCreatedTimestamp" by "now" but then the "end of route" values is not the same as the "start of route" value. Is there any workaround available for my problem. -- Met vriendelijke groeten / Kind regards / Cordialement / Mit besten Grüßen, Ronny AERTS Product Owner Integrations / Integrations Manager e: mailto:ronny.ae...@wisetechglobal.com | t: +32 (0) 3 326 50 75 https://www.linkedin.com/in/ronnyaerts/ https://www.intris.be/ / https://www.wisetechglobal.com/ | Empowering and enabling the logistics industry globally. This email is subject to our http://www.wisetechglobal.com/ConfidentialityStatement.html Intris nv Wapenstilstandlaan 47 B-2600 Berchem DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify intris.supp...@wisetechglobal.com<mailto:intris.supp...@wisetechglobal.com>, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
RE: does camel http4 clear the attachments of a message
Hello Claus, I'll make a property with an imap message in it so I can add the attachements during the flow of the process. Thank you for the assistance. -- vriendelijke groeten, Ronny Aerts – Intris nv – Wapenstilstandlaan 47, 2600 Berchem, België Product Owner Integrations / Integrations Manager Prince II certified – ITIL certified Tel: +32-3-326.50.75 -Original Message- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: woensdag 17 januari 2018 10:36 To: users@camel.apache.org Subject: Re: does camel http4 clear the attachments of a message You can store stuff on exchange properties and they will stay there always - that is better and safer in your use-case. On Wed, Jan 17, 2018 at 10:29 AM, Ronny Aerts <ronny.ae...@intris.be> wrote: > Hello Claus, > > I have a combination of serveral routes connected together over a "direct". > Each of the routes produce html output which I have to keep for sending an > overall mail at the end. > > -- > vriendelijke groeten, > Ronny Aerts – Intris nv – Wapenstilstandlaan 47, 2600 Berchem, België > Product Owner Integrations / Integrations Manager Prince II certified > – ITIL certified > Tel: +32-3-326.50.75 > > -Original Message- > From: Claus Ibsen [mailto:claus.ib...@gmail.com] > Sent: woensdag 17 januari 2018 8:42 > To: users@camel.apache.org > Subject: Re: does camel http4 clear the attachments of a message > > So what do you have in those attachments and why do you want to keep them? > Where do you use them later? Can you tell more about this. > > And you can take a look at content enricher eip to do the get call where you > can "merge" any response from the http call to your current message and > therefore control to keep the attachments and whatelse you want. > > On Tue, Jan 16, 2018 at 11:08 PM, Ronny Aerts <ronny.ae...@intris.be> wrote: >> Hello camel user community, >> >> >> It seems that the camel http4 component clears/removes my existing camel >> message attachments during a http get operation. >> >> Can this be confirmed? >> >> Can I avoid this? >> >> >> -- >> >> vriendelijke groeten, >> Ronny Aerts<mailto:ronny.ae...@intris.be> – Intris nv – >> Wapenstilstandlaan 47, 2600 Berchem, België Product Owner >> Integrations / Integrations Manager >> >> Prince II<http://nl.wikipedia.org/wiki/PRINCE2> certified – >> ITIL<http://nl.wikipedia.org/wiki/Information_Technology_Infrastructu >> r >> e_Library> certified >> >> Tel: +32-3-326.50.75 >> >> >> Intris nv >> Wapenstilstandlaan 47 >> B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 >> www.intris.be<http://www.intris.be/> >> DISCLAIMER >> This is an e-mail from Intris. The information contained in this >> communication is intended solely for use by the individual or entity to whom >> it is addressed. >> Use of this communication by others is prohibited. If the e-mail message was >> sent to you by mistake, please notify >> supp...@intris.be<mailto:supp...@intris.be>, destroy it without reading, >> using, copying or disclosing its contents to any other person. >> We accept no liability for damage related to data and/or documents which are >> communicated by electronic mail. > > > > -- > Claus Ibsen > - > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2 > > > Intris nv > Wapenstilstandlaan 47 > B-2600 Berchem Tel. +32 3 326 50 75 > Fax +32 3 326 42 23 > www.intris.be<http://www.intris.be/> > DISCLAIMER > This is an e-mail from Intris. The information contained in this > communication is intended solely for use by the individual or entity to whom > it is addressed. > Use of this communication by others is prohibited. If the e-mail message was > sent to you by mistake, please notify > supp...@intris.be<mailto:supp...@intris.be>, destroy it without reading, > using, copying or disclosing its contents to any other person. > We accept no liability for damage related to data and/or documents which are > communicated by electronic mail. -- Claus Ibsen - http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2 Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.be<http://www.intris.be/> DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.be<mailto:supp...@intris.be>, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
RE: does camel http4 clear the attachments of a message
Hello Claus, I have a combination of serveral routes connected together over a "direct". Each of the routes produce html output which I have to keep for sending an overall mail at the end. -- vriendelijke groeten, Ronny Aerts – Intris nv – Wapenstilstandlaan 47, 2600 Berchem, België Product Owner Integrations / Integrations Manager Prince II certified – ITIL certified Tel: +32-3-326.50.75 -Original Message- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: woensdag 17 januari 2018 8:42 To: users@camel.apache.org Subject: Re: does camel http4 clear the attachments of a message So what do you have in those attachments and why do you want to keep them? Where do you use them later? Can you tell more about this. And you can take a look at content enricher eip to do the get call where you can "merge" any response from the http call to your current message and therefore control to keep the attachments and whatelse you want. On Tue, Jan 16, 2018 at 11:08 PM, Ronny Aerts <ronny.ae...@intris.be> wrote: > Hello camel user community, > > > It seems that the camel http4 component clears/removes my existing camel > message attachments during a http get operation. > > Can this be confirmed? > > Can I avoid this? > > > -- > > vriendelijke groeten, > Ronny Aerts<mailto:ronny.ae...@intris.be> – Intris nv – > Wapenstilstandlaan 47, 2600 Berchem, België Product Owner Integrations > / Integrations Manager > > Prince II<http://nl.wikipedia.org/wiki/PRINCE2> certified – > ITIL<http://nl.wikipedia.org/wiki/Information_Technology_Infrastructur > e_Library> certified > > Tel: +32-3-326.50.75 > > > Intris nv > Wapenstilstandlaan 47 > B-2600 Berchem Tel. +32 3 326 50 75 > Fax +32 3 326 42 23 > www.intris.be<http://www.intris.be/> > DISCLAIMER > This is an e-mail from Intris. The information contained in this > communication is intended solely for use by the individual or entity to whom > it is addressed. > Use of this communication by others is prohibited. If the e-mail message was > sent to you by mistake, please notify > supp...@intris.be<mailto:supp...@intris.be>, destroy it without reading, > using, copying or disclosing its contents to any other person. > We accept no liability for damage related to data and/or documents which are > communicated by electronic mail. -- Claus Ibsen - http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2 Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.be<http://www.intris.be/> DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.be<mailto:supp...@intris.be>, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
does camel http4 clear the attachments of a message
Hello camel user community, It seems that the camel http4 component clears/removes my existing camel message attachments during a http get operation. Can this be confirmed? Can I avoid this? -- vriendelijke groeten, Ronny Aerts<mailto:ronny.ae...@intris.be> – Intris nv – Wapenstilstandlaan 47, 2600 Berchem, België Product Owner Integrations / Integrations Manager Prince II<http://nl.wikipedia.org/wiki/PRINCE2> certified – ITIL<http://nl.wikipedia.org/wiki/Information_Technology_Infrastructure_Library> certified Tel: +32-3-326.50.75 Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.be<http://www.intris.be/> DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.be<mailto:supp...@intris.be>, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
JasyptPropertiesParser fails on default value
Hello communicty, I'm using the JasyptPropertiesParser in combination with the BridgePropertyPlaceholderConfigurer to able to encrypt properties by adding the parser property. This works fine but when I have a "tris.dlq.folder.process.history:c:/temp/TrisESB" property with a default value in my xml route, the route creating fails with error: Caused by: java.lang.IllegalArgumentException: PropertiesComponent with name properties must be defined in CamelContext to support property placeholders. Property with key [tris.dlq.folder.process.history:c:/temp/TrisESB] not found in properties from text: file://{{tris.dlq.folder.process.history:c:/temp/TrisESB}}?fileName=$simple{header.breadcrumbId}-prochist.htm My log also mentions the parsing of the property. [TRACE] [org.apache.camel.component.jasypt.JasyptPropertiesParser] Parsing property 'tris.dlq.folder.process.history:c:/temp/TrisESB=null' Has someone seen this before? It seems that the JasyptPropertiesParser can't handle default properties. -- vriendelijke groeten, Ronny Aerts<mailto:ronny.ae...@intris.be> - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, België Product Owner Integrations / Integrations Manager Prince II<http://nl.wikipedia.org/wiki/PRINCE2> certified - ITIL<http://nl.wikipedia.org/wiki/Information_Technology_Infrastructure_Library> certified Tel: +32-3-326.50.75 Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.be<http://www.intris.be/> DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.be<mailto:supp...@intris.be>, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
RE: Camel Live Reload of XML routes when using routeContextRef's
Hello Claus, I created jira tickets CAMEL-11272, CAMEL-11273, CAMEL-11274, CAMEL-11275. I now created a bean which sets the ReloadStrategy on the camel context. Is there another method of specifying an alternative ReloadStrategy using the camel-maven-plugin? -- vriendelijke groeten, Ronny Aerts – Intris nv – Wapenstilstandlaan 47, 2600 Berchem, België Product Owner Integrations / Integrations Manager Prince II certified – ITIL certified Tel: +32-3-326.50.75 -Original Message- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: zaterdag 13 mei 2017 9:37 To: users@camel.apache.org Subject: Re: Camel Live Reload of XML routes when using routeContextRef's Hi I suggest you take a look at the existing code and see if anything needs to be changed/improve to make it work for you. Then you can provide a patch as github PR and log a JIRA. Then we can get this in the next 2.19.1 release. On Fri, May 12, 2017 at 7:54 PM, Ronny Aerts <ronny.ae...@intris.be> wrote: > Hello Claus, > > Thank you for your quick answer. > > I looked into FileWatcherReloadStrategy and ReloadStrategySupport > (onReloadXml) and it should be possible for me to extend it to reload > routecontext's. The remaining point is how to connect the extended code to > the camelcontext just by using xml only (since we never use java to start the > camelcontext). > > -- > vriendelijke groeten, > Ronny Aerts – Intris nv – Wapenstilstandlaan 47, 2600 Berchem, België > Product Owner Integrations / Integrations Manager Prince II certified > – ITIL certified > Tel: +32-3-326.50.75 > > -Original Message- > From: Claus Ibsen [mailto:claus.ib...@gmail.com] > Sent: vrijdag 12 mei 2017 15:44 > To: users@camel.apache.org > Subject: Re: Camel Live Reload of XML routes when using > routeContextRef's > > You can turn on DEBUG logging on > org.apache.camel.impl.FileWatcherReloadStrategy and see what it logs > > It should be checking for and as the root tags which > is what it attempts to reload. > > > > > On Fri, May 12, 2017 at 2:43 PM, Ronny Aerts <ronny.ae...@intris.be> wrote: >> Hello camel community, >> >> I saw in the camel 2.19.0 release notes that xml routes could be reloaded >> automatically which woke my interest (since we only use xml routes and no >> java at all). I tried it by specifying the fileWatcherDirectory in my >> pom.xml (in the camel-maven-plugin configuration) and it worked fine for me. >> I ran it from within eclipse. >> >> The point is that our camelcontext only holds routeContextRef entries and no >> real routes. I tried again by specifying the location src/main/resources >> (where the routecontext files are) but this does not seem to work, no >> updates are seen. Are there any auto update possibilities when using >> routecontext files? >> >> I did see how I can set any ReloadStrategy on the CamelContext in xml. >> >> -- >> vriendelijke groeten, >> Ronny Aerts<mailto:ronny.ae...@intris.be> - Intris nv - >> Wapenstilstandlaan 47, 2600 Berchem, België Product Owner >> Integrations / Integrations Manager Prince >> II<http://nl.wikipedia.org/wiki/PRINCE2> >> certified - >> ITIL<http://nl.wikipedia.org/wiki/Information_Technology_Infrastructu >> r >> e_Library> certified >> Tel: +32-3-326.50.75 >> >> >> >> Intris nv >> Wapenstilstandlaan 47 >> B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 >> www.intris.be<http://www.intris.be/> >> DISCLAIMER >> This is an e-mail from Intris. The information contained in this >> communication is intended solely for use by the individual or entity to whom >> it is addressed. >> Use of this communication by others is prohibited. If the e-mail message was >> sent to you by mistake, please notify >> supp...@intris.be<mailto:supp...@intris.be>, destroy it without reading, >> using, copying or disclosing its contents to any other person. >> We accept no liability for damage related to data and/or documents which are >> communicated by electronic mail. > > > > -- > Claus Ibsen > - > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2 > > > Intris nv > Wapenstilstandlaan 47 > B-2600 Berchem Tel. +32 3 326 50 75 > Fax +32 3 326 42 23 > www.intris.be<http://www.intris.be/> > DISCLAIMER > This is an e-mail from Intris. The information contained in this > communication is intended solely for use by the individual or entity to whom > it is addressed. > Use of this communication by others is prohibited. If the e-mail message was > sent to you
RE: Camel Live Reload of XML routes when using routeContextRef's
Hello Claus, Thank you for your quick answer. I looked into FileWatcherReloadStrategy and ReloadStrategySupport (onReloadXml) and it should be possible for me to extend it to reload routecontext's. The remaining point is how to connect the extended code to the camelcontext just by using xml only (since we never use java to start the camelcontext). -- vriendelijke groeten, Ronny Aerts – Intris nv – Wapenstilstandlaan 47, 2600 Berchem, België Product Owner Integrations / Integrations Manager Prince II certified – ITIL certified Tel: +32-3-326.50.75 -Original Message- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: vrijdag 12 mei 2017 15:44 To: users@camel.apache.org Subject: Re: Camel Live Reload of XML routes when using routeContextRef's You can turn on DEBUG logging on org.apache.camel.impl.FileWatcherReloadStrategy and see what it logs It should be checking for and as the root tags which is what it attempts to reload. On Fri, May 12, 2017 at 2:43 PM, Ronny Aerts <ronny.ae...@intris.be> wrote: > Hello camel community, > > I saw in the camel 2.19.0 release notes that xml routes could be reloaded > automatically which woke my interest (since we only use xml routes and no > java at all). I tried it by specifying the fileWatcherDirectory in my pom.xml > (in the camel-maven-plugin configuration) and it worked fine for me. I ran it > from within eclipse. > > The point is that our camelcontext only holds routeContextRef entries and no > real routes. I tried again by specifying the location src/main/resources > (where the routecontext files are) but this does not seem to work, no updates > are seen. Are there any auto update possibilities when using routecontext > files? > > I did see how I can set any ReloadStrategy on the CamelContext in xml. > > -- > vriendelijke groeten, > Ronny Aerts<mailto:ronny.ae...@intris.be> - Intris nv - > Wapenstilstandlaan 47, 2600 Berchem, België Product Owner Integrations > / Integrations Manager Prince II<http://nl.wikipedia.org/wiki/PRINCE2> > certified - > ITIL<http://nl.wikipedia.org/wiki/Information_Technology_Infrastructur > e_Library> certified > Tel: +32-3-326.50.75 > > > > Intris nv > Wapenstilstandlaan 47 > B-2600 Berchem Tel. +32 3 326 50 75 > Fax +32 3 326 42 23 > www.intris.be<http://www.intris.be/> > DISCLAIMER > This is an e-mail from Intris. The information contained in this > communication is intended solely for use by the individual or entity to whom > it is addressed. > Use of this communication by others is prohibited. If the e-mail message was > sent to you by mistake, please notify > supp...@intris.be<mailto:supp...@intris.be>, destroy it without reading, > using, copying or disclosing its contents to any other person. > We accept no liability for damage related to data and/or documents which are > communicated by electronic mail. -- Claus Ibsen - http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2 Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.be<http://www.intris.be/> DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.be<mailto:supp...@intris.be>, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
Camel Live Reload of XML routes when using routeContextRef's
Hello camel community, I saw in the camel 2.19.0 release notes that xml routes could be reloaded automatically which woke my interest (since we only use xml routes and no java at all). I tried it by specifying the fileWatcherDirectory in my pom.xml (in the camel-maven-plugin configuration) and it worked fine for me. I ran it from within eclipse. The point is that our camelcontext only holds routeContextRef entries and no real routes. I tried again by specifying the location src/main/resources (where the routecontext files are) but this does not seem to work, no updates are seen. Are there any auto update possibilities when using routecontext files? I did see how I can set any ReloadStrategy on the CamelContext in xml. -- vriendelijke groeten, Ronny Aerts<mailto:ronny.ae...@intris.be> - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, België Product Owner Integrations / Integrations Manager Prince II<http://nl.wikipedia.org/wiki/PRINCE2> certified - ITIL<http://nl.wikipedia.org/wiki/Information_Technology_Infrastructure_Library> certified Tel: +32-3-326.50.75 Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.be<http://www.intris.be/> DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.be<mailto:supp...@intris.be>, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
RE: camel sql insert clear body with CamelSqlRetrieveGeneratedKeys and MariaDB
Hello, Even if my sql insert would return a resultset (which looks strange to me for an insert), I don't need it because I still need to have the original body. Therefore I tried with the outputHeader option not to overwrite the body. I repeat that there is a difference when working with the CamelSqlRetrieveGeneratedKeys or not. When the header is set, the body is null. When CamelSqlRetrieveGeneratedKeys is not set, the body is kept. -- vriendelijke groeten, Ronny Aerts – Intris nv – Wapenstilstandlaan 47, 2600 Berchem, België Product Owner Integrations / Integrations Manager Prince II certified – ITIL certified Tel: +32-3-326.50.75 -Original Message- From: Zoran Regvart [mailto:zo...@regvart.com] Sent: vrijdag 31 maart 2017 12:14 To: users@camel.apache.org Subject: Re: camel sql insert clear body with CamelSqlRetrieveGeneratedKeys and MariaDB Hi Ronny, from what I can see from the SqlProducer source code the body is set if the PreparedStatement::execute method returns `true`[1]. I could be reading this wrong, but to me it seems that you're using insert/update statement that does not return a ResultSet, so in that case the body will be null. Some databases support a feature called data change tables (well, DB2 and MSSQL at least), so you could do something like: `SELECT FROM FINAL TABLE (INSERT ...)` in MariaDB?. But if you wanted the same message delivered to multiple endpoints, perhaps you are looking for the recipient list EIP[2]? zoran [1] https://github.com/apache/camel/blob/master/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProducer.java#L161 [2] https://camel.apache.org/recipient-list.html On Fri, Mar 31, 2017 at 10:56 AM, Ronny Aerts <ronny.ae...@intris.be> wrote: > Hello integrations community, > > I have a route (camel 2.17.6) where I need to insert a record into a MariaDB > database and I need to capture the generated id of the record. I therefore > set the CamelSqlRetrieveGeneratedKeys header to true. The record is inserted > correctly and the id generated BUT the content of the body becomes null. How > can I prevent to have the null AND returning the keys? > > The body is not cleared when I don't set the CamelSqlRetrieveGeneratedKeys > header but then I don't have the id of the record. > > I already tried with the outputHeader and noop=true but this didn't help. > > -- > kind regards, > Ronny Aerts<mailto:ronny.ae...@intris.be> - Intris nv - > Wapenstilstandlaan 47, 2600 Berchem, België Product Owner Integrations > / Integrations Manager Prince II<http://nl.wikipedia.org/wiki/PRINCE2> > certified - > ITIL<http://nl.wikipedia.org/wiki/Information_Technology_Infrastructur > e_Library> certified > Tel: +32-3-326.50.75 > > [https://s19.postimg.org/3pi2w9i2b/BBEU_email_Intris_nv.jpg]<http://ww > w.breakbulk.com/events/breakbulk-europe/breakbulk-europe-2017/register > /> > <http://www.breakbulk.com/events/breakbulk-europe/breakbulk-europe-201 > 7/register/> > > > Intris nv > Wapenstilstandlaan 47 > B-2600 Berchem Tel. +32 3 326 50 75 > Fax +32 3 326 42 23 > www.intris.be<http://www.intris.be/> > DISCLAIMER > This is an e-mail from Intris. The information contained in this > communication is intended solely for use by the individual or entity to whom > it is addressed. > Use of this communication by others is prohibited. If the e-mail message was > sent to you by mistake, please notify > supp...@intris.be<mailto:supp...@intris.be>, destroy it without reading, > using, copying or disclosing its contents to any other person. > We accept no liability for damage related to data and/or documents which are > communicated by electronic mail. -- Zoran Regvart [https://s19.postimg.org/3pi2w9i2b/BBEU_email_Intris_nv.jpg]<http://www.breakbulk.com/events/breakbulk-europe/breakbulk-europe-2017/register/> <http://www.breakbulk.com/events/breakbulk-europe/breakbulk-europe-2017/register/> Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.be<http://www.intris.be/> DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.be<mailto:supp...@intris.be>, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
camel sql insert clear body with CamelSqlRetrieveGeneratedKeys and MariaDB
Hello integrations community, I have a route (camel 2.17.6) where I need to insert a record into a MariaDB database and I need to capture the generated id of the record. I therefore set the CamelSqlRetrieveGeneratedKeys header to true. The record is inserted correctly and the id generated BUT the content of the body becomes null. How can I prevent to have the null AND returning the keys? The body is not cleared when I don't set the CamelSqlRetrieveGeneratedKeys header but then I don't have the id of the record. I already tried with the outputHeader and noop=true but this didn't help. -- kind regards, Ronny Aerts<mailto:ronny.ae...@intris.be> - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, België Product Owner Integrations / Integrations Manager Prince II<http://nl.wikipedia.org/wiki/PRINCE2> certified - ITIL<http://nl.wikipedia.org/wiki/Information_Technology_Infrastructure_Library> certified Tel: +32-3-326.50.75 [https://s19.postimg.org/3pi2w9i2b/BBEU_email_Intris_nv.jpg]<http://www.breakbulk.com/events/breakbulk-europe/breakbulk-europe-2017/register/> <http://www.breakbulk.com/events/breakbulk-europe/breakbulk-europe-2017/register/> Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.be<http://www.intris.be/> DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.be<mailto:supp...@intris.be>, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
how to use the asyncDelayed delayer
2016-12-22 15:17:13.689 [] [TRACE] [org.apache.camel.processor.Delayer] Delayed task woke up and continues routing for exchangeId: ID-LPT-030915-001-50533-1482416217495-0-4 2016-12-22 15:17:13.689 [] [INFO ] [capture-queue-messages] inside delay 2016-12-22 15:17:13.690 [] [TRACE] [org.apache.camel.processor.Delayer] Delayed task done for exchangeId: ID-LPT-030915-001-50533-1482416217495-0-4 2016-12-22 15:17:13.690 [ID-LPT-030915-001-50533-1482416217495-0-1] [INFO ] [capture-queue-messages] end of delay 2016-12-22 15:17:13.691 [ID-LPT-030915-001-50533-1482416217495-0-1] [INFO ] [capture-queue-messages] end of route (2016-12-22-15:17:06.664) 2016-12-22 15:17:13.726 [ID-LPT-030915-001-50533-1482416217495-0-1] [INFO ] [capture-queue-messages] start of route (2016-12-22-15:17:13.725) 2016-12-22 15:17:13.726 [ID-LPT-030915-001-50533-1482416217495-0-1] [INFO ] [capture-queue-messages] receiving queue message 'This is a text test message 3 from rrts at 2016-12-22 15:16:59.396, fired for the 1 time.' 2016-12-22 15:17:13.726 [ID-LPT-030915-001-50533-1482416217495-0-1] [INFO ] [capture-queue-messages] delaying for 7s 2016-12-22 15:17:13.744 [ID-LPT-030915-001-50533-1482416217495-0-1] [TRACE] [org.apache.camel.processor.Delayer] Scheduling delayed task to run in 7000 millis for exchangeId: ID-LPT-030915-001-50533-1482416217495-0-5 2016-12-22 15:17:20.745 [ID-LPT-030915-001-50533-1482416217495-0-1] [TRACE] [org.apache.camel.processor.Delayer] Delayed task woke up and continues routing for exchangeId: ID-LPT-030915-001-50533-1482416217495-0-5 2016-12-22 15:17:20.745 [ID-LPT-030915-001-50533-1482416217495-0-1] [INFO ] [capture-queue-messages] inside delay 2016-12-22 15:17:20.746 [ID-LPT-030915-001-50533-1482416217495-0-1] [TRACE] [org.apache.camel.processor.Delayer] Delayed task done for exchangeId: ID-LPT-030915-001-50533-1482416217495-0-5 2016-12-22 15:17:20.746 [ID-LPT-030915-001-50533-1482416217495-0-1] [INFO ] [capture-queue-messages] end of delay 2016-12-22 15:17:20.746 [ID-LPT-030915-001-50533-1482416217495-0-1] [INFO ] [capture-queue-messages] end of route (2016-12-22-15:17:13.725) 2016-12-22 15:17:20.785 [ID-LPT-030915-001-50533-1482416217495-0-1] [INFO ] [capture-queue-messages] start of route (2016-12-22-15:17:20.785) 2016-12-22 15:17:20.786 [ID-LPT-030915-001-50533-1482416217495-0-1] [INFO ] [capture-queue-messages] receiving queue message 'This is a text test message 4 from rrts at 2016-12-22 15:16:59.396, fired for the 1 time.' 2016-12-22 15:17:20.786 [ID-LPT-030915-001-50533-1482416217495-0-1] [INFO ] [capture-queue-messages] delaying for 7s 2016-12-22 15:17:20.812 [ID-LPT-030915-001-50533-1482416217495-0-1] [TRACE] [org.apache.camel.processor.Delayer] Scheduling delayed task to run in 7000 millis for exchangeId: ID-LPT-030915-001-50533-1482416217495-0-6 2016-12-22 15:17:27.813 [] [TRACE] [org.apache.camel.processor.Delayer] Delayed task woke up and continues routing for exchangeId: ID-LPT-030915-001-50533-1482416217495-0-6 2016-12-22 15:17:27.813 [] [INFO ] [capture-queue-messages] inside delay 2016-12-22 15:17:27.813 [] [TRACE] [org.apache.camel.processor.Delayer] Delayed task done for exchangeId: ID-LPT-030915-001-50533-1482416217495-0-6 2016-12-22 15:17:27.813 [ID-LPT-030915-001-50533-1482416217495-0-1] [INFO ] [capture-queue-messages] end of delay 2016-12-22 15:17:27.813 [ID-LPT-030915-001-50533-1482416217495-0-1] [INFO ] [capture-queue-messages] end of route (2016-12-22-15:17:20.785) 2016-12-22 15:17:27.824 [ID-LPT-030915-001-50533-1482416217495-0-1] [INFO ] [capture-queue-messages] start of route (2016-12-22-15:17:27.824) 2016-12-22 15:17:27.825 [ID-LPT-030915-001-50533-1482416217495-0-1] [INFO ] [capture-queue-messages] receiving queue message 'This is a text test message 5 from rrts at 2016-12-22 15:16:59.396, fired for the 1 time.' 2016-12-22 15:17:27.825 [ID-LPT-030915-001-50533-1482416217495-0-1] [INFO ] [capture-queue-messages] delaying for 7s 2016-12-22 15:17:27.833 [ID-LPT-030915-001-50533-1482416217495-0-1] [TRACE] [org.apache.camel.processor.Delayer] Scheduling delayed task to run in 7000 millis for exchangeId: ID-LPT-030915-001-50533-1482416217495-0-7 2016-12-22 15:17:34.835 [ID-LPT-030915-001-50533-1482416217495-0-1] [TRACE] [org.apache.camel.processor.Delayer] Delayed task woke up and continues routing for exchangeId: ID-LPT-030915-001-50533-1482416217495-0-7 2016-12-22 15:17:34.835 [ID-LPT-030915-001-50533-1482416217495-0-1] [INFO ] [capture-queue-messages] inside delay 2016-12-22 15:17:34.835 [ID-LPT-030915-001-50533-1482416217495-0-1] [TRACE] [org.apache.camel.processor.Delayer] Delayed task done for exchangeId: ID-LPT-030915-001-50533-1482416217495-0-7 2016-12-22 15:17:34.835 [ID-LPT-030915-001-50533-1482416217495-0-1] [INFO ] [capture-queue-messages] end of delay 2016-12-22 15:17:34.835 [ID-LPT-030915-001-50533-1482416217495-0-1] [INFO ] [capture-queue-messages] end of route (2016-12-22-15:17:27.824) -- Kind regards, Ronny Aerts<mailto:ronny.ae...@intris.be> - I
RE: camel sql insert ouput
Hello Claus, I use version 2.15.6 of camel. -- Kind regards, Ronny Aerts – Intris nv – Wapenstilstandlaan 47, 2600 Berchem, Belgium R Integration Architect Prince II certified – ITIL certified Tel: +32-3-326.50.75 -Original Message- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: dinsdag 9 augustus 2016 15:38 To: users@camel.apache.org Subject: Re: camel sql insert ouput What Camel version and which camel component do you use for SQL? On Tue, Aug 9, 2016 at 3:13 PM, Ronny Aerts <ronny.ae...@intris.be> wrote: > Hallo camel community, > > I'm doing a normal sql insert into an sql server database and it seems that > after the insert, my exchange in body and all my attachments are gone. Is > this normal behavior? In a certain case I really need to keep my attachments. > > -- > vriendelijke groeten, > Ronny Aerts<mailto:ronny.ae...@intris.be> - Intris nv - > Wapenstilstandlaan 47, 2600 Berchem, België R Integration Architect > Prince II<http://nl.wikipedia.org/wiki/PRINCE2> certified - > ITIL<http://nl.wikipedia.org/wiki/Information_Technology_Infrastructur > e_Library> certified > Tel: +32-3-326.50.75 > > Intris nv > Wapenstilstandlaan 47 > B-2600 Berchem Tel. +32 3 326 50 75 > Fax +32 3 326 42 23 > www.intris.be<http://www.intris.be/> > [http://www.intris.be/mail/AEO_Sticker_108pxRGB.jpg] <http://www.intris.be> > > DISCLAIMER > This is an e-mail from Intris. The information contained in this > communication is intended solely for use by the individual or entity to whom > it is addressed. > Use of this communication by others is prohibited. If the e-mail message was > sent to you by mistake, please notify > supp...@intris.be<mailto:supp...@intris.be>, destroy it without reading, > using, copying or disclosing its contents to any other person. > We accept no liability for damage related to data and/or documents which are > communicated by electronic mail. -- Claus Ibsen - http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2 Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.be<http://www.intris.be/> [http://www.intris.be/mail/AEO_Sticker_108pxRGB.jpg] <http://www.intris.be> DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.be<mailto:supp...@intris.be>, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
camel sql insert ouput
Hallo camel community, I'm doing a normal sql insert into an sql server database and it seems that after the insert, my exchange in body and all my attachments are gone. Is this normal behavior? In a certain case I really need to keep my attachments. -- vriendelijke groeten, Ronny Aerts<mailto:ronny.ae...@intris.be> - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, België R Integration Architect Prince II<http://nl.wikipedia.org/wiki/PRINCE2> certified - ITIL<http://nl.wikipedia.org/wiki/Information_Technology_Infrastructure_Library> certified Tel: +32-3-326.50.75 Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.be<http://www.intris.be/> [http://www.intris.be/mail/AEO_Sticker_108pxRGB.jpg] <http://www.intris.be> DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.be<mailto:supp...@intris.be>, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
RE: camel sql joined query with parameters won't run on sql server
Hello, The parametersCount works great. -- Kind regards, Ronny Aerts - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, Belgium R Integration Architect Prince II certified - ITIL certified Tel: +32-3-326.50.75 -Original Message- From: John Taylor [mailto:jtt77...@gmail.com] Sent: zaterdag 25 juni 2016 23:04 To: users@camel.apache.org Subject: Re: camel sql joined query with parameters won't run on sql server Hi Ronny, I had the same kind of problem recently and it turned out to be something to do with the driver not correctly returning the number of parameters. I ended up needing to use the parametersCount option. It is described at http://camel.apache.org/sql-component.html Regards, -John Ronny Aerts <ronny.ae...@intris.be> writes: > Hello camel user community, > > I have strange problem with a Microsoft sql server database joined query > where I would like to have some advice. > > I have 2 spring dsl steps in a route: > > > > The siteno and locationno are in a header. > Both steps run perfectly good in a firebird database and produce following > logs: > [org.apache.camel.component.sql.DefaultSqlPrepareStatementStrategy] > Prepared query: select s.SITENAME, l.LOCATIONNAME from VGMSITE s, > VGMLOCATION l where l.SITENO=? and l.LOCATIONNO=? and > s.SITENO=l.SITENO > [org.apache.camel.component.sql.DefaultSqlPrepareStatementStrategy] > Setting parameter #1 with value: 1 > [org.apache.camel.component.sql.DefaultSqlPrepareStatementStrategy] > Setting parameter #2 with value: 1 > [org.apache.camel.component.sql.SqlProducer] Got result list from > query: org.apache.commons.dbcp.DelegatingResultSet@7270bbb6, > outputType=SelectOne > [sql-output] Exchange[ > , Id: ID-LPT-030915-001-59524-1466882394560-0-25 > , ExchangePattern: InOut > , Properties: {CamelCreatedTimestamp=Sat Jun 25 21:20:18 CEST 2016, > CamelFilterMatched=true, > CamelMessageHistory=[DefaultMessageHistory[routeId=dpwa.solas.vgm.loca > tion.route, > node=setHeader16], > DefaultMessageHistory[routeId=dpwa.solas.vgm.location.route, > node=log17], > DefaultMessageHistory[routeId=dpwa.solas.vgm.location.route, > node=choice7], > DefaultMessageHistory[routeId=dpwa.solas.vgm.location.route, > node=to30], > DefaultMessageHistory[routeId=dpwa.solas.vgm.location.route, > node=to31]], > CamelToEndpoint=log://sql-output?ShowAll=true=true} > , Headers: {accept=application/json, text/javascript, */*; q=0.01, > accept-encoding=gzip, deflate, sdch, > accept-language=en-GB,en;q=0.8,en-US;q=0.6,nl;q=0.4, > breadcrumbId=ID-LPT-030915-001-59524-1466882394560-0-23, > cache-control=max-age=0, CamelCreatedTimestamp=Sat Jun 25 21:20:18 > CEST 2016, CamelHttpMethod=GET, CamelHttpPath=, > CamelHttpQuery=siteno=1=1, > CamelHttpServletRequest=org.apache.catalina.connector.RequestFacade@bd > 60042, > CamelHttpServletResponse=org.apache.catalina.connector.ResponseFacade@ > 44782f90, > CamelHttpUri=/TrisESB-dpwa-dvl-vgm%23%232016.06.14/web/camel/dpwa/vgm/ > location.ajax, > CamelHttpUrl=http://lpt-030915-001:8080/TrisESB-dpwa-dvl-vgm%23%232016 > .06.14/web/camel/dpwa/vgm/location.ajax, > CamelServletContextPath=/dpwa/vgm/location.ajax, CamelSqlRowCount=1, > connection=keep-alive, Content-Type=null, > cookie=JSESSIONID=C54F4B1B756A13257236FF39067522EB, > host=lpt-030915-001:8080, locationno=1, > referer=http://lpt-030915-001:8080/TrisESB-dpwa-dvl-vgm%23%232016.06.1 > 4/web/vgmweigher.jsp?siteno=1=1, > siteno=1, user-agent=Mozilla/5.0 (Windows NT 10.0; WOW64) > AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 > Safari/537.36, x-requested-with=XMLHttpRequest} , BodyType: > org.springframework.util.LinkedCaseInsensitiveMap > , Body: {SITENAME=AGW, LOCATIONNAME=yard} , Out: null: > ] > > When I run exactly the same query in a sql driver db (with > driver=com.microsoft.sqlserver.jdbc.SQLServerDriver and > url=jdbc:sqlserver://lpt-030915-001;databaseName=dpwa-solas-vgm;integr > atedSecurity=true), I get an error The multi-part identifier > "l.SITENO" could not be bound. > The log don't show the "Setting parameter" lines but I don't know why. > > The logs for sql server: > [org.apache.camel.component.sql.DefaultSqlPrepareStatementStrategy] > Prepared query: select s.SITENAME, l.LOCATIONNAME from VGMSITE s, > VGMLOCATION l where l.SITENO=? and l.LOCATIONNO=? and > s.SITENO=l.SITENO > [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] > Loading XML bean definitions from class path resource > [org/springframework/jdbc/support/sql-error-codes.xml] > [org.springframework.jdbc.support.SQLErrorCodesFactory] SQLErrorCodes > loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, > PostgreSQL, Sybase, Hana] > [org.apache.camel.processor.DefaultErrorH
camel sql joined query with parameters won't run on sql server
Hello camel user community, I have strange problem with a Microsoft sql server database joined query where I would like to have some advice. I have 2 spring dsl steps in a route: The siteno and locationno are in a header. Both steps run perfectly good in a firebird database and produce following logs: [org.apache.camel.component.sql.DefaultSqlPrepareStatementStrategy] Prepared query: select s.SITENAME, l.LOCATIONNAME from VGMSITE s, VGMLOCATION l where l.SITENO=? and l.LOCATIONNO=? and s.SITENO=l.SITENO [org.apache.camel.component.sql.DefaultSqlPrepareStatementStrategy] Setting parameter #1 with value: 1 [org.apache.camel.component.sql.DefaultSqlPrepareStatementStrategy] Setting parameter #2 with value: 1 [org.apache.camel.component.sql.SqlProducer] Got result list from query: org.apache.commons.dbcp.DelegatingResultSet@7270bbb6, outputType=SelectOne [sql-output] Exchange[ , Id: ID-LPT-030915-001-59524-1466882394560-0-25 , ExchangePattern: InOut , Properties: {CamelCreatedTimestamp=Sat Jun 25 21:20:18 CEST 2016, CamelFilterMatched=true, CamelMessageHistory=[DefaultMessageHistory[routeId=dpwa.solas.vgm.location.route, node=setHeader16], DefaultMessageHistory[routeId=dpwa.solas.vgm.location.route, node=log17], DefaultMessageHistory[routeId=dpwa.solas.vgm.location.route, node=choice7], DefaultMessageHistory[routeId=dpwa.solas.vgm.location.route, node=to30], DefaultMessageHistory[routeId=dpwa.solas.vgm.location.route, node=to31]], CamelToEndpoint=log://sql-output?ShowAll=true=true} , Headers: {accept=application/json, text/javascript, */*; q=0.01, accept-encoding=gzip, deflate, sdch, accept-language=en-GB,en;q=0.8,en-US;q=0.6,nl;q=0.4, breadcrumbId=ID-LPT-030915-001-59524-1466882394560-0-23, cache-control=max-age=0, CamelCreatedTimestamp=Sat Jun 25 21:20:18 CEST 2016, CamelHttpMethod=GET, CamelHttpPath=, CamelHttpQuery=siteno=1=1, CamelHttpServletRequest=org.apache.catalina.connector.RequestFacade@bd60042, CamelHttpServletResponse=org.apache.catalina.connector.ResponseFacade@44782f90, CamelHttpUri=/TrisESB-dpwa-dvl-vgm%23%232016.06.14/web/camel/dpwa/vgm/location.ajax, CamelHttpUrl=http://lpt-030915-001:8080/TrisESB-dpwa-dvl-vgm%23%232016.06.14/web/camel/dpwa/vgm/location.ajax, CamelServletContextPath=/dpwa/vgm/location.ajax, CamelSqlRowCount=1, connection=keep-alive, Content-Type=null, cookie=JSESSIONID=C54F4B1B756A13257236FF39067522EB, host=lpt-030915-001:8080, locationno=1, referer=http://lpt-030915-001:8080/TrisESB-dpwa-dvl-vgm%23%232016.06.14/web/vgmweigher.jsp?siteno=1=1, siteno=1, user-agent=Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36, x-requested-with=XMLHttpRequest} , BodyType: org.springframework.util.LinkedCaseInsensitiveMap , Body: {SITENAME=AGW, LOCATIONNAME=yard} , Out: null: ] When I run exactly the same query in a sql driver db (with driver=com.microsoft.sqlserver.jdbc.SQLServerDriver and url=jdbc:sqlserver://lpt-030915-001;databaseName=dpwa-solas-vgm;integratedSecurity=true), I get an error The multi-part identifier "l.SITENO" could not be bound. The log don't show the "Setting parameter" lines but I don't know why. The logs for sql server: [org.apache.camel.component.sql.DefaultSqlPrepareStatementStrategy] Prepared query: select s.SITENAME, l.LOCATIONNAME from VGMSITE s, VGMLOCATION l where l.SITENO=? and l.LOCATIONNO=? and s.SITENO=l.SITENO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml] [org.springframework.jdbc.support.SQLErrorCodesFactory] SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase, Hana] [org.apache.camel.processor.DefaultErrorHandler] Failed delivery for (MessageId: ID-LPT-030915-001-59810-1466882533439-0-16 on ExchangeId: ID-LPT-030915-001-59810-1466882533439-0-18). Exhausted after delivery attempt: 1 caught: org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; com.microsoft.sqlserver.jdbc.SQLServerException: The multi-part identifier "l.SITENO" could not be bound.; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: com.microsoft.sqlserver.jdbc.SQLServerException: The multi-part identifier "l.SITENO" could not be bound. When I do a sql server query with only one table, everything works just fine. Has anyone experience similar problem and found a solution for this (except using a db view)? -- Kind regards, Ronny Aerts<mailto:ronny.ae...@intris.be> - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, Belgium R Integration Architect Prince II<http://en.wikipedia.org/wiki/PRINCE2> certified - ITIL<http://en.wikipedia.org/wiki/Information_Technology_Infrastructure_Library> certified Tel: +32-3-326.50.75 Intris nv W
camel flatpack component shortcomings
Hallo camel community, I am a heavy user of camel in the integration projects in the company I work for. We use camel 2.15.2 and all routes are defined using spring dsl (no java). I have to do several fixed-length conversions where I have a lot of differences per line in the file. Each line contains some kind of record type field the beginning of the line. I came across the camel flatpack component<http://camel.apache.org/flatpack.html> to fulfill my request using the "fixed" format with pzmap/record definitions. I decided to use the flatpack dataformat<http://camel.apache.org/flatpack-dataformat.html> to do the actual conversion (unmarshal) as shown below. I have several points about this unmarchal: 1. The output of the unmarchal is a org.apache.camel.component.flatpack.DataSetList and although it is not so difficult to process in java, it is more difficult in spring dsl. I didn't found any camel convertor from org.apache.camel.component.flatpack.DataSetList to anything so I created one to convert to an ArrayList. A standard camel converter for this would be handy. 2. The DataSetList as output format loses information from the original net.sf.flatpack.DataSet. It would handy to have to possibility to choose the output format for the flatpack dataformat. 3. The use of "special records" is a very handy feature of the flatpack library. These "special records" are supported in de DataSetList BUT only if header/trailing id's "header" and "trailer" are used. Any other id's will fail and that is a petty since it is possible to have it more flexible. I would like to contribute to this camel component but I'm not registered yet. -- Kind regards, Ronny Aerts<mailto:ronny.ae...@intris.be> - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, Belgium R Integration Architect Prince II<http://en.wikipedia.org/wiki/PRINCE2> certified - ITIL<http://en.wikipedia.org/wiki/Information_Technology_Infrastructure_Library> certified Tel: +32-3-326.50.75 Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.be<http://www.intris.be/> [http://www.intris.be/mail/AEO_Sticker_108pxRGB.jpg] <http://www.intris.be> DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.be<mailto:supp...@intris.be>, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
RE: how to return a valid answer in a spring-ws consumer route (spring dsl)
Hello camel community, I stripped my spring dsl route to just the relevant statements. My actual route had a log message=${routeId} - end of route/ after calling the javascript (which produces the output). It seems that the extra log statement eats the response. The route works as expected after removing the log statement. Even a setHeader headerName=justatestconstantjustme/constant/setHeader after processing the output clears the output. Is this expected behavior in camel 2.15.1 of a bug? PS: I now use a exchange.getOut().setBody(output); javascript statement to produce the result where output is a w3c document. -- Kind regards, Ronny Aerts – Intris nv – Wapenstilstandlaan 47, 2600 Berchem, Belgium RD Integration Architect Prince II certified – ITIL certified Tel: +32-3-326.50.75 -Original Message- From: Ronny Aerts [mailto:ronny.ae...@intris.be] Sent: vrijdag 19 juni 2015 12:30 To: users@camel.apache.org Subject: RE: how to return a valid answer in a spring-ws consumer route (spring dsl) Hello, I read the the FAQ link. I see that the exchange.hasOut() returns false. My tests: 1. When I use a exchange.getIn().setBody(this is just dummy data); my spring-ws still return no data. 2. I do a exchange.getOut().setHeaders(exchange.getIn().getHeaders()); (there is a ) little in the FAQ page) and exchange.getOut().setBody(this is just dummy data);. Still no output. 3. I do a exchange.getIn().setBody(output);. Still no output. 4. I do a result = output; in combination with transform=true when calling the javascript. Still no output. 5. I do a setBodyconstantthis is just dummy data/constant/setBody instead of my javascript. Still no output. When I enable full logging, I see: [org.springframework.ws.server.MessageTracing.sent] MessageDispatcher with name 'spring-ws' sends no response for request [SaajSoapMessage {http://portcommunity.haven.antwerpen.be/}notifyMessages] [org.springframework.ws.transport.http.MessageDispatcherServlet] Cleared thread-bound request context: (POST //localhost:8080/notifyMessages)@345301231 org.eclipse.jetty.server.Request@1494e0ef [org.springframework.ws.transport.http.MessageDispatcherServlet] Successfully completed request [org.springframework.web.context.support.XmlWebApplicationContext] Publishing event in WebApplicationContext for namespace 'spring-ws-servlet': ServletRequestHandledEvent: url=[/notifyMessages]; client=[127.0.0.1]; method=[POST]; servlet=[spring-ws]; session=[null]; user=[null]; time=[162ms]; status=[OK] [org.springframework.web.context.support.XmlWebApplicationContext] Publishing event in Root WebApplicationContext: ServletRequestHandledEvent: url=[/notifyMessages]; client=[127.0.0.1]; method=[POST]; servlet=[spring-ws]; session=[null]; user=[null]; time=[162ms]; status=[OK] I see in the MessageDispatcher (http://docs.spring.io/spring-ws/sites/1.0/xref/org/springframework/ws/server/MessageDispatcher.html) that this situation occurs when messageContext.hasResponse() returns false. I'm sorry but I really don't know how to produce the 'response'. -- Kind regards, Ronny Aerts – Intris nv – Wapenstilstandlaan 47, 2600 Berchem, Belgium RD Integration Architect Prince II certified – ITIL certified Tel: +32-3-326.50.75 -Original Message- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: vrijdag 19 juni 2015 8:15 To: users@camel.apache.org Subject: Re: how to return a valid answer in a spring-ws consumer route (spring dsl) Hi When use getOut on an exchange then please read this FAQ http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html On Thu, Jun 18, 2015 at 10:47 PM, Ronny Aerts ronny.ae...@intris.be wrote: Hello camel community, I'am trying to figure out how I can return a simple answer in spring-ws soap web service consumer. I have a simple route like: bean id=endpointMapping class=org.apache.camel.component.spring.ws.bean.CamelEndpointMapping / route id=tris.apcs.pcm.callback.notifyMessages.route descriptionwebservice implementation to capture the notifyMessages/description from uri=spring-ws://rootqname:{http://portcommunity.haven.antwerpen.be/}notifyMessages?endpointMapping=#endpointMapping; / to uri=language://javascript:classpath:TRIS/apcs/pcm/wrap-in-notifyMessa gesResponse.js?transform=false/ /route My route is called without any problem but it returns only http 200 ok response and the soap is empty (Content-Length: 0). The wrap-in-notifyMessagesResponse.js creates an xml and outputs it in the out of the exchange. var dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); var db = dbf.newDocumentBuilder(); var output = db.newDocument(); var root = output.appendChild(output.createElementNS(http://portcommunity.haven. antwerpen.be/, por:notifyMessagesResponse)); request.setBody(output); exchange.getOut().setBody(output); I have to remark that I can also use spring dsl and not java code
RE: how to return a valid answer in a spring-ws consumer route (spring dsl)
Hello, I read the the FAQ link. I see that the exchange.hasOut() returns false. My tests: 1. When I use a exchange.getIn().setBody(this is just dummy data); my spring-ws still return no data. 2. I do a exchange.getOut().setHeaders(exchange.getIn().getHeaders()); (there is a ) little in the FAQ page) and exchange.getOut().setBody(this is just dummy data);. Still no output. 3. I do a exchange.getIn().setBody(output);. Still no output. 4. I do a result = output; in combination with transform=true when calling the javascript. Still no output. 5. I do a setBodyconstantthis is just dummy data/constant/setBody instead of my javascript. Still no output. When I enable full logging, I see: [org.springframework.ws.server.MessageTracing.sent] MessageDispatcher with name 'spring-ws' sends no response for request [SaajSoapMessage {http://portcommunity.haven.antwerpen.be/}notifyMessages] [org.springframework.ws.transport.http.MessageDispatcherServlet] Cleared thread-bound request context: (POST //localhost:8080/notifyMessages)@345301231 org.eclipse.jetty.server.Request@1494e0ef [org.springframework.ws.transport.http.MessageDispatcherServlet] Successfully completed request [org.springframework.web.context.support.XmlWebApplicationContext] Publishing event in WebApplicationContext for namespace 'spring-ws-servlet': ServletRequestHandledEvent: url=[/notifyMessages]; client=[127.0.0.1]; method=[POST]; servlet=[spring-ws]; session=[null]; user=[null]; time=[162ms]; status=[OK] [org.springframework.web.context.support.XmlWebApplicationContext] Publishing event in Root WebApplicationContext: ServletRequestHandledEvent: url=[/notifyMessages]; client=[127.0.0.1]; method=[POST]; servlet=[spring-ws]; session=[null]; user=[null]; time=[162ms]; status=[OK] I see in the MessageDispatcher (http://docs.spring.io/spring-ws/sites/1.0/xref/org/springframework/ws/server/MessageDispatcher.html) that this situation occurs when messageContext.hasResponse() returns false. I'm sorry but I really don't know how to produce the 'response'. -- Kind regards, Ronny Aerts – Intris nv – Wapenstilstandlaan 47, 2600 Berchem, Belgium RD Integration Architect Prince II certified – ITIL certified Tel: +32-3-326.50.75 -Original Message- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: vrijdag 19 juni 2015 8:15 To: users@camel.apache.org Subject: Re: how to return a valid answer in a spring-ws consumer route (spring dsl) Hi When use getOut on an exchange then please read this FAQ http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html On Thu, Jun 18, 2015 at 10:47 PM, Ronny Aerts ronny.ae...@intris.be wrote: Hello camel community, I'am trying to figure out how I can return a simple answer in spring-ws soap web service consumer. I have a simple route like: bean id=endpointMapping class=org.apache.camel.component.spring.ws.bean.CamelEndpointMapping / route id=tris.apcs.pcm.callback.notifyMessages.route descriptionwebservice implementation to capture the notifyMessages/description from uri=spring-ws://rootqname:{http://portcommunity.haven.antwerpen.be/}notifyMessages?endpointMapping=#endpointMapping; / to uri=language://javascript:classpath:TRIS/apcs/pcm/wrap-in-notifyMessa gesResponse.js?transform=false/ /route My route is called without any problem but it returns only http 200 ok response and the soap is empty (Content-Length: 0). The wrap-in-notifyMessagesResponse.js creates an xml and outputs it in the out of the exchange. var dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); var db = dbf.newDocumentBuilder(); var output = db.newDocument(); var root = output.appendChild(output.createElementNS(http://portcommunity.haven. antwerpen.be/, por:notifyMessagesResponse)); request.setBody(output); exchange.getOut().setBody(output); I have to remark that I can also use spring dsl and not java code! Can someone please point me in the direction of producing valid soap output. -- vriendelijke groeten, Ronny Aertsmailto:ronny.ae...@intris.be - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, België RD Integration Architect Prince IIhttp://nl.wikipedia.org/wiki/PRINCE2 certified - ITILhttp://nl.wikipedia.org/wiki/Information_Technology_Infrastructur e_Library certified Tel: +32-3-326.50.75 Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.behttp://www.intris.be/ [http://www.intris.be/mail/AEO_Sticker_108pxRGB.jpg] http://www.intris.be DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.bemailto:supp...@intris.be, destroy it without reading, using, copying or disclosing its contents
how to return a valid answer in a spring-ws consumer route (spring dsl)
Hello camel community, I'am trying to figure out how I can return a simple answer in spring-ws soap web service consumer. I have a simple route like: bean id=endpointMapping class=org.apache.camel.component.spring.ws.bean.CamelEndpointMapping / route id=tris.apcs.pcm.callback.notifyMessages.route descriptionwebservice implementation to capture the notifyMessages/description from uri=spring-ws://rootqname:{http://portcommunity.haven.antwerpen.be/}notifyMessages?endpointMapping=#endpointMapping; / to uri=language://javascript:classpath:TRIS/apcs/pcm/wrap-in-notifyMessagesResponse.js?transform=false/ /route My route is called without any problem but it returns only http 200 ok response and the soap is empty (Content-Length: 0). The wrap-in-notifyMessagesResponse.js creates an xml and outputs it in the out of the exchange. var dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); var db = dbf.newDocumentBuilder(); var output = db.newDocument(); var root = output.appendChild(output.createElementNS(http://portcommunity.haven.antwerpen.be/;, por:notifyMessagesResponse)); request.setBody(output); exchange.getOut().setBody(output); I have to remark that I can also use spring dsl and not java code! Can someone please point me in the direction of producing valid soap output. -- vriendelijke groeten, Ronny Aertsmailto:ronny.ae...@intris.be - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, België RD Integration Architect Prince IIhttp://nl.wikipedia.org/wiki/PRINCE2 certified - ITILhttp://nl.wikipedia.org/wiki/Information_Technology_Infrastructure_Library certified Tel: +32-3-326.50.75 Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.behttp://www.intris.be/ [http://www.intris.be/mail/AEO_Sticker_108pxRGB.jpg] http://www.intris.be DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.bemailto:supp...@intris.be, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
RE: camel-parent pom properties
Hello, I understand your answer about importing the spring bom. I assume you import it as follows: dependency groupIdorg.springframework/groupId artifactIdspring-framework-bom/artifactId version4.1.6.RELEASE/version /dependency The point with this is that you have to choose the spring version yourself while camel also made a choice about the spring version which I would like to follow. -- vriendelijke groeten, Ronny Aerts – Intris nv – Wapenstilstandlaan 47, 2600 Berchem, België RD Integration Architect Prince II certified – ITIL certified Tel: +32-3-326.50.75 -Original Message- From: Henryk Konsek [mailto:hekon...@gmail.com] Sent: vrijdag 22 mei 2015 9:56 To: users@camel.apache.org Subject: Re: camel-parent pom properties Hi, I would advice to keep Camel BOM imported and import also Spring BOM. Keep in mind that the order is important here - Spring BOM first, Camel BOM second. This is actually pretty common approach - to import Spring and Camel BOMs at the same time. Works like a charm - I'm using this approach myself. :) In particular this approach is recommended when working with camel-spring-boot. The end user should choose his/her Spring stack version of choice and then just add Camel to the mix. Cheers! czw., 21.05.2015 o 16:51 użytkownik Ronny Aerts ronny.ae...@intris.be napisał: Hello, This works very fine for everything which has to do with camel (as groupid) itself but not for dependencies with other groupid like the one below: dependencies dependency groupIdorg.springframework.ws/groupId artifactIdspring-ws-security/artifactId version${spring-ws-version}/version /dependency /dependencies -- vriendelijke groeten, Ronny Aerts – Intris nv – Wapenstilstandlaan 47, 2600 Berchem, België RD Integration Architect Prince II certified – ITIL certified Tel: +32-3-326.50.75 -Original Message- From: Henryk Konsek [mailto:hekon...@gmail.com] Sent: vrijdag 15 mei 2015 17:23 To: users@camel.apache.org Subject: Re: camel-parent pom properties Hi, The better practice is to import Camel parent as BOM: dependencyManagement dependnecies dependency groupIdorg.apache.camel/groupId artifactIdcamel-parent/artifactId version${camel.version}/version typepom/type scopeimport/scope /dependency /dependnecies /dependencyManagement And then simply: dependency groupIdorg.apache.camel/groupId artifactIdcamel-core/artifactId /dependency Cheers! pt., 15.05.2015 o 15:24 użytkownik Ronny Aerts ronny.ae...@intris.be napisał: Hello camel community, I'm interested in using the maven properties which are defined in the camel-parent pom.xml. In order to inherit these maven properties, I need to set the parent in my projects to the camel-parent. The point is that my projects use other version numbers than those of camel and this results in unresolvable camel-core references because the camel-parent uses the ${project.version} variable in its dependencies (which is not 2.15.2 in my projects). dependency groupIdorg.apache.camel/groupId artifactIdcamel-core/artifactId version${project.version}/version /dependency Is there a workaround for this? -- vriendelijke groeten, Ronny Aertsmailto:ronny.ae...@intris.be - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, België RD Integration Architect Prince IIhttp://nl.wikipedia.org/wiki/PRINCE2 certified - ITIL http://nl.wikipedia.org/wiki/Information_Technology_Infrastructure_Lib rary certified Tel: +32-3-326.50.75 Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.behttp://www.intris.be/ [ http://www.intris.be/mail/AEO_Sticker_108pxRGB.jpg] http://www.intris.be DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.bemailto: supp...@intris.be, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail. Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.behttp://www.intris.be/[ http://www.intris.be/mail/AEO_Sticker_108pxRGB.jpg] http://www.intris.be DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.bemailto: supp...@intris.be, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data
RE: camel-parent pom properties
Hello, This works very fine for everything which has to do with camel (as groupid) itself but not for dependencies with other groupid like the one below: dependencies dependency groupIdorg.springframework.ws/groupId artifactIdspring-ws-security/artifactId version${spring-ws-version}/version /dependency /dependencies -- vriendelijke groeten, Ronny Aerts – Intris nv – Wapenstilstandlaan 47, 2600 Berchem, België RD Integration Architect Prince II certified – ITIL certified Tel: +32-3-326.50.75 -Original Message- From: Henryk Konsek [mailto:hekon...@gmail.com] Sent: vrijdag 15 mei 2015 17:23 To: users@camel.apache.org Subject: Re: camel-parent pom properties Hi, The better practice is to import Camel parent as BOM: dependencyManagement dependnecies dependency groupIdorg.apache.camel/groupId artifactIdcamel-parent/artifactId version${camel.version}/version typepom/type scopeimport/scope /dependency /dependnecies /dependencyManagement And then simply: dependency groupIdorg.apache.camel/groupId artifactIdcamel-core/artifactId /dependency Cheers! pt., 15.05.2015 o 15:24 użytkownik Ronny Aerts ronny.ae...@intris.be napisał: Hello camel community, I'm interested in using the maven properties which are defined in the camel-parent pom.xml. In order to inherit these maven properties, I need to set the parent in my projects to the camel-parent. The point is that my projects use other version numbers than those of camel and this results in unresolvable camel-core references because the camel-parent uses the ${project.version} variable in its dependencies (which is not 2.15.2 in my projects). dependency groupIdorg.apache.camel/groupId artifactIdcamel-core/artifactId version${project.version}/version /dependency Is there a workaround for this? -- vriendelijke groeten, Ronny Aertsmailto:ronny.ae...@intris.be - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, België RD Integration Architect Prince IIhttp://nl.wikipedia.org/wiki/PRINCE2 certified - ITIL http://nl.wikipedia.org/wiki/Information_Technology_Infrastructure_Library certified Tel: +32-3-326.50.75 Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.behttp://www.intris.be/ [ http://www.intris.be/mail/AEO_Sticker_108pxRGB.jpg] http://www.intris.be DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.bemailto: supp...@intris.be, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail. Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.behttp://www.intris.be/ [http://www.intris.be/mail/AEO_Sticker_108pxRGB.jpg] http://www.intris.be DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.bemailto:supp...@intris.be, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
camel-parent pom properties
Hello camel community, I'm interested in using the maven properties which are defined in the camel-parent pom.xml. In order to inherit these maven properties, I need to set the parent in my projects to the camel-parent. The point is that my projects use other version numbers than those of camel and this results in unresolvable camel-core references because the camel-parent uses the ${project.version} variable in its dependencies (which is not 2.15.2 in my projects). dependency groupIdorg.apache.camel/groupId artifactIdcamel-core/artifactId version${project.version}/version /dependency Is there a workaround for this? -- vriendelijke groeten, Ronny Aertsmailto:ronny.ae...@intris.be - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, België RD Integration Architect Prince IIhttp://nl.wikipedia.org/wiki/PRINCE2 certified - ITILhttp://nl.wikipedia.org/wiki/Information_Technology_Infrastructure_Library certified Tel: +32-3-326.50.75 Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.behttp://www.intris.be/ [http://www.intris.be/mail/AEO_Sticker_108pxRGB.jpg] http://www.intris.be DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.bemailto:supp...@intris.be, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
camel spring-ws component with ws-security (username and password)
Hello camel community, Does anyone of you have some knowledge/experience using ws-security with the camel spring-ws component? I want to a Security tag with username and password to the soap header but this does not work for me. I found website http://docs.spring.io/spring-ws/site/reference/html/security.html where I used 7.2.2.1.1. SimplePasswordValidationCallbackHandler for my purpose. I added the bean to my route context file: bean id=passwordValidationHandler class=org.springframework.ws.soap.security.xwss.callback.SimplePasswordValidationCallbackHandler property name=users props prop key=BertErnie/prop /props /property /bean But running the camel context gives me a java.lang.ClassNotFoundException: org.springframework.ws.soap.security.xwss.callback.SimplePasswordValidationCallbackHandler. I added a dependency to my pom.xml dependency groupIdorg.springframework.ws/groupId artifactIdspring-ws-security/artifactId version${spring-ws-version}/version /dependency but this gives a java.lang.ClassNotFoundException: org.springframework.ws.soap.security.xwss.callback.SimplePasswordValidationCallbackHandler. I added a dependency to my pom.xml dependency groupIdcom.sun.xml.wss/groupId artifactIdxws-security/artifactId version3.0/version /dependency but this gives Failure to find javax.activation:activation:jar:1.0.2. I added a dependency to my pom.xml dependency groupIdjavax.activation/groupId artifactIdactivation/artifactId version[1.0.0,)/version /dependency dependency groupIdjavax.xml.crypto/groupId artifactIdxmldsig/artifactId version1.0/version /dependency but this gives a java.lang.ClassNotFoundException: org.springframework.util.backoff.BackOff and there I'm stuck. I use camel 2.15.1 and this uses spring-ws 2.2.0.RELEASE and spring core 4.0.5.RELEASE. I know that I can use the CamelSpringWebserviceSoapHeader functionality that then I have to create all the tags myself and I would like to avoid that. -- vriendelijke groeten, Ronny Aertsmailto:ronny.ae...@intris.be - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, België RD Integration Architect Prince IIhttp://nl.wikipedia.org/wiki/PRINCE2 certified - ITILhttp://nl.wikipedia.org/wiki/Information_Technology_Infrastructure_Library certified Tel: +32-3-326.50.75 Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.behttp://www.intris.be/ [http://www.intris.be/mail/AEO_Sticker_108pxRGB.jpg] http://www.intris.be DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.bemailto:supp...@intris.be, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
camel xslt with saxon 8.7
Hallo camel community, I just upgraded from camel 2.13.2 to 2.14.0. Camel git commit 1b38aad342529e98b5f76e11029ec50b1768949f (CAMEL-7753: xslt component - Store warning/errors etc as exchange properties so end users can get hold of those. Now works with camel-saxon also.) of 27-aug-2014 introduced saxonReceiverClass and saxonWarnerClass and a check in doStart method for the existence of net.sf.saxon.event.Receiver and net.sf.saxon.serialize.MessageWarner in ...\camel-core\src\main\java\org\apache\camel\builder\xml\XsltBuilder.java. I assume that these classes are available Saxon-HE jar 9.6.x but not in the Saxon 8.7 library and that's a problem for me. I get an error when starting camel: Error pre-loading Saxon classes. Make sure you have saxon on the classpath, and the classloader can load the following two classes: net.sf.saxon.event.Receiver, net.sf.saxon.serialize.MessageWarner. I can't use the Saxon-HE because I use a lot of java calls inside xslt (eg to set message headers) and java calls are not supported in Saxon-HE home edition. That the reason why I use the full Saxon which is version 8.7 for now. Is there a solution to this problem? -- Kind regards, Ronny Aertsmailto:ronny.ae...@intris.be - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, Belgium RD Integration Architect Prince IIhttp://en.wikipedia.org/wiki/PRINCE2 certified - ITILhttp://en.wikipedia.org/wiki/Information_Technology_Infrastructure_Library certified Tel: +32-3-326.50.75 Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.behttp://www.intris.be/ [http://www.intris.be/mail/AEO_Sticker_108pxRGB.jpg] http://www.intris.be DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.bemailto:supp...@intris.be, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
RE: camel xslt with saxon 8.7
Hallo Willem, Camel 2.13.3 is indeed an option but eventually I still want to follow the latest camel versions. So using an 'older' version is only a workaround for now. I want to use the sql component with the simple language to and therefore I need 2.14.0. -- Kind regards, Ronny Aerts – Intris nv – Wapenstilstandlaan 47, 2600 Berchem, Belgium RD Integration Architect Prince II certified – ITIL certified Tel: +32-3-326.50.75 -Original Message- From: Willem Jiang [mailto:willem.ji...@gmail.com] Sent: donderdag 27 november 2014 14:50 To: users@camel.apache.org Subject: Re: camel xslt with saxon 8.7 You may consider to use Camel 2.13.3 instead of Camel 2.14.0. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On November 27, 2014 at 9:12:48 PM, Ronny Aerts (ronny.ae...@intris.be) wrote: Hallo camel community, I just upgraded from camel 2.13.2 to 2.14.0. Camel git commit 1b38aad342529e98b5f76e11029ec50b1768949f (CAMEL-7753: xslt component - Store warning/errors etc as exchange properties so end users can get hold of those. Now works with camel-saxon also.) of 27-aug-2014 introduced saxonReceiverClass and saxonWarnerClass and a check in doStart method for the existence of net.sf.saxon.event.Receiver and net.sf.saxon.serialize.MessageWarner in ...\camel-core\src\main\java\org\apache\camel\builder\xml\XsltBuilder.java. I assume that these classes are available Saxon-HE jar 9.6.x but not in the Saxon 8.7 library and that's a problem for me. I get an error when starting camel: Error pre-loading Saxon classes. Make sure you have saxon on the classpath, and the classloader can load the following two classes: net.sf.saxon.event.Receiver, net.sf.saxon.serialize.MessageWarner. I can't use the Saxon-HE because I use a lot of java calls inside xslt (eg to set message headers) and java calls are not supported in Saxon-HE home edition. That the reason why I use the full Saxon which is version 8.7 for now. Is there a solution to this problem? -- Kind regards, Ronny Aerts - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, Belgium RD Integration Architect Prince II certified - ITIL certified Tel: +32-3-326.50.75 Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.be [http://www.intris.be/mail/AEO_Sticker_108pxRGB.jpg] DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.be, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail. Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.behttp://www.intris.be/ [http://www.intris.be/mail/AEO_Sticker_108pxRGB.jpg] http://www.intris.be DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.bemailto:supp...@intris.be, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
setHeader from xpath and other header
Hello camel community, I have spring xml situation where I have some xml in a message header (as result of other actions in the route). I noticed that I can use content based routing with xpath where the xpath content does not come from the body but from the message header as in the example below. choice id=check-document-upload when id=document-upload-ok descriptionrelease document uploaded to digital file/description xpath headerName=AddContentToDigiDos//Status/text() = 'OK'/xpath And want to do the same thing with the setHeader but that does not seem to work. Can it be confirmed that the xpath from header on works in content base routing and not in setHeader? setHeader headerName=DestFolderxpath resultType=java.lang.String headerName=AddContentToDigiDos//DestFolder/xpath/setHeader -- Kind regards, Ronny Aertsmailto:ronny.ae...@intris.be - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, Belgium RD Integration Architect Prince II certified Tel: +32-3-326.50.75 Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.behttp://www.intris.be/ DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.bemailto:supp...@intris.be, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
RE: can I set a message header or exchange property inside an xslt?
Hello Preben, I don't want to GET a header for now, I want to SET a header. -- Kind regards, Ronny Aerts - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, Belgium RD Integration Architect Prince II certified Tel: +32-3-326.50.75 -Original Message- From: Preben.Asmussen [mailto:p...@dr.dk] Sent: dinsdag 4 februari 2014 7:46 To: users@camel.apache.org Subject: Re: can I set a message header or exchange property inside an xslt? You can get the header as a xsl:param in the like - xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:output method=xml version=1.0 encoding=UTF-8 indent=yes / xsl:param name=myheaderparam/ . and then do xsl:value-of select=$myheaderparam/ in the transformation -- View this message in context: http://camel.465427.n5.nabble.com/can-I-set-a-message-header-or-exchange-property-inside-an-xslt-tp5746730p5746757.html Sent from the Camel - Users mailing list archive at Nabble.com. Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.behttp://www.intris.be/ DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.bemailto:supp...@intris.be, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
RE: can I set a message header or exchange property inside an xslt?
Hello Claus, Thank you for the feedback. I searched in the xslt test files and found the org.apache.camel.component.xslt.XsltTransformingExceptionTest.java in combination with org.apache.camel.component.xslt.MyEcho.java and org/apache/camel/component/xslt/transformCallEcho.xsl. The xsl file declares xmlns:echo=xalan://org.apache.camel.component.xslt.MyEcho and later on the xsl:value-of select=echo:echoString(string(name))/xsl:value-of statement is called to activate the java code. As far as I known, this approach is only possible with static methods (in the java code) and therefore it does not seem possible with camel out of the box. I will try to work something. -- Kind regards, Ronny Aerts - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, Belgium RD Integration Architect Prince II certified Tel: +32-3-326.50.75 -Original Message- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: maandag 3 februari 2014 19:00 To: users@camel.apache.org Subject: Re: can I set a message header or exchange property inside an xslt? Hi You likely can. Though I can remember how that is possible. Try look at the unit tests https://github.com/apache/camel/tree/master/camel-core/src/test/java/org/apache/camel/component/xslt And we love contributions. People is welcome to add details on the xslt docs how to do this http://camel.apache.org/contributing On Mon, Feb 3, 2014 at 3:16 PM, Ronny Aerts ronny.ae...@intris.be wrote: Hello camel community, I'm working on a project where it would be very handy to me if I can set a message header or exchange property inside the execution of an xslt producer. Is this possible? I know that the exchange and in are passed as parameter to the transformation. -- Kind regards, Ronny Aertsmailto:ronny.ae...@intris.be - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, Belgium RD Integration Architect Prince II certified Tel: +32-3-326.50.75 Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.behttp://www.intris.be/ DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.bemailto:supp...@intris.be, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen Make your Camel applications look hawt, try: http://hawt.io Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.behttp://www.intris.be/ DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.bemailto:supp...@intris.be, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
RE: can I set a message header or exchange property inside an xslt?
Hello, I figured it out and yes it is possible to set message headers and exchange properties in camel xslt. I created a separate java file with content (see the methods that are marked static): package com.intris.camel.component.xslt; public class xsltmsg { public static void setHeader (org.apache.camel.Message message, String name, String value) { message.setHeader(name, value); } public static void setProperty (org.apache.camel.Exchange exchange, String name, String value) { exchange.setProperty(name, value); } } I created a xslt file: ?xml version='1.0'? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:xsltmsg=java:com.intris.camel.component.xslt.xsltmsg exclude-result-prefixes=xsltmsg xsl:param name=in/ xsl:param name=out/ xsl:param name=exchange/ xsl:template match=/ !-- testronny aerts/test -- !-- setting message headers on the in does not seem to work -- xsl:value-of select=xsltmsg:setHeader($in, 'bbb-1', 'ronny.aerts.1')/ xsl:value-of select=xsltmsg:setHeader($out, 'bbb-2', 'ronny.aerts.2')/ xsl:value-of select=xsltmsg:setProperty($exchange, 'aaa', 'ronny en gerd')/ !-- test2after/test2 -- /xsl:template /xsl:stylesheet My route looks like: route id=test-xslt from uri=timer://xslt-timer?repeatCount=1 / pollEnrich uri=file://example-data?fileName=test.xmlamp;noop=true timeout=2500 / convertBodyTo type=java.lang.String / to uri=log://before?showExchangePattern=falseamp;showHeaders=trueamp;showProperties=trueamp;multiline=true / to uri=xslt://classpath:test.xsl?saxon=false / to uri=log://after?showExchangePattern=falseamp;showHeaders=trueamp;showProperties=trueamp;multiline=true / log message=${routeId} end of route / /route There is still one problem with the above: net.sf.saxon.trans.XPathException: Cannot find a matching 3-argument function named {java:com.intris.camel.component.xslt.xsltmsg}setHeader(). Note that direct calls to Java methods are not available under Saxon-HE It seems that camel uses the saxon home edition and with the home edition it not possible to call java from xslt. I added a dependency to my project pom and now it works fine. dependency groupIdnet.sf.saxon/groupId artifactIdsaxon/artifactId version[8.7,)/version /dependency A part of the output is: , Properties: {aaa=ronny en gerd, ... , Headers: {bbb-2=ronny.aerts.2, ... The setting of a header on the in does not seem to have an effect. I would be very handy if there would such a xslt wrapper class for settings message headers, similar to one I created. -- Kind regards, Ronny Aerts - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, Belgium RD Integration Architect Prince II certified Tel: +32-3-326.50.75 -Original Message- From: Ronny Aerts [mailto:ronny.ae...@intris.be] Sent: dinsdag 4 februari 2014 9:41 To: users@camel.apache.org Subject: RE: can I set a message header or exchange property inside an xslt? Hello Claus, Thank you for the feedback. I searched in the xslt test files and found the org.apache.camel.component.xslt.XsltTransformingExceptionTest.java in combination with org.apache.camel.component.xslt.MyEcho.java and org/apache/camel/component/xslt/transformCallEcho.xsl. The xsl file declares xmlns:echo=xalan://org.apache.camel.component.xslt.MyEcho and later on the xsl:value-of select=echo:echoString(string(name))/xsl:value-of statement is called to activate the java code. As far as I known, this approach is only possible with static methods (in the java code) and therefore it does not seem possible with camel out of the box. I will try to work something. -- Kind regards, Ronny Aerts - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, Belgium RD Integration Architect Prince II certified Tel: +32-3-326.50.75 -Original Message- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: maandag 3 februari 2014 19:00 To: users@camel.apache.org Subject: Re: can I set a message header or exchange property inside an xslt? Hi You likely can. Though I can remember how that is possible. Try look at the unit tests https://github.com/apache/camel/tree/master/camel-core/src/test/java/org/apache/camel/component/xslt And we love contributions. People is welcome to add details on the xslt docs how to do this http://camel.apache.org/contributing On Mon, Feb 3, 2014 at 3:16 PM, Ronny Aerts ronny.ae...@intris.be wrote: Hello camel community, I'm working on a project where it would be very handy to me if I can set a message header or exchange property inside the execution of an xslt producer. Is this possible? I know that the exchange and in are passed as parameter to the transformation. -- Kind regards, Ronny Aertsmailto:ronny.ae...@intris.be - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, Belgium RD Integration Architect Prince II certified Tel: +32-3-326.50.75 Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.behttp://www.intris.be/ DISCLAIMER
can I set a message header or exchange property inside an xslt?
Hello camel community, I'm working on a project where it would be very handy to me if I can set a message header or exchange property inside the execution of an xslt producer. Is this possible? I know that the exchange and in are passed as parameter to the transformation. -- Kind regards, Ronny Aertsmailto:ronny.ae...@intris.be - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, Belgium RD Integration Architect Prince II certified Tel: +32-3-326.50.75 Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.behttp://www.intris.be/ DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.bemailto:supp...@intris.be, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
RE: Quartz in cluster
Hello Tom, Could the pollEnrich help you? from uri=quartz:... / pollEnrich uri=sftp://{{user}}@{{server}}?password={{password}}/ -- Kind regards, Ronny Aerts - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, Belgium RD Integration Architect Prince II certified Tel: +32-3-326.50.75 -Original Message- From: Tom Fornoville [mailto:tom.fornovi...@roots.be] Sent: maandag 3 februari 2014 15:07 To: users@camel.apache.org Subject: Re: Quartz in cluster Hi Claus, Thanks for your answer. I read that topic earlier but it's not the configuration of Quartz I'm having problems with. What I would like to know is how I can use a quartz endpoint to trigger file pickup. Right now we have something like: route from uri=sftp://{{user}}@ {{server}}?password={{password}}amp;delay={{delay}}/ ... /route And we want to replace the delay with a Quartz scheduler so it should be something like: route from uri=quartz:... / from uri=sftp://{{user}}@{{server}}?password={{password}}/ ... /route The second from doesn't make sense but I don't know how to describe what I want this route to do. Tom Fornoville Senior Developer m: +32 478 65 86 51 www.roots.be On Mon, Feb 3, 2014 at 2:52 PM, Claus Ibsen claus.ib...@gmail.com wrote: Hi A similar topic was recently debated http://camel.465427.n5.nabble.com/Master-Slave-failover-using-database -lock-tp5746646.html On Mon, Feb 3, 2014 at 2:46 PM, Tom Fornoville tom.fornovi...@roots.be wrote: Hello Camel users, In our project we have several routes that start from a file (local filesystem or FTP) and when we're clustering this via Fuse Fabric we want to ensure that only one instance of the route picks up files. Our first thought was to use the Quartz scheduler with a JDBC-JobStore as described here: http://quartz-scheduler.org/documentation/quartz-2.x/configuration/Con figJDBCJobStoreClustering Is there an example of a working JDBC-JobStore from within Camel? Are there other (simpler) solutions to make sure that multiple routes don't interfere? Best regards, Tom -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen Make your Camel applications look hawt, try: http://hawt.io Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.behttp://www.intris.be/ DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.bemailto:supp...@intris.be, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
RE: convert attachment to base64
Hello, I was able to solve my base64 problems as: ContentType contentType = new ContentType (dh.getContentType()); if (contentType.match(image/*)) { // convert to base64 and add Content-Transfer-Encoding attribute byte[] attachmentData = exchange.getContext().getTypeConverter().convertTo(byte[].class, dh.getInputStream()); theAttachmentInXml.appendChild(theParentNode.getOwnerDocument().createCDATASection(javax.xml.bind.DatatypeConverter.printBase64Binary(attachmentData))); theAttachmentInXml.setAttribute(Content-Transfer-Encoding, base64); } else { String attachmentData = exchange.getContext().getTypeConverter().convertTo(String.class, dh.getInputStream()); theAttachmentInXml.appendChild(theParentNode.getOwnerDocument().createCDATASection(attachmentData)); } -- vriendelijke groeten, Ronny Aerts - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, België RD Integration Architect Prince II certified Tel: +32-3-326.50.75 -Original Message- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: woensdag 22 januari 2014 19:58 To: users@camel.apache.org Subject: Re: convert attachment to base64 Hi The data format works on the message body content only. If you want to encode some attachments only. I suggest to write a piece of java code that does that. You can use commons-codec for the base64. But I think in some of the newer JDKs its out of the box. On Wed, Jan 22, 2014 at 5:34 PM, Ronny Aerts ronny.ae...@intris.be wrote: Hello, I have a camel component written in java. At a certain point, I need to convert the content of an attachment (or body) to a base64 encoding string. Can this be done with the camel base64 dataformat? And if yes, how do I do this in java? -- Kind regards, Ronny Aertsmailto:ronny.ae...@intris.be - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, Belgium RD Integration Architect Prince II certified Tel: +32-3-326.50.75 Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.behttp://www.intris.be/ DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.bemailto:supp...@intris.be, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen Make your Camel applications look hawt, try: http://hawt.io Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.behttp://www.intris.be/ DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.bemailto:supp...@intris.be, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
convert attachment to base64
Hello, I have a camel component written in java. At a certain point, I need to convert the content of an attachment (or body) to a base64 encoding string. Can this be done with the camel base64 dataformat? And if yes, how do I do this in java? -- Kind regards, Ronny Aertsmailto:ronny.ae...@intris.be - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, Belgium RD Integration Architect Prince II certified Tel: +32-3-326.50.75 Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.behttp://www.intris.be/ DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.bemailto:supp...@intris.be, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
RE: looking for a way to run javascript in camel and set message headers
Hello camel community, I found my soluation in the language component (http://camel.apache.org/language.html) after doing some more research. My routes is now: route id=test-javascript from uri=timer://runOnce?repeatCount=1amp;delay=1000/ log message=test bericht van de ronny loggingLevel=INFO/ setBodyconstantdit is een test bericht van Ronny Aerts/constant/setBody to uri=language://javascript:classpath:test-javascript.js?transform=false / to uri=log:javascript?showAll=true/ /route And the javascript content is: var content = request.getBody().toString().toUpperCase(); if (content.match(^UN[AB][+]{1}.*) != null) { request.setHeader(datatype, edifact); } else { request.setHeader(datatype, xml); } java.lang.System.out.println (Dit is output vanuit de javascript); java.lang.System.out.println (Komt de 2de lijn na de eerste?); var logger = org.slf4j.LoggerFactory.getLogger(exchange.getFromRouteId()); logger.info (test logging); logger.info (Camel Name {}, camelContext.getName()); logger.info(Camel Status {}, camelContext.getStatus().toString()); logger.info (Camel Uptime {}, camelContext.getUptime()); logger.info (Camel Version {}, camelContext.getVersion()); logger.info (FromRouteId {}, exchange.getFromRouteId()); logger.info (ExchangeId {}, exchange.getExchangeId()); logger.info (FromEndpointUri {}, exchange.getFromEndpoint().getEndpointUri()); context.getWriter().println(output from script context); properties = exchange.getProperties(); if (properties.size() 0) { logger.info(there are {} properties in the exchange, properties.size()); propertyNames = properties.keySet().iterator(); while (propertyNames.hasNext()) { propertyName = propertyNames.next(); propertyValue = properties.get(propertyName); logger.info (exchange property '{}' has value '{}' of type '{}', propertyName, propertyValue, propertyValue.getClass().getName()); } } else { logger.warn(the exchange does not have any properties!); } headers = request.getHeaders(); if (headers.size() 0) { logger.info(there are {} headers in the message, headers.size()); headerNames = headers.keySet().iterator(); while (headerNames.hasNext()) { headerName = headerNames.next(); headerValue = headers.get(headerName); logger.info (msg header '{}' has value '{}' of type '{}', headerName, headerValue, headerValue.getClass().getName()); } } else { logger.warn(the message does not have any headers!); } This proceduces: 2014-01-11 13:12:25.226 [INFO ] [org.apache.camel.spring.SpringCamelContext] Total 1 routes, of which 1 is started. 2014-01-11 13:12:25.228 [INFO ] [org.apache.camel.spring.SpringCamelContext] Apache Camel 2.12.2 (CamelContext: TrisESB-intris-test-rrts2) started in 0.366 seconds 2014-01-11 13:12:26.224 [INFO ] [test-javascript] test bericht van de ronny Dit is output vanuit de javascript Komt de 2de lijn na de eerste? 2014-01-11 13:12:26.282 [INFO ] [test-javascript] test logging 2014-01-11 13:12:26.286 [INFO ] [test-javascript] Camel Name TrisESB-intris-test-rrts2 2014-01-11 13:12:26.287 [INFO ] [test-javascript] Camel Status Started 2014-01-11 13:12:26.288 [INFO ] [test-javascript] Camel Uptime 1.427 seconds 2014-01-11 13:12:26.288 [INFO ] [test-javascript] Camel Version 2.12.2 2014-01-11 13:12:26.288 [INFO ] [test-javascript] FromRouteId test-javascript 2014-01-11 13:12:26.288 [INFO ] [test-javascript] ExchangeId ID-INTRISLPT48-56623-1389442344536-0-2 2014-01-11 13:12:26.289 [INFO ] [test-javascript] FromEndpointUri timer://runOnce?delay=1000repeatCount=1 output from script context 2014-01-11 13:12:26.290 [INFO ] [test-javascript] there are 7.0 properties in the exchange 2014-01-11 13:12:26.292 [INFO ] [test-javascript] exchange property 'CamelToEndpoint' has value 'language://javascript:classpath:test-javascript.js?transform=false' of type 'java.lang.String' 2014-01-11 13:12:26.294 [INFO ] [test-javascript] exchange property 'CamelMessageHistory' has value '[DefaultMessageHistory[routeId=test-javascript, node=log1], DefaultMessageHistory[routeId=test-javascript, node=setBody1], DefaultMessageHistory[routeId=test-javascript, node=to1]]' of type 'java.util.ArrayList' 2014-01-11 13:12:26.295 [INFO ] [test-javascript] exchange property 'CamelCreatedTimestamp' has value 'Sat Jan 11 13:12:26 CET 2014' of type 'java.util.Date' 2014-01-11 13:12:26.295 [INFO ] [test-javascript] exchange property 'CamelTimerFiredTime' has value 'Sat Jan 11 13:12:26 CET 2014' of type 'java.util.Date' 2014-01-11 13:12:26.295 [INFO ] [test-javascript] exchange property 'CamelTimerPeriod' has value '1000' of type 'java.lang.Long' 2014-01-11 13:12:26.296 [INFO ] [test-javascript] exchange property 'CamelTimerName' has value 'runOnce' of type 'java.lang.String' 2014-01-11 13:12:26.296 [INFO ] [test-javascript] exchange property 'CamelTimerCounter' has value '1' of type 'java.lang.Long' 2014-01-11 13:12:26.296 [INFO ] [test-javascript] there are 3.0 headers in the message 2014-01-11 13
looking for a way to run javascript in camel and set message headers
Hello camel community, I'm trying to figure it a way to run a real javascript procedures in camel as an alternative to use java code out of a bean. My company is using camel routes from a spring dsl xml file and we would like to minimize our java coding effort. I know that javascript can be used in expressions, filters, ... but I can't figure out to more with it like: route javaScript var content = request.getBody().toString().toUpperCase(); if (match(^UN[AB][+]{1}.*) != null) { request.headers.set(datatype, edifact); } else { request.headers.set(datatype, xml); } /javaScript /route Please don't comment on the content of the javascript because this is just a very simple example. Things that I surely want to do is setting message (and attachment) headers. The fact that javascript can be loading from an external file (since camel 2.11) is already of much help. -- kind regards, Ronny Aerts - Belgium Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.behttp://www.intris.be/ DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.bemailto:supp...@intris.be, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
FuseIDE in combination with routeContext elements from external files
Hello camel community, I started about a half year ago using Camel in combination ActiveMQ and I feel good with this esb solution. I created all xml files and related files using an xml or text editor. I would like to switch to a more visual editor and I came across the FuseIDE. Everthing seems to work fine except for my sub-routes. I use the routeContext functionality as sub-routes in the main route file. A sub-routes are predefined reusable routes which, dependable on the customer, are included or not (in the main file). I already have a collection of sub-routes which is extending every week. My example main route file is called TrisESB-config-intris-erp.xml and the sub-route are attached. I found the same issue in eclipse-344 (http://fusesource.com/forums/thread.jspa?messageID=17641) but it should have solved quite some time ago. I am very confused about the version information for the FuseIDE product. Eclipse-344 indicates that this issue is solved in version 2.1.0 but I can't find this version number anywhere. I download the FuseIDE as part of the jboss fuse page and this gives me a download file FuseIDE-6.0.0.129-win32.win32.x86_64.zip. A see here a version 6.0.0.129 and zip contains a folder FuseIDE-6.0.0. The About FuseIDE window (in eclipse) shows a version 7.6.2 (but I think this is the eclipse.exe version). Can someone please clear out this version confusion? Can someone tell me why my sub-route design windows is blank when I open it? -- Kind regards, Ronny Aertsmailto:ronny.ae...@intris.be - Intris nv - Wapenstilstandlaan 47, 2600 Berchem, Belgium RD Integration Architect Prince II certified Tel: +32-3-326.50.75 Intris nv Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris.behttp://www.intris.be/ DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.bemailto:supp...@intris.be, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail. erp.email.routes.xml Description: erp.email.routes.xml TrisESB-config-intris-erp.xml Description: TrisESB-config-intris-erp.xml
RE: using imap or imaps with triggered reader instead of poller
Hello Claus, That is indeed what I would like to do: use a listener instead of polling. -- vriendelijke groeten, Ronny Aerts - Intris nv RD Software Integration Architect Tel: +32-3-326.50.75 -Original Message- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: maandag 23 september 2013 16:45 To: users@camel.apache.org Subject: Re: using imap or imaps with triggered reader instead of poller Hi The camel-mail component was created a long time ago, and it supports pop3 and imap. I guess it would be nice if the imap protocol could leverage the listener instead of the polling. As usual contributions is much welcome http://camel.apache.org/contributing.html On Mon, Sep 23, 2013 at 1:11 PM, Ronny Aerts ronny.ae...@intris.be wrote: Hello, De standard camel mail reader uses the MailComponent component. The consumer endpoint of this component is based on the ScheduledBatchPollingConsumer which works fine but I'm not a lover of polling on the one hand and the imap and imaps protocol support triggered mail reading on the other hand. On the fly e-mails can be retrieved by using the javax.mail.event.MessageCountListener functionality. Is this triggered way of working available in camel somehow? I search thru all camel sources but didn't find any MessageCountListener references. -- kind regards, Ronny Aertsmailto:ronny.ae...@intris.be - Intris nv RD Software Integration Architect [http://live.easyfairs.com/fileadmin/groups/6/TRANSPORT_LOGISTICS2013/ 468_60_TL_Ant_BE_2013_ST_ALG_04.gif] Registreer hierhttps://form.n200.com/?s=2lavvsbpkd9mdac=NTWO000155ONIc=2yg9b91 vk8u2x INTRIS NV Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris-group.comhttp://www.intris-group.com/ [http://www.intris-group.com/documents/graphics/logos-partners/kmo-portefeuille.jpg] Recupereer 50% van uw opleidings- en advieskosten via de kmo-portefeuillehttp://www.kmo-portefeuille.be/ Gelieve nieuwe of bestaande vragen (adhv het requestnummer) steeds te stellen via supp...@intris.bemailto:supp...@intris.be Uw requestnummer (rq), verband houdend met uw vraag, vindt u terug in het subject van deze mail. DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.bemailto:supp...@intris.be, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen [http://live.easyfairs.com/fileadmin/groups/6/TRANSPORT_LOGISTICS2013/468_60_TL_Ant_BE_2013_ST_ALG_04.gif] Registreer hierhttps://form.n200.com/?s=2lavvsbpkd9mdac=NTWO000155ONIc=2yg9b91vk8u2x INTRIS NV Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris-group.comhttp://www.intris-group.com/ [http://www.intris-group.com/documents/graphics/logos-partners/kmo-portefeuille.jpg] Recupereer 50% van uw opleidings- en advieskosten via de kmo-portefeuillehttp://www.kmo-portefeuille.be/ Gelieve nieuwe of bestaande vragen (adhv het requestnummer) steeds te stellen via supp...@intris.bemailto:supp...@intris.be Uw requestnummer (rq), verband houdend met uw vraag, vindt u terug in het subject van deze mail. DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.bemailto:supp...@intris.be, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.
using imap or imaps with triggered reader instead of poller
Hello, De standard camel mail reader uses the MailComponent component. The consumer endpoint of this component is based on the ScheduledBatchPollingConsumer which works fine but I'm not a lover of polling on the one hand and the imap and imaps protocol support triggered mail reading on the other hand. On the fly e-mails can be retrieved by using the javax.mail.event.MessageCountListener functionality. Is this triggered way of working available in camel somehow? I search thru all camel sources but didn't find any MessageCountListener references. -- kind regards, Ronny Aertsmailto:ronny.ae...@intris.be - Intris nv RD Software Integration Architect [http://live.easyfairs.com/fileadmin/groups/6/TRANSPORT_LOGISTICS2013/468_60_TL_Ant_BE_2013_ST_ALG_04.gif] Registreer hierhttps://form.n200.com/?s=2lavvsbpkd9mdac=NTWO000155ONIc=2yg9b91vk8u2x INTRIS NV Wapenstilstandlaan 47 B-2600 Berchem Tel. +32 3 326 50 75 Fax +32 3 326 42 23 www.intris-group.comhttp://www.intris-group.com/ [http://www.intris-group.com/documents/graphics/logos-partners/kmo-portefeuille.jpg] Recupereer 50% van uw opleidings- en advieskosten via de kmo-portefeuillehttp://www.kmo-portefeuille.be/ Gelieve nieuwe of bestaande vragen (adhv het requestnummer) steeds te stellen via supp...@intris.bemailto:supp...@intris.be Uw requestnummer (rq), verband houdend met uw vraag, vindt u terug in het subject van deze mail. DISCLAIMER This is an e-mail from Intris. The information contained in this communication is intended solely for use by the individual or entity to whom it is addressed. Use of this communication by others is prohibited. If the e-mail message was sent to you by mistake, please notify supp...@intris.bemailto:supp...@intris.be, destroy it without reading, using, copying or disclosing its contents to any other person. We accept no liability for damage related to data and/or documents which are communicated by electronic mail.