Hi, 

Tried this but and it didn't work:

1- There is no overloaded function for xpath() that takes the namespace as
the second argument.
2- Still receive the same compilation error: "The method doCatch
Class<IllegalInputOrProcessingException>) is undefined> for the type
ChoiceDefinition   MyRouteBuilder.java

What if I used OnException clause like this:
OnException(IllegalInputOrProcessingException.class)
       .process(new ExceptionProcessorHandler())
       .transform(body())
       .process(new XmlEmbedder())

Will it behave the same?

Thanks


Claus Ibsen-2 wrote:
> 
> Hi
> 
> Put xpath inside the when method
>     when(xpath("xxxx"))
> 
> There is a XPathBuilder in builder.xml package and you can static
> import the xpath method on it.
> 
> 
> On Sun, Jun 6, 2010 at 4:27 PM, M.Ismail <[email protected]> wrote:
>>
>> Hi all,
>>
>> I have noticed that it is not possible to put an xpath expression inside
>> a
>> doTry expression:
>> e.g.
>>
>>        from("jetty:http://0.0.0.0:9000/";)
>>        .doTry()
>>
>>        .process(new Parser())
>>        .convertBodyTo(String.class)
>>         .choice()
>>        .when()
>>        .xpath("/ns:a...@dtc='001']",ns)
>>        .process(new fwdConverter())
>>        .setHeader("Content-Type",constant("text/xml; charset=utf-8"))
>>       .to("http://172.10.10.1/";)
>>       .convertBodyTo(String.class)
>>        .process(new backwdConverter())
>>        .convertBodyTo(String.class)
>>        .process(new XmlEmbedder())
>>        .transform(body())
>>        .doCatch(IllegalInputOrProcessingException.class)
>>        .process(new ExceptionProcessorHandler())
>>        .transform(body())
>>        .process(new XmlEmbedder())
>>        .end();
>>
>> I receive this following compilation error:
>> "The method doCatch(Class<IllegalInputOrProcessingException>) is
>> undefined
>> for the type ChoiceDefinition   MyRouteBuilder.java
>> /Max-router/src/main/java/tutorial      line 145"
>>
>>
>> Any ideas?
>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/XPath-expression-inside-doTry%28%29-tp28793165p28793165.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> 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
> 
> 

-- 
View this message in context: 
http://old.nabble.com/XPath-expression-inside-doTry%28%29-tp28793165p28817959.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to