You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Daniel Langevin <da...@shq.gouv.qc.ca> on 2017/12/01 21:23:31 UTC
Rép. : Re: Attribute 'uri' is not allowed to appear in element 'enrich'
Hi Claus,
thanks , i will point on new documentation in the future .
OK now it Works
Have a nive weekend !
>>> Claus Ibsen <cl...@gmail.com> 2017-12-01 13:50 >>>
Its changed in 2.16 onwards, see the docs where there is examples for
older version and newer version
You should do
<enrich>
<constant>xxx</constant>
</enrich>
See the docs
https://github.com/apache/camel/blob/master/camel-core/src/main/docs/eips/enrich-eip.adoc
Or the old docs
http://camel.apache.org/content-enricher.html
On Fri, Dec 1, 2017 at 6:35 PM, Daniel Langevin
<da...@shq.gouv.qc.ca> wrote:
> Hi,
>
> im' using camel 2.17.7 in Karaf 4.09 OSGI, my deployement type is
SPRING
>
> i try tu use enrich to get trought a second from for enriching my
message i receive an error
>
> nested exception is org.xml.sax.SAXParseException:
cvc-complex-type.3.2.2: Attribute 'uri' is not allowed to appear in
element 'enrich'.
> at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:397)[148:org.apache.servicemix.bundles.spring-beans:3.2.18.RELEASE_1]
> at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:335)[148:org.apache.servicemix.bundles.spring-beans:3.2.18.RELEASE_1]
> at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)[148:org.apache.servicemix.bundles.spring-beans:3.2.18.RELEASE_1]
> at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
>
> Here my code:
>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:camel="http://camel.apache.org/schema/spring"
> xmlns:osgi="http://www.springframework.org/schema/osgi"
> xmlns:cxf="http://camel.apache.org/schema/cxf"
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
> http://camel.apache.org/schema/cxf
http://camel.apache.org/schema/cxf/camel-cxf.xsd
> http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring-2.17.7.xsd
> http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi.xsd">
>
> <bean id="activemq"
class="org.apache.activemq.camel.component.ActiveMQComponent">
> <property name="connectionFactory" >
> <bean
class="org.apache.activemq.ActiveMQConnectionFactory">
> <property name="userName"
value="${activemq.jms.user}"/>
> <property name="password"
value="${activemq.jms.password}"/>
> </bean>
> </property>
> </bean>
>
> <camelContext xmlns="http://camel.apache.org/schema/spring"
trace="false">
>
> <route id="route.SYS.ReadJmsMailInputRequest">
> <description> Read mail input request </description>
> <from
uri="activemq:queue:jms.SYS.mailReceive?exchangePattern=InOnly"/>
> <convertBodyTo type="java.lang.String" />
> <choice>
> <when><simple>${header.protocoliMail} == "IMAP"</simple>
> <enrich
uri="imaps://servername:993?username=xxxxxxxx&password=xxxxxxxx&delete=true&unseen=true&consumer.delay=60000"
/>
> <to uri="....................." />
> </when>
> </choice>
> </route>
>
> </camelContext>
>
>
> Why it's not allowed, if i look documentation, it's supposed to.
>
>
>
> Regards
>
> Daniel
>
>
>
>
>
> "Le présent courriel peut contenir des renseignements confidentiels
et ne s'adresse qu'au destinataire dont le nom apparaît ci-dessus. Si ce
courriel vous est parvenu par mégarde, veuillez le supprimer et nous en
aviser aussitôt."
--
Claus Ibsen
---------------
--
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2
"Le présent courriel peut contenir des renseignements confidentiels et ne s'adresse qu'au destinataire dont le nom apparaît ci-dessus. Si ce courriel vous est parvenu par mégarde, veuillez le supprimer et nous en aviser aussitôt."