4 Replies Latest reply on Nov 28, 2014 6:30 PM by Jorge Morales

    Camel route depending on header. Namespace breaks condition

    Miguel Fernández Martínez Newbie

      I'm trying to create a Switchyard project with a Camel component following the "Message Router" pattern explained in https://camel.apache.org/message-router.html

      However, I'm having problems with conditions on headers with namespaces.

      The XML message I'm receiving is like this:

      <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">


      <DF xmlns="http://mycompany/smth">myElement</DF>



      <ns2:processIncomingMessage xmlns:ns2="http://a.namespace.com/">





      And this is my route:


      .log("Header: ${headers}")

      .log("Received message for 'CamelInterfaceService' : ${body}")






      However, OtherService is not called.

      If I change:

      <DF xmlns="http://mycompany/smth">myElement</DF>



      it works...but it is something I cannot really change...so, how can I modify my camel route to make it work?

      Thank you!