Hi,

I'm using the java DSL to configure a camel route.

After getting XML via servlet i want to validate the message against a
schema, using the validator component. Everything works fine, except the
validation process.

My route configuration:

from("servlet:///foo?servletName=bar")
            .log(LoggingLevel.INFO, "Empfange XML...")
            .process(new XMLInProcessor())
            .doTry()
            .to("validator:file:" + xsdPath)
            
            .......

This exception occurs every time during the startup process:

12.05 11:29:29 ERROR: Error starting CamelContext.
org.apache.camel.FailedToCreateRouteException: Failed to create route route1
at: >>> DoTry[[To[validator:file:path/to/xsd], Log[XML erfolgreich
validiert...], DoCatch[ [class java.lang.Exception] -> [Log[Fehler beim
Validieren der XML-Nachricht: ${exception.stacktrace}]]]]] <<< in route:
Route(route1)[[From[servlet:///foo?servletName=bar because of Failed to
resolve endpoint: validator://file:path/to/xsd due to: content is not
allowed in prolog.

It's curious because i know the xsd-File is correct. We also use the same in
other projects without problems. I already checked if there are some
characters before the xml declaration, and the xsd-File is encoded in UTF-8
without BOM. 

Some ideas?

Thanks.





--
View this message in context: 
http://camel.465427.n5.nabble.com/Validator-in-camel-route-shows-strange-error-message-tp5751018.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to