Using the Payload Validating Interceptor the messages we're sending via Spring Mock or soap UI are rated invalid. Web Service Transformer Exception; import org.soap.server.endpoint.interceptor.
We checked the XSD several times and we're sure, the data and the schema are correct.
Problem is, I want the field name and line/column numbers for where the error occurred without having to dig it out of a long String that is different for various errors.
Seems like it should be simple but Spring does not seem to make this easy.
XMLValidator does not allow setting of properties on the validator implementations it creates.
I have looked at custom configuration of Xerces as well as other possible hacks, and at this point the only thing I can think of is to override the handle Request routine in the Xsd Validation Interceptor to create my own validators that I can configure as needed. This is the same question asked here, but unfortunately not answered: How can I provide custom error messages using JAXP Document Builder? The JAXP interface allows setting of features but does not provide the necessary control to replace the Error Reporter component in the Xerces parser, nor to customize it.
Thanks Anil As far as I know, it should work with the the configured XSD files.Info: This example only covers the validation part and extends from our existing Produce Spring WS contract-first soap service tutorial. Endpoint Interceptor; import org.soap.server.endpoint.interceptor. We cover how to configure Spring using Java Configuration how you can validate the incoming and/or outgoing messages. The client part of Spring WS can validate the parsed XML before it sends the XML document.You only need to specify a validator interceptor in the configuration and reference to it from the Web Service Template bean.