camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Strange behavior with simple language in camel route
Date Wed, 06 Oct 2010 07:22:21 GMT
What version of Camel are you using?

On Wed, Oct 6, 2010 at 8:47 AM, Charles Moulliard <cmoulliard@gmail.com> wrote:
> Hi,
>
> The following syntax works
>
>                from(directTest)
>                .inOut(toQueue)
>                .to(logTest);
>
>                from(toQueue)
>                .transform().simple("Report incident id : ${in.body}")
>                .to(fileOutput)
>                .beanRef("feedback", "setOk");
>
> in my camel route but not this one.
>
>                from(directTest)
>                .inOut(toQueue)
>                .to(logTest);
>
>                from(toQueue)
>                .transform().simple("Report incident id : ${in.body.incidentId}")
>                .to(fileOutput)
>                .beanRef("feedback", "setOk");
>
> org.apache.camel.ExpressionIllegalSyntaxException: Illegal syntax:
> in.body.incidentId
>        at org.apache.camel.language.simple.SimpleLanguage.createSimpleExpression(SimpleLanguage.java:155)
>        at org.apache.camel.language.simple.SimpleLanguageSupport.createComplexConcatExpression(SimpleLanguageSupport.java:267)
>        at org.apache.camel.language.simple.SimpleLanguageSupport.createExpression(SimpleLanguageSupport.java:69)
>        at org.apache.camel.model.language.ExpressionDefinition.createExpression(ExpressionDefinition.java:171)
>
> public class InputReportIncident
>    implements Serializable
> {
>
>    @XmlElement(required = true)
>    protected String incidentId;
>    ...
>
>    /**
>     * Gets the value of the incidentId property.
>     *
>     * @return
>     *     possible object is
>     *     {@link String }
>     *
>     */
>    public String getIncidentId() {
>        return incidentId;
>    }
>
> What is the problem ?
>
> Regards,
>
> Charles Moulliard
>
> Senior Solution Architect - Fuse Consultant
>
> Open Source Integration: http://fusesource.com
> Blog : http://cmoulliard.blogspot.com
> Twitter : http://twitter.com/cmoulliard
> Linkedin : http://www.linkedin.com/in/charlesmoulliard
> Skype: cmoulliard
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message