activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: [camel] Recipient List - Spring Extension
Date Wed, 25 Jul 2007 17:07:39 GMT
On 7/25/07, Jeff Gunther <Jeff.Gunther@intalgent.com> wrote:
> Is this valid XML for the Recipient List Spring Extension?
>
> <camelContext id="buildStaticRecipientList" xmlns="http://
> activemq.apache.org/camel/schema/spring">
>    <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
> '{"http://activemq.apache.org/camel/schema/spring":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://
activemq.apache.org/camel/schema/spring">
  <route>
    <from uri="seda:a"/>
    <to uri="seda:b"/>
    <to uri="seda:c"/>
    <to uri="seda:d"/>
  </route>
</camelContext>

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.

-- 
James
-------
http://macstrac.blogspot.com/

Mime
View raw message