-
15. Re: Question about validate pattern
davsclaus Aug 17, 2011 2:43 AM (in response to ffang)Yeah that is correct: doTry, doCatch, doFinally works just like try, catch, finally does in regular Java.
-
16. Re: Question about validate pattern
neledv Aug 17, 2011 2:51 AM (in response to neledv)Even when I remove the finally block, all my messages end up in the invalid path...
-
17. Re: Question about validate pattern
ffang Aug 17, 2011 4:33 AM (in response to neledv)Hi,
I enable DEBUG for camel so I get the exception like
16:07:33,319 | DEBUG | -00-43/validator | FileConsumer | 77 - org.apache.camel.camel-core - 2.7.1.fuse-00-43 | About to process file: GenericFile[/Users/ffang/apache-servicemix-4.4.0-fuse-00-43/validator/hello_world.wsdl] using exchange: Exchange[hello_world.wsdl]
16:07:33,325 | DEBUG | -00-43/validator | SendProcessor | 77 - org.apache.camel.camel-core - 2.7.1.fuse-00-43 | >>>> Endpoint[validator://file:/Users/ffang/apache-servicemix-4.4.0-fuse-00-43/xsd/wsdl.xsd] Exchange[hello_world.wsdl]
16:07:33,329 | DEBUG | -00-43/validator | Pipeline | 77 - org.apache.camel.camel-core - 2.7.1.fuse-00-43 | Message exchange has failed: so breaking out of pipeline for exchange: Exchange[hello_world.wsdl] Exception: org.apache.camel.processor.validation.NoXmlBodyValidationException: No XML body could be found on the input message. Exchange[hello_world.wsdl]
16:07:33,330 | DEBUG | -00-43/validator | TryProcessor | 77 - org.apache.camel.camel-core - 2.7.1.fuse-00-43 | The exception is handled: true for the exception: org.apache.camel.processor.validation.NoXmlBodyValidationException caused by: No XML body could be found on the input message. Exchange[hello_world.wsdl]
16:07:33,330 | DEBUG | -00-43/validator | SendProcessor | 77 - org.apache.camel.camel-core - 2.7.1.fuse-00-43 | >>>> Endpoint[file:///Users/ffang/apache-servicemix-4.4.0-fuse-00-43/invalid?noop=false] Exchange[hello_world.wsdl]
So this isn't something wrong during schema validation, it's something wrong that validator can't read the from xml file at all.
I still think there is something wrong from your DSL(our DSL expert can correct me if I'm wrong).
Anyway, add
can make it work.
Freeman
-
18. Re: Question about validate pattern
neledv Aug 17, 2011 5:55 AM (in response to neledv)Hi,
Adding the convertBodyTo seems to do the trick... XML valiator is working correctly now ! Thanks a lot !
-
19. Re: Question about validate pattern
davsclaus Aug 17, 2011 6:17 AM (in response to neledv)Hi
I have created a ticket to improve this in Camel so it in the future can load directly from the file.