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: XML Validation throws NoXmlBodyValidationException
Date Tue, 23 Jun 2009 07:30:20 GMT
Hi
I have created a ticket to track this one
https://issues.apache.org/activemq/browse/CAMEL-1743

And currently working on a fix.


On Tue, Jun 23, 2009 at 9:08 AM, Claus Ibsen <claus.ibsen@gmail.com> wrote:

> Hi
> A workaround a you can say a solution is to convert the body to String
> before validating
>
> from("jetty...")
>     .convertBodyTo(String.class)
>     .to("validatior:..");
>
>
> On Mon, Jun 22, 2009 at 3:57 PM, SwenVogel <swen.vogel@ypsystems.de>wrote:
>
>>
>> Hi,
>>
>> i created the following simple route:
>>
>> from("jetty:http://localhost:8080/test").to("validator:file:c:\\
>> http://www.nabble.com/file/p24147734/in.xsd in.xsd ");
>>
>> and after sending a sample xml file (
>> http://www.nabble.com/file/p24147734/in.xml in.xml ) with curl:
>>
>> curl -d@in.xml http://localhost:8080/test
>>
>> i get the following exception back:
>>
>> org.apache.camel.processor.validation.NoXmlBodyValidationException: No XML
>> body could be found on the input message on the exchange:
>> Exchange[Message:
>> org.apache.camel.converter.stream.InputStreamCache@1d95033]
>>        at
>>
>> org.apache.camel.processor.validation.ValidatingProcessor.process(ValidatingProcessor.java:58)
>>        at
>>
>> org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:95)
>>        at
>>
>> org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:65)
>>        at
>>
>> org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:61)
>>        at
>>
>> org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:59)
>>        at
>> org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:136)
>>        at
>> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:58)
>>        at
>>
>> org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:52)
>>        at
>>
>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:61)
>>        at
>>
>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:61)
>>        at
>>
>> org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:52)
>>        at
>> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:147)
>>        at
>>
>> org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:54)
>>        at
>>
>> org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
>>        at
>> org.apache.camel.component.http.CamelServlet.service(CamelServlet.java:52)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>>        at
>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
>>        at
>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389)
>>        at
>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>>        at
>>
>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
>>        at
>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>>        at org.mortbay.jetty.Server.handle(Server.java:326)
>>        at
>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
>>        at
>>
>> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:879)
>>        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
>>        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
>>        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>>        at
>>
>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
>>        at
>>
>> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
>>
>> --
>> View this message in context:
>> http://www.nabble.com/XML-Validation-throws-NoXmlBodyValidationException-tp24147734p24147734.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>
>


-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message