Hi all,

I need to read an XML file:

<? xml version = "1.0" encoding = "UTF-8">
<data>
<name> XXXXX </ name>
<lastname> YYYYY </ lastname>
<address> ZZZZZZ </ address>
</ data>

This information needs to be stored in a queue ActiveMQ. This is the code,
but it does not work, what could be wrong? 

public class FileCopierWithCamel {

           public static void main(String args[]) throws Exception{
                  CamelContext context = new DefaultCamelContext();
                  
                  ConnectionFactory connectionFactory =
                           new ActiveMQConnectionFactory("vm://localhost");     
   
         
                  context.addComponent("jms",
                         
JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
         
                  context.addRoutes(new RouteBuilder(){
                          public void configure(){ from("file:Inbox?noop=true")
                                  .to("jms:queue:data");}
          });
         context.start();
         Thread.sleep(10000);
         context.stop();
           }

        }


Someone can help me.

Thank you.




--
View this message in context: 
http://camel.465427.n5.nabble.com/read-xml-file-to-be-sent-to-a-queue-tp5724580.html
Sent from the Camel Development mailing list archive at Nabble.com.

Reply via email to