The camel 2.0 snapshot schema (
http://camel.apache.org/schema/spring/camel-spring-2.0-SNAPSHOT.xsd) does
not propose doTry, doCatch BUT :
try, catch which is different from the documentation page

  <xs:element name="catch" type="tns:catchDefinition"/>
  <xs:element name="try" type="tns:tryDefinition"/>


Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com


On Mon, Jun 8, 2009 at 1:47 PM, Claus Ibsen <[email protected]> wrote:

> On Mon, Jun 8, 2009 at 1:34 PM, Charles Moulliard<[email protected]>
> wrote:
> > Hi,
> >
> > I try the following syntax to do a try/catch in camel spring DSL :
> >
> >        <camel:route>
> > ...
> >            <camel:try>
> >                <camel:unmarshal ref="oinpCsvMessageToModel" />
> >                <camel:to ref="queueClientInEndpoint" />
> >                <camel:catch>
> >
> > <camel:onException>java.lang.IllegalArgumentException</camel:onException>
> >                    <camel:to ref="queueReportingEndpoint" />
> >                </camel:catch>
> >
> >            </camel:try>
> >        </camel:route>
> >
> > but I receive the following error :
>
> Hi Charles
>
> The answer is blowing in the wind.
> http://camel.apache.org/try-catch-finally.html
>
> And the XSD below even mention: doTry, doCatch, doFinally.
>
>
>
> >
> > *org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
> Line
> > 68 in XML document from URL
> > [bundle://89.0:0/META-INF/spring/camel-context.xml] is invalid; nested
> > exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a:
> Invalid
> > content was found starting with element 'camel:try'.* One of '{"
> > http://camel.apache.org/schema/spring":aggregate, "
> > http://camel.apache.org/schema/spring":bean, "
> > http://camel.apache.org/schema/spring":doCatch, "
> > http://camel.apache.org/schema/spring":when, "
> > http://camel.apache.org/schema/spring":choice, "
> > http://camel.apache.org/schema/spring":otherwise, "
> > http://camel.apache.org/schema/spring":convertBodyTo, "
> > http://camel.apache.org/schema/spring":delay, "
> > http://camel.apache.org/schema/spring":enrich, "
> > http://camel.apache.org/schema/spring":filter, "
> > http://camel.apache.org/schema/spring":doFinally, "
> > http://camel.apache.org/schema/spring":idempotentConsumer, "
> > http://camel.apache.org/schema/spring":inOnly, "
> > http://camel.apache.org/schema/spring":inOut, "
> > http://camel.apache.org/schema/spring":intercept, "
> > http://camel.apache.org/schema/spring":interceptFrom, "
> > http://camel.apache.org/schema/spring":interceptToEndpoint, "
> > http://camel.apache.org/schema/spring":loadBalance, "
> > http://camel.apache.org/schema/spring":loop, "
> > http://camel.apache.org/schema/spring":marshal, "
> > http://camel.apache.org/schema/spring":multicast, "
> > http://camel.apache.org/schema/spring":onCompletion, "
> > http://camel.apache.org/schema/spring":onException, "
> > http://camel.apache.org/schema/spring":pipeline, "
> > http://camel.apache.org/schema/spring":policy, "
> > http://camel.apache.org/schema/spring":process, "
> > http://camel.apache.org/schema/spring":recipientList, "
> > http://camel.apache.org/schema/spring":removeHeader, "
> > http://camel.apache.org/schema/spring":removeProperty, "
> > http://camel.apache.org/schema/spring":resequence, "
> > http://camel.apache.org/schema/spring":rollback, "
> > http://camel.apache.org/schema/spring":route, "
> > http://camel.apache.org/schema/spring":routingSlip, "
> > http://camel.apache.org/schema/spring":setBody, "
> > http://camel.apache.org/schema/spring":setExchangePattern, "
> > http://camel.apache.org/schema/spring":setHeader, "
> > http://camel.apache.org/schema/spring":setOutHeader, "
> > http://camel.apache.org/schema/spring":setProperty, "
> > http://camel.apache.org/schema/spring":sort, "
> > http://camel.apache.org/schema/spring":split, "
> > http://camel.apache.org/schema/spring":stop, "
> > http://camel.apache.org/schema/spring":threads, "
> > http://camel.apache.org/schema/spring":throttle, "
> > http://camel.apache.org/schema/spring":throwException, "
> > http://camel.apache.org/schema/spring":to, "
> > http://camel.apache.org/schema/spring":transacted, "
> > http://camel.apache.org/schema/spring":transform, "
> > http://camel.apache.org/schema/spring":doTry, "
> > http://camel.apache.org/schema/spring":unmarshal, "
> > http://camel.apache.org/schema/spring":wireTap}' is expected.
> >
> >
> > So what is the correct as the wiki page is different from schema
> definition!
> >
> >
> > Regards,
> >
> > Charles Moulliard
> > Senior Enterprise Architect
> > Apache Camel Committer
> >
> > *****************************
> > blog : http://cmoulliard.blogspot.com
> >
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>

Reply via email to