camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen" ...@silverbullet.dk>
Subject RE: camel splitter component.
Date Wed, 06 Aug 2008 12:38:19 GMT
Hi

What version of Camel are you using? I recall something about a missing type convert in older
versions (could be camel 1.3).


Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: Lynch, Francis [mailto:frank.lynch@iona.com] 
Sent: 6. august 2008 14:37
To: camel-user@activemq.apache.org
Subject: camel splitter component.

Hi Folks,
I'm trying to split an xml document using an xpath expression. Its failing with an InvalidPayloadException[1].
I'm using a camel route like the following:

from("file:src/source.xml?noop=true").splitter(xpath("//Row1")).to("file:target/output");

I've included a sample of the source xml below[2]. I've also tried /foosource/Row1, xpathbuilders
etc but to no avail.
I suspect that I'm missing something simple here. Can someone point me in the right direction?
Thanks in advance.
--Frank

[1]
caught: org.apache.camel.InvalidPayloadException: No in body available of type: java.io.InputStream
but has value: [Row1: null] of type: org.apache.xerces.dom.DeferredElementNSImpl on: Message:
[Row1: null] on the exchange: Exchange[Message: [Row1: null]]


[2]
<?xml version="1.0" encoding="UTF-8"?>
<foosource>
    <Row1>
        <Name>Joe Bloggs</Name>
        <Country>UK</Country>
    </Row1>
    <Row1>
        <Name>Billy Burgeos</Name>
        <Country>IE</Country>
    </Row1>
    <Row1>
        <Name>Ronald McDonald</Name>
        <Country>US</Country>
    </Row1>
</foosource>

Mime
View raw message