I actually wrote the first sample by using a http-marshaller class. At the time of writing it was the only familiar way for me when having to validate the incoming xml against an xsd. I will definitely try to make use of the camel validation component in the future.
When sending pure non soap "xml" over http to an http-consumer-su, what mep type should I use? I'm using this as default: http://www.w3.org/2004/08/wsdl/in-only But are there other ones out there that is preferable? BR Mathias Gert Vanthienen wrote: > > Matthias, > > The benefit of creating a Marshaler for that, would be that the > validation happens very early on and you don't need to route invalid > messages through the ESB. You can just code this up as you would > usually do validation, reading the XSD resource off the classpath or > allow people to specify a uri (either classpath or file or whatever) > to the resource on the Marshaler configuration. > > However, other than that the little excess routing, I don't see many > advantages to building this thing yourself. Personally, I would use a > Camel route with the Camel MSV (aka > http://camel.apache.org/validation.html) in there to start with. You > can always start coding things up yourself if you're really > experiencing any problems with the overhead, but if you're using the > SedaFlow and all exchanges are just flowing around in memory, I don't > think it will be an issue. > > Regards, > > Gert Vanthienen > ------------------------ > Open Source SOA: http://fusesource.com > Blog: http://gertvanthienen.blogspot.com/ > > > > 2009/5/27 mast <[email protected]>: >> >> Hi, >> >> I would like to validate an incoming xml structure that i receives from >> an >> http request against an xsd. >> My setup so far is: >> >> http req -> http consumer su -> DefaultHttpConsumerMarshaler -> sending >> the >> received xml further down the message exchange chain -> eip router -> >> validate xml -> routes the xml to a jms provider. >> >> My question is, what setup would be a good solution for this? >> Where should i preferable validate the incoming xml? If the answer is in >> the >> marshaller, how can I then retrieve the xsd that I would like to validate >> against? Or should i use camel and from there validate the xml? >> >> I'am using SMX 3.3. >> >> BR >> Mathias >> >> >> -- >> View this message in context: >> http://www.nabble.com/XML-validating-against-XSD-best-approach-scenario-tp23740272p23740272.html >> Sent from the ServiceMix - User mailing list archive at Nabble.com. >> >> > > > ----- > --- > Gert Vanthienen > http://gertvanthienen.blogspot.com > -- View this message in context: http://www.nabble.com/XML-validating-against-XSD-best-approach-scenario-tp23740272p23746947.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
