camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nasim Anza <nasmo2...@googlemail.com>
Subject Get a list of values from processor
Date Wed, 20 May 2009 12:39:43 GMT
Hi,

I would like to get a list of values from an XML input using the Camel
route.
Assume that we have an XML input like below :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://myNamesapce">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:Addresses>
         <Address>address1</Address>
         <Address>address2</Address>
         <Address>address3</Address>
         <Address>address4</Address>
      </ns:Addresses>
   </soapenv:Body>
</soapenv:Envelope>

How to get the list of address values from a Camel Processor within a route
:

from("direct:start")
.setProperty("Addresses").xpath("//Address", ArrayList.class)
.process(myCamelProcessor);

Thanks for help

Nasmo

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message