activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: [camel] Recipient List - Spring Extension
Date Wed, 25 Jul 2007 17:07:39 GMT
On 7/25/07, Jeff Gunther <> wrote:
> Is this valid XML for the Recipient List Spring Extension?
> <camelContext id="buildStaticRecipientList" xmlns="http://
>    <route>
>      <from uri="seda:a"/>
>      <to>
>        <uri>seda:b</uri>
>        <uri>seda:c</uri>
>        <uri>seda:d</uri>
>      </to>
>    </route>
> </camelContext>
> When I try to use this notation, I get the following error:
> nested exception is org.xml.sax.SAXParseException: cvc-complex-type.
> 2.4.a: Invalid content was found starting with element 'uri'. One of
> '{"":endpoint}' is
> expected.)
> Any ideas?

FWIW we've been converting the XML parsing to use JAXB2 rather than
trying to magically-auto-expose the Java DSL as XML (which caused a
few leaky abstractions). The new JAXB2 parsing of the XML is much
simpler and its easier to grok the code to figure out what the XML
looks like - or use the generated XSD etc.

In trunk, the following should work...

<camelContext id="buildStaticRecipientList" xmlns="http://">
    <from uri="seda:a"/>
    <to uri="seda:b"/>
    <to uri="seda:c"/>
    <to uri="seda:d"/>

As soon as the new XML and more importantly, the XSD is all nailed
down in the next few days hopefully we can release 1.1 with this in.


View raw message