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 17:35:42 UTC
Attribute 'uri' is not allowed to appear in element 'enrich'
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."
Attribute 'uri' is not allowed to appear in element 'enrich'
Posted by Daniel Langevin <da...@shq.gouv.qc.ca>.
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."