Re: adding namespace to route for xpath in java DSL
Hi Yes you can add namespace in Java DSL too, you need to add it on the xpath and now in the top with a new constructor. Look at the documentation. https://camel.apache.org/components/latest/xpath-language.html On Tue, Jan 7, 2020 at 1:35 AM Chio Chuan Ooi wrote: > > Hi, > > i trying to use xpath to extract text and setting it to exchange property > ``` > .setProperty(code, xpath("//code", String.class)) > ``` > but seem that due to the xml body having namespace, xpath didnt manage > to extract the value. > i try to add namespace into the route, but don't seem to be work. > > ``` > > public void configure() throws Exception { > new Namespaces("com", "http://test.com/test;); > > from("direct:...") >} > ``` > understand that we can add the namespace in the spring DSL > ``` > http://camel.apache.org/schema/spring; >customId="true" xmlns:com="http://test.com/test; > > > ``` > is that possible to do it on java DSL ? > > Thanks and Regards, > Chio Chuan -- Claus Ibsen - http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
adding namespace to route for xpath in java DSL
Hi, i trying to use xpath to extract text and setting it to exchange property ``` .setProperty(code, xpath("//code", String.class)) ``` but seem that due to the xml body having namespace, xpath didnt manage to extract the value. i try to add namespace into the route, but don't seem to be work. ``` public void configure() throws Exception { new Namespaces("com", "http://test.com/test;); from("direct:...") } ``` understand that we can add the namespace in the spring DSL ``` http://camel.apache.org/schema/spring; customId="true" xmlns:com="http://test.com/test; > ``` is that possible to do it on java DSL ? Thanks and Regards, Chio Chuan
Re: Deadletter and Aggregation again
Hi The aggregator is a 2 phased EIP so what comes out of the aggregator is not tied to the input. That is by design. If you want a fork / join kinda pattern (composed message processor is the EIP name) then you can do that from the splitter only which has aggregation strategy built-in. On Mon, Jan 6, 2020 at 6:08 PM wrote: > > Hi, > > to be able to save the original message to dead letter directory even in > multiple nested splits I store it at a property. > > .process(exchange -> { > final Message orgMessage = > exchange.getUnitOfWork().getOriginalInMessage(); > exchange.setProperty(Constants.PROPERTY_ORIGNAL_MESSAGE, > orgMessage); > }) > > And read it later in errorhandling. > This is the code for aggregation: > > from(EP_AGGREGATION_ SPLIT).routeId(SPLIT_AGGREGATION_ROUTE_ID) > .throwException(IllegalArgumentException.class, "DEBUG EX1") > .aggregate(header(Constants.PROPERTY_CASE_ID), new > ZipAggregationStrategy()) > .completionTimeout(10 * 1000 * 1) > > .completion(header(ZipAggregationStrategy.AGG_PROPERTY_COMPLETED).isEqualTo(true)) > .throwException(IllegalArgumentException.class, "DEBUG EX2") > > when I throw an exception before aggregate (EX1) it works. > But after (EX2) ist will not. (of course the first throwExeption-statement is > comment out) > Problem is, the original file is already deleted /moved into recovery. > Why? > How can I prevent this? > > Why is it not easy possible to store the original input into a dead letter > dir or queue regardless how many nested splits and aggregations in case > somewhere an exception is thrown? > Just simple and easy. > > Regards Thomas -- Claus Ibsen - http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
Deadletter and Aggregation again
Hi, to be able to save the original message to dead letter directory even in multiple nested splits I store it at a property. .process(exchange -> { final Message orgMessage = exchange.getUnitOfWork().getOriginalInMessage(); exchange.setProperty(Constants.PROPERTY_ORIGNAL_MESSAGE, orgMessage); }) And read it later in errorhandling. This is the code for aggregation: from(EP_AGGREGATION_ SPLIT).routeId(SPLIT_AGGREGATION_ROUTE_ID) .throwException(IllegalArgumentException.class, "DEBUG EX1") .aggregate(header(Constants.PROPERTY_CASE_ID), new ZipAggregationStrategy()) .completionTimeout(10 * 1000 * 1) .completion(header(ZipAggregationStrategy.AGG_PROPERTY_COMPLETED).isEqualTo(true)) .throwException(IllegalArgumentException.class, "DEBUG EX2") when I throw an exception before aggregate (EX1) it works. But after (EX2) ist will not. (of course the first throwExeption-statement is comment out) Problem is, the original file is already deleted /moved into recovery. Why? How can I prevent this? Why is it not easy possible to store the original input into a dead letter dir or queue regardless how many nested splits and aggregations in case somewhere an exception is thrown? Just simple and easy. Regards Thomas
Re: JMS connection pooling configuration instance wide in Camel 3.0.0 (Karaf 4.2.7)
Hi Gerald, Let me prepare/update Karaf 4.3.0-SNAPSHOT examples with Camel 3.0.0. I keep you posted. Regards JB On 06/01/2020 13:39, Gerald Kallas wrote: > Thanks JB. > > @Camel folks, any comments on this question from JB? > > Thanks > - Gerald > >> Jean-Baptiste Onofré hat am 6. Januar 2020 um 13:15 >> geschrieben: >> >> >> Hi Gerald, >> >> That's probably because camel-jms comes with JMS 2.0 whereas ActiveMQ is >> still JMS 1.0. >> >> You have to check if you have both JMS version in there. >> >> Regards >> JB >> >> On 06/01/2020 13:12, Gerald Kallas wrote: >>> Thanks, JB. >>> >>> I tried these commands .. >>> >>> karaf@root()> feature:repo-add hawtio 2.8.0 >>> Adding feature url mvn:io.hawt/hawtio-karaf/2.8.0/xml/features >>> karaf@root()> feature:repo-add activemq 5.15.11 >>> Adding feature url >>> mvn:org.apache.activemq/activemq-karaf/5.15.11/xml/features >>> karaf@root()> feature:repo-add camel 3.0.0 >>> Adding feature url >>> mvn:org.apache.camel.karaf/apache-camel/3.0.0/xml/features >>> karaf@root()> feature:install webconsole hawtio activemq-broker >>> pax-jms-config pax-jms-activemq jms >>> karaf@root()> jms:create -t activemq --url tcp://localhost:61616 -u karaf >>> -p karaf activemq >>> karaf@root()> jms:info -u karaf -p karaf activemq >>> Property │ Value >>> ─┼─ >>> product │ ActiveMQ >>> version │ 5.15.11 >>> karaf@root()> feature:install camel >>> karaf@root()> jms:info -u karaf -p karaf activemq >>> Property │ Value >>> ─┼─ >>> product │ ActiveMQ >>> version │ 5.15.11 >>> karaf@root()> feature:install camel-activemq >>> karaf@root()> jms:info -u karaf -p karaf activemq >>> Error executing command: No JMS connection factory found for activemq >>> karaf@root()> >>> >>> It seems that after the feature install of camel-activemq the jms >>> references are not working anymore. I tried also the same with the pax-jms >>> feature, same behaviour. >>> >>> Best >>> - Gerald >>> Jean-Baptiste Onofré hat am 6. Januar 2020 um 11:05 geschrieben: Hi, Yes, simply use the jms feature: it will use pax-jms that use a managed service with configuration backend. You have a full JMS example in Karaf distribution: https://github.com/apache/karaf/blob/master/examples/karaf-jms-example/karaf-jms-example-features/src/main/feature/feature.xml#L35 Regards JB On 06/01/2020 09:24, Gerald Kallas wrote: > Dear community, > > I'm currently configuring the JMS connection factory within a blueprint > XML like > > > class="org.apache.activemq.ActiveMQConnectionFactory"> > > > > > > Could this be done in one of the config files in etc folder for the whole > instance of Karaf/Camel? > > Any hints are helpful, tx in advance. > > Best > - Gerald > -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com >> >> -- >> Jean-Baptiste Onofré >> jbono...@apache.org >> http://blog.nanthrax.net >> Talend - http://www.talend.com -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Re: Parsing JSON within the Camel Velocity component template?
Hi Gerald, The example below shows how to use a pojo from a velocity context: https://github.com/apache/camel/blob/master/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityBodyAsDomainObjectTest.java So, chances are that you just need to set the body to a pojo offering a getName() method and then use it from the velocity context with $body.name. This is not something I've tested, but looks worth a try. Alex On Mon, Jan 6, 2020 at 12:54 PM Gerald Kallas wrote: > Dear community, > > I've following snippet .. > > > [{"name":"Wonderland","surname":"Alice"}] > > > The body comes from a jsonpath expression earlier. I've just stripped it > to the essentials. > > Is it possible to access inside a Camel Velocity component template to the > attribute values for name and surname? > > Many thanks for any response in advance. > > Best > - Gerald
Re: JMS connection pooling configuration instance wide in Camel 3.0.0 (Karaf 4.2.7)
Thanks JB. @Camel folks, any comments on this question from JB? Thanks - Gerald > Jean-Baptiste Onofré hat am 6. Januar 2020 um 13:15 > geschrieben: > > > Hi Gerald, > > That's probably because camel-jms comes with JMS 2.0 whereas ActiveMQ is > still JMS 1.0. > > You have to check if you have both JMS version in there. > > Regards > JB > > On 06/01/2020 13:12, Gerald Kallas wrote: > > Thanks, JB. > > > > I tried these commands .. > > > > karaf@root()> feature:repo-add hawtio 2.8.0 > > Adding feature url mvn:io.hawt/hawtio-karaf/2.8.0/xml/features > > karaf@root()> feature:repo-add activemq 5.15.11 > > Adding feature url > > mvn:org.apache.activemq/activemq-karaf/5.15.11/xml/features > > karaf@root()> feature:repo-add camel 3.0.0 > > Adding feature url > > mvn:org.apache.camel.karaf/apache-camel/3.0.0/xml/features > > karaf@root()> feature:install webconsole hawtio activemq-broker > > pax-jms-config pax-jms-activemq jms > > karaf@root()> jms:create -t activemq --url tcp://localhost:61616 -u karaf > > -p karaf activemq > > karaf@root()> jms:info -u karaf -p karaf activemq > > Property │ Value > > ─┼─ > > product │ ActiveMQ > > version │ 5.15.11 > > karaf@root()> feature:install camel > > karaf@root()> jms:info -u karaf -p karaf activemq > > Property │ Value > > ─┼─ > > product │ ActiveMQ > > version │ 5.15.11 > > karaf@root()> feature:install camel-activemq > > karaf@root()> jms:info -u karaf -p karaf activemq > > Error executing command: No JMS connection factory found for activemq > > karaf@root()> > > > > It seems that after the feature install of camel-activemq the jms > > references are not working anymore. I tried also the same with the pax-jms > > feature, same behaviour. > > > > Best > > - Gerald > > > >> Jean-Baptiste Onofré hat am 6. Januar 2020 um 11:05 > >> geschrieben: > >> > >> > >> Hi, > >> > >> Yes, simply use the jms feature: it will use pax-jms that use a managed > >> service with configuration backend. > >> > >> You have a full JMS example in Karaf distribution: > >> > >> https://github.com/apache/karaf/blob/master/examples/karaf-jms-example/karaf-jms-example-features/src/main/feature/feature.xml#L35 > >> > >> Regards > >> JB > >> > >> On 06/01/2020 09:24, Gerald Kallas wrote: > >>> Dear community, > >>> > >>> I'm currently configuring the JMS connection factory within a blueprint > >>> XML like > >>> > >>> > >>> >>> class="org.apache.activemq.ActiveMQConnectionFactory"> > >>> > >>> > >>> > >>> > >>> > >>> Could this be done in one of the config files in etc folder for the whole > >>> instance of Karaf/Camel? > >>> > >>> Any hints are helpful, tx in advance. > >>> > >>> Best > >>> - Gerald > >>> > >> > >> -- > >> Jean-Baptiste Onofré > >> jbono...@apache.org > >> http://blog.nanthrax.net > >> Talend - http://www.talend.com > > -- > Jean-Baptiste Onofré > jbono...@apache.org > http://blog.nanthrax.net > Talend - http://www.talend.com
Re: JMS connection pooling configuration instance wide in Camel 3.0.0 (Karaf 4.2.7)
Thanks, JB. I tried these commands .. karaf@root()> feature:repo-add hawtio 2.8.0 Adding feature url mvn:io.hawt/hawtio-karaf/2.8.0/xml/features karaf@root()> feature:repo-add activemq 5.15.11 Adding feature url mvn:org.apache.activemq/activemq-karaf/5.15.11/xml/features karaf@root()> feature:repo-add camel 3.0.0 Adding feature url mvn:org.apache.camel.karaf/apache-camel/3.0.0/xml/features karaf@root()> feature:install webconsole hawtio activemq-broker pax-jms-config pax-jms-activemq jms karaf@root()> jms:create -t activemq --url tcp://localhost:61616 -u karaf -p karaf activemq karaf@root()> jms:info -u karaf -p karaf activemq Property │ Value ─┼─ product │ ActiveMQ version │ 5.15.11 karaf@root()> feature:install camel karaf@root()> jms:info -u karaf -p karaf activemq Property │ Value ─┼─ product │ ActiveMQ version │ 5.15.11 karaf@root()> feature:install camel-activemq karaf@root()> jms:info -u karaf -p karaf activemq Error executing command: No JMS connection factory found for activemq karaf@root()> It seems that after the feature install of camel-activemq the jms references are not working anymore. I tried also the same with the pax-jms feature, same behaviour. Best - Gerald > Jean-Baptiste Onofré hat am 6. Januar 2020 um 11:05 > geschrieben: > > > Hi, > > Yes, simply use the jms feature: it will use pax-jms that use a managed > service with configuration backend. > > You have a full JMS example in Karaf distribution: > > https://github.com/apache/karaf/blob/master/examples/karaf-jms-example/karaf-jms-example-features/src/main/feature/feature.xml#L35 > > Regards > JB > > On 06/01/2020 09:24, Gerald Kallas wrote: > > Dear community, > > > > I'm currently configuring the JMS connection factory within a blueprint XML > > like > > > > > > > class="org.apache.activemq.ActiveMQConnectionFactory"> > > > > > > > > > > > > Could this be done in one of the config files in etc folder for the whole > > instance of Karaf/Camel? > > > > Any hints are helpful, tx in advance. > > > > Best > > - Gerald > > > > -- > Jean-Baptiste Onofré > jbono...@apache.org > http://blog.nanthrax.net > Talend - http://www.talend.com
Parsing JSON within the Camel Velocity component template?
Dear community, I've following snippet .. [{"name":"Wonderland","surname":"Alice"}] The body comes from a jsonpath expression earlier. I've just stripped it to the essentials. Is it possible to access inside a Camel Velocity component template to the attribute values for name and surname? Many thanks for any response in advance. Best - Gerald
Re: Spring DSL vs. Blueprint XML inside Camel 3.0.0
On Mon, Jan 6, 2020 at 11:31 AM Gerald Kallas wrote: > > Many thanks, Claus. > > I think in this case the documentation should be updated as there are a lot > of Spring XML examples in there. > All the stuff in is the same between spring xml or blueprint xml. So its just fine to have it as is. And non Karaf users can use Spring XML. > Best > - Gerald > > > Claus Ibsen hat am 6. Januar 2020 um 10:38 > > geschrieben: > > > > > > Hi > > > > Spring XML is not available anymore in Camel 3. And on 2.x its > > deprecated, and is NOT recommended at all (spring-dm is dead). > > Use only blueprint xml. > > > > > > > > > > On Mon, Jan 6, 2020 at 10:37 AM Gerald Kallas wrote: > > > > > > Dear community, > > > > > > we're starting the use of Camel 3.0.0 inside Karaf 4.2.7. > > > > > > What is the recommended XML DSL? Spring DSL or Blueprint XML? > > > > > > When we want to leverage Spring XML, ho to enable the hot deployment > > > inside Karaf? > > > > > > Many thanks in advance for comments and hints. > > > > > > Best > > > - Gerald > > > > > > > > -- > > Claus Ibsen > > - > > http://davsclaus.com @davsclaus > > Camel in Action 2: https://www.manning.com/ibsen2 -- Claus Ibsen - http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
Re: Spring DSL vs. Blueprint XML inside Camel 3.0.0
Many thanks, Claus. I think in this case the documentation should be updated as there are a lot of Spring XML examples in there. Best - Gerald > Claus Ibsen hat am 6. Januar 2020 um 10:38 > geschrieben: > > > Hi > > Spring XML is not available anymore in Camel 3. And on 2.x its > deprecated, and is NOT recommended at all (spring-dm is dead). > Use only blueprint xml. > > > > > On Mon, Jan 6, 2020 at 10:37 AM Gerald Kallas wrote: > > > > Dear community, > > > > we're starting the use of Camel 3.0.0 inside Karaf 4.2.7. > > > > What is the recommended XML DSL? Spring DSL or Blueprint XML? > > > > When we want to leverage Spring XML, ho to enable the hot deployment inside > > Karaf? > > > > Many thanks in advance for comments and hints. > > > > Best > > - Gerald > > > > -- > Claus Ibsen > - > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2
Re: Availability of HTTP4 component in Camel 3.0.0
Hi, now http4 is renamed as http. Regards JB On 06/01/2020 09:21, Gerald Kallas wrote: > Dear community, > > I'm using Camel 3.0.0 ant did find the HTTP component only. When would become > the HTTP4 component part of the release? > > Best > - Gerald > -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Re: Spring DSL vs. Blueprint XML inside Camel 3.0.0
Hi Gerald, I would rather recommend Java DSL/SCR in Karaf or Blueprint. Regards JB On 06/01/2020 10:36, Gerald Kallas wrote: > Dear community, > > we're starting the use of Camel 3.0.0 inside Karaf 4.2.7. > > What is the recommended XML DSL? Spring DSL or Blueprint XML? > > When we want to leverage Spring XML, ho to enable the hot deployment inside > Karaf? > > Many thanks in advance for comments and hints. > > Best > - Gerald > -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Re: JMS connection pooling configuration instance wide in Camel 3.0.0 (Karaf 4.2.7)
Hi, Yes, simply use the jms feature: it will use pax-jms that use a managed service with configuration backend. You have a full JMS example in Karaf distribution: https://github.com/apache/karaf/blob/master/examples/karaf-jms-example/karaf-jms-example-features/src/main/feature/feature.xml#L35 Regards JB On 06/01/2020 09:24, Gerald Kallas wrote: > Dear community, > > I'm currently configuring the JMS connection factory within a blueprint XML > like > > > class="org.apache.activemq.ActiveMQConnectionFactory"> > > > > > > Could this be done in one of the config files in etc folder for the whole > instance of Karaf/Camel? > > Any hints are helpful, tx in advance. > > Best > - Gerald > -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
RE: JMS connection pooling configuration instance wide in Camel 3.0.0 (Karaf 4.2.7)
Hi. That's how I did it (with artemis, though I suppose it would be the same with the activemq): feature:repo-add mvn:org.apache.activemq/artemis-features/2.10.1/xml/features feature:install -u -r pax-jms-artemis pax-jms-pool pax-jms-config jms Then create a etc/org.ops4j.connectionfactory-default.cfg (default is the "name" of the instance), changing the parameters as you need: connectionFactoryType = ConnectionFactory jms.url = tcp://localhost:61616 jms.user = karaf jms.password = karaf osgi.jndi.service.name = mq/default type = artemis Later on, you can reference the ConnectionFactory in blueprint xml: But if you want to expose a org.apache.activemq.ActiveMQConnectionFactory, from my point of view there's two options: 1. Register it using the blueprint as a service and reference it in other blueprints/bundles/... 2. Create a bundle, that registers a ManagedServiceFactory/ManagedService, which will create and register an instance of ActiveMQConnectionFactory with the parameters from the Configuration Admin (that come from the cfg file). -Original Message- From: Gerald Kallas Sent: Monday, January 6, 2020 3:24 PM To: users@camel.apache.org Subject: JMS connection pooling configuration instance wide in Camel 3.0.0 (Karaf 4.2.7) Dear community, I'm currently configuring the JMS connection factory within a blueprint XML like Could this be done in one of the config files in etc folder for the whole instance of Karaf/Camel? Any hints are helpful, tx in advance. Best - Gerald
Re: Spring DSL vs. Blueprint XML inside Camel 3.0.0
Hi Spring XML is not available anymore in Camel 3. And on 2.x its deprecated, and is NOT recommended at all (spring-dm is dead). Use only blueprint xml. On Mon, Jan 6, 2020 at 10:37 AM Gerald Kallas wrote: > > Dear community, > > we're starting the use of Camel 3.0.0 inside Karaf 4.2.7. > > What is the recommended XML DSL? Spring DSL or Blueprint XML? > > When we want to leverage Spring XML, ho to enable the hot deployment inside > Karaf? > > Many thanks in advance for comments and hints. > > Best > - Gerald -- Claus Ibsen - http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
Spring DSL vs. Blueprint XML inside Camel 3.0.0
Dear community, we're starting the use of Camel 3.0.0 inside Karaf 4.2.7. What is the recommended XML DSL? Spring DSL or Blueprint XML? When we want to leverage Spring XML, ho to enable the hot deployment inside Karaf? Many thanks in advance for comments and hints. Best - Gerald
Re: Camel 3.0.0 marshal component doesn't allow ref attribute
On Mon, Jan 6, 2020 at 10:25 AM Gerald Kallas wrote: > > Thanks, Claus. > > Further, how can I define the data format in Blueprint XML. This .. > > > > > > Put them inside https://camel.apache.org/schema/blueprint/camel-blueprint-3.0.0.xsd > doesn't work as "dataFormats" isn't allowed. > > This .. > > > class="org.apache.camel.spi.DataFormat.JsonDataFormat"> > > > > requires (osgi.wiring.package=org.apache.camel.spi.DataFormat). > > Best > - Gerald > > > Claus Ibsen hat am 6. Januar 2020 um 10:09 > > geschrieben: > > > > > > Hi > > > > Btw you can do this in 2.x also, and the ref attribute was also > > deprecated on 2.x > > https://github.com/apache/camel/blob/camel-2.x/camel-core/src/main/java/org/apache/camel/model/MarshalDefinition.java#L135 > > > > On Mon, Jan 6, 2020 at 10:04 AM Claus Ibsen wrote: > > > > > > Hi > > > > > > Use to refer to a custom data format (eg its custom > > > when its a ) > > > > > > > > > > > > > > > > > > > > > On Mon, Jan 6, 2020 at 9:57 AM Gerald Kallas wrote: > > > > > > > > Dear community, > > > > > > > > I've following snippet > > > > > > > > http://www.osgi.org/xmlns/blueprint/v1.0.0;> > > > > ... > > > > > > > class="org.apache.camel.model.dataformat.JsonDataFormat"> > > > > ... > > > > > > > > > > > > While deploying I'm getting > > > > > > > > Caused by: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: > > > > Attribute 'ref' is not allowed to appear in element 'marshal'. > > > > > > > > In Spring XML of older Camel installation the ref attribute works. What > > > > I'm doing wrong here? > > > > > > > > Many tx in advance for any hints. > > > > > > > > Best > > > > - Gerald > > > > > > > > > > > > -- > > > Claus Ibsen > > > - > > > http://davsclaus.com @davsclaus > > > Camel in Action 2: https://www.manning.com/ibsen2 > > > > > > > > -- > > Claus Ibsen > > - > > http://davsclaus.com @davsclaus > > Camel in Action 2: https://www.manning.com/ibsen2 -- Claus Ibsen - http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
Re: Camel 3.0.0 marshal component doesn't allow ref attribute
Thanks, Claus. Further, how can I define the data format in Blueprint XML. This .. doesn't work as "dataFormats" isn't allowed. This .. requires (osgi.wiring.package=org.apache.camel.spi.DataFormat). Best - Gerald > Claus Ibsen hat am 6. Januar 2020 um 10:09 > geschrieben: > > > Hi > > Btw you can do this in 2.x also, and the ref attribute was also > deprecated on 2.x > https://github.com/apache/camel/blob/camel-2.x/camel-core/src/main/java/org/apache/camel/model/MarshalDefinition.java#L135 > > On Mon, Jan 6, 2020 at 10:04 AM Claus Ibsen wrote: > > > > Hi > > > > Use to refer to a custom data format (eg its custom > > when its a ) > > > > > > > > > > > > > > On Mon, Jan 6, 2020 at 9:57 AM Gerald Kallas wrote: > > > > > > Dear community, > > > > > > I've following snippet > > > > > > http://www.osgi.org/xmlns/blueprint/v1.0.0;> > > > ... > > > > > class="org.apache.camel.model.dataformat.JsonDataFormat"> > > > ... > > > > > > > > > While deploying I'm getting > > > > > > Caused by: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: > > > Attribute 'ref' is not allowed to appear in element 'marshal'. > > > > > > In Spring XML of older Camel installation the ref attribute works. What > > > I'm doing wrong here? > > > > > > Many tx in advance for any hints. > > > > > > Best > > > - Gerald > > > > > > > > -- > > Claus Ibsen > > - > > http://davsclaus.com @davsclaus > > Camel in Action 2: https://www.manning.com/ibsen2 > > > > -- > Claus Ibsen > - > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2
Re: Camel 3.0.0 marshal component doesn't allow ref attribute
Hi Btw you can do this in 2.x also, and the ref attribute was also deprecated on 2.x https://github.com/apache/camel/blob/camel-2.x/camel-core/src/main/java/org/apache/camel/model/MarshalDefinition.java#L135 On Mon, Jan 6, 2020 at 10:04 AM Claus Ibsen wrote: > > Hi > > Use to refer to a custom data format (eg its custom > when its a ) > > > > > > > On Mon, Jan 6, 2020 at 9:57 AM Gerald Kallas wrote: > > > > Dear community, > > > > I've following snippet > > > > http://www.osgi.org/xmlns/blueprint/v1.0.0;> > > ... > > > class="org.apache.camel.model.dataformat.JsonDataFormat"> > > ... > > > > > > While deploying I'm getting > > > > Caused by: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute > > 'ref' is not allowed to appear in element 'marshal'. > > > > In Spring XML of older Camel installation the ref attribute works. What I'm > > doing wrong here? > > > > Many tx in advance for any hints. > > > > Best > > - Gerald > > > > -- > Claus Ibsen > - > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2 -- Claus Ibsen - http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
Re: Camel 3.0.0 marshal component doesn't allow ref attribute
Hi Use to refer to a custom data format (eg its custom when its a ) On Mon, Jan 6, 2020 at 9:57 AM Gerald Kallas wrote: > > Dear community, > > I've following snippet > > http://www.osgi.org/xmlns/blueprint/v1.0.0;> > ... > class="org.apache.camel.model.dataformat.JsonDataFormat"> > ... > > > While deploying I'm getting > > Caused by: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute > 'ref' is not allowed to appear in element 'marshal'. > > In Spring XML of older Camel installation the ref attribute works. What I'm > doing wrong here? > > Many tx in advance for any hints. > > Best > - Gerald -- Claus Ibsen - http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
Camel 3.0.0 marshal component doesn't allow ref attribute
Dear community, I've following snippet http://www.osgi.org/xmlns/blueprint/v1.0.0;> ... ... While deploying I'm getting Caused by: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'ref' is not allowed to appear in element 'marshal'. In Spring XML of older Camel installation the ref attribute works. What I'm doing wrong here? Many tx in advance for any hints. Best - Gerald
JMS connection pooling configuration instance wide in Camel 3.0.0 (Karaf 4.2.7)
Dear community, I'm currently configuring the JMS connection factory within a blueprint XML like Could this be done in one of the config files in etc folder for the whole instance of Karaf/Camel? Any hints are helpful, tx in advance. Best - Gerald
Re: Availability of HTTP4 component in Camel 3.0.0
Hi, from the Migration Guide: The http4 component has been renamed to http, and it’s corresponding component package from org.apache.camel.component.http4 to org.apache.camel.component.http. The supported schemes are now only http and https. BR Maruan > Dear community, > > I'm using Camel 3.0.0 ant did find the HTTP component only. When would become > the HTTP4 component part of the release? > > Best > - Gerald -- Maruan Sahyoun FileAffairs GmbH Josef-Schappe-Straße 21 40882 Ratingen Tel: +49 (2102) 89497 88 Fax: +49 (2102) 89497 91 sahy...@fileaffairs.de www.fileaffairs.de Geschäftsführer: Maruan Sahyoun Handelsregister: AG Düsseldorf, HRB 53837 UST.-ID: DE248275827
Availability of HTTP4 component in Camel 3.0.0
Dear community, I'm using Camel 3.0.0 ant did find the HTTP component only. When would become the HTTP4 component part of the release? Best - Gerald
Re: SSL Configuration of the Camel 3.0.0 HTTP component in a blueprint route seems to be incomplete
Finally I did get the SSL config working. 1. I have added 2 lines at system.properties javax.net.ssl.trustStore=${karaf.etc}/truststore.jks javax.net.ssl.trustStorePassword=x 2. I've changed the route as following http://camel.apache.org/schema/blueprint;> ... 1. does set the trust store, 2. helped with certs that not match the hostname Best - Gerald > Gerald Kallas < catsh...@mailbox.org mailto:catsh...@mailbox.org > hat am > 5. Januar 2020 um 14:50 geschrieben: > > > Dear community, > > I'm using Karaf 4.2.7 with Camel 3.0.0. For calling an external HTTPS > resource I need to configure the truststore for the Camel HTTP component. See > my blueprint route below > > http://www.osgi.org/xmlns/blueprint/v1.0.0; > http://www.osgi.org/xmlns/blueprint/v1.0.0 > xmlns:camel=" http://camel.apache.org/schema/blueprint; > http://camel.apache.org/schema/blueprint > > > class="org.apache.activemq.ActiveMQConnectionFactory"> > > > > > > > > resource="/home/ec2-user/casisp-runtime/apache-karaf-4.2.7/etc/truststore.jks" > password="x" /> > > > http://camel.apache.org/schema/blueprint; > http://camel.apache.org/schema/blueprint > > > > > > > GET > > > application/json > > > Basic x > > > > > > > > > The truststore contains 1 self signed PEM cert from the destination. > > Finally I'm still getting an error > > javax.net.ssl.SSLHandshakeException: PKIX path building failed: > sun.security.provider.certpath.SunCertPathBuilderException: unable to find > valid certification path to requested target > > Do I still miss something? > > Is there any other way to configure a truststore globally for the HTTP > component? > > Many thanks in advance for any comments and hints. > > Best > - Gerald >