Thanks for that info.

Do you have an example? 
I tried Camel 2.18.1

*Activemq.log*
jvm 1    |  INFO | Apache Camel 2.18.1 (CamelContext:
EmbeddedCamel-localhost) started in 0.166 seconds

*My routes file:*

        <routes id="esbRoute1" xmlns="http://camel.apache.org/schema/spring";
xmlns:km="http://xsdrepo.xxxx.com/messaging/esb"; >
                <route>
                        <from uri="activemq:queue:esb.*/>
                        <doTry>
                                <to
uri="validator:http://xsdrepo.xxxx.com/messaging/esb/ESBMessageV3.xsd"/>
                                <setHeader headerName="Route1">                 
        
                                        <xpath logNamespaces="true"
resultType="String">/km:FMIMessage/km:Header/km:Route/text()</xpath>
                                </setHeader>
                                <recipientList delimiter="false">
                                        <header>Route1</header>
                                </recipientList>
                                <doCatch>
                                        
<exception>org.apache.camel.ValidationException</exception>
                                        <onWhen>
                                                
<simple>${exception.message}</simple>
                                        </onWhen>
                                        <to 
uri="activemq:queue:invalid.schema"/>
                                </doCatch>
                        </doTry>
                </route>
        </routes>

*Error:
*
jvm 1    | org.apache.camel.builder.xml.InvalidXPathExpression: Invalid
xpath: /km:FMIMessage/km:Header/km:Route/text(). Reason:
javax.xml.xpath.XPathExpressionException: com.sun.org.apache.xpath.inte
rnal.domapi.XPathStylesheetDOM3Exception: Prefix must resolve to a
namespace: km
jvm 1    |      at
org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:794)[camel-core-2.18.1.jar:2.18.1]




--
View this message in context: 
http://activemq.2283324.n4.nabble.com/cameRoutesBrokerPlugin-namespace-question-tp4720237p4720268.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to