And we highly appreciate contributions :). If you want to have some fun and try writing the unit test yourself that'd be awesome.

Cheers,
Hadrian



On Jun 22, 2009, at 11:36 AM, Claus Ibsen wrote:

Hi
This is a bug.
The InputStreamCache is not convertable to DOMSource as the validator
expects.
The other cache types looks okay at first glance.

Do you mind creating a ticket in JIRA and attach you xsd and the route you
use?

Then we can use that as a base for an unit test to implement a fix.




On Mon, Jun 22, 2009 at 3:57 PM, SwenVogel <swen.vo...@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 -...@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.inputstreamca...@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

Reply via email to