[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: large xml files using groovy


How is reading an XML file via Java code related to a SOAP endpoint?

Yeah you can read xml files in a streaming mode via a reader. Mind
that it depends what you need to do with the XML data whether you need
to read the entire XML into memory and build a DOM tree etc.
20mb is not so large anymore, so reading into memory should be fine imho.

And yeah for streaming you may need that, but it depends what you do,
and what Camel need to do.

On Mon, Nov 26, 2018 at 10:19 AM Raymond de Hond
<raymonddehond@xxxxxxxxx> wrote:
> Hi,
> I created a camel route using a soap endpoint (contract first) using format
> My question is, what's the best approach to read large xml messages (up to
> 20mb)  using groovy xmlSlurper? This slurper accepts a as
> input. Is it possible to do something like:
> def xml = exchange.getIn().getBody(;
> And should I enable streamCache = true on my route?
> Regards,
> Raymond

Claus Ibsen
----------------- @davsclaus
Camel in Action 2: