camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AlanFoster <>
Subject Xml schema RouteDefinition
Date Sun, 30 Jun 2013 12:31:16 GMT
Hi guys,

I'm just wondering if there are any technical reasons why a RouteDefinition
is allowed zero to unbounded occurrences of the `from` element; 

>From the Schema for camel 2.10.0 - 

<xs:complexType name="routeDefinition">
      <xs:extension base="tns:processorDefinition">
          <xs:element ref="tns:from" minOccurs="0" maxOccurs="unbounded"/>
          <xs:choice minOccurs="0" maxOccurs="unbounded">

We can see from the generated Schema that we are allowed a route that looks
like the following :

   <log message="Hello World" />

But we will receive the following error if we try to run it

java.lang.IllegalArgumentException: Route has no inputs: Route[[] ->
[Log[hello World]]]

IE, can we add a required = true annotation to force a min-occurs = 1 in the
generated schema, or are there technical reasons why this isn't a good idea?


View this message in context:
Sent from the Camel Development mailing list archive at

View raw message