问题
I am working on creating a web service using Spring-WS. And i am using the validation framework provided by Spring-WS to validate the request. When there are validation errors, the web service returns a SOAP fault with the validation errors in the detail element of the SOAP Fault. I'd like to know if there is a way we can send a custom response(message with my own schema) instead of a SOAP Fault response? If so, i'd be grateful if you can describe how i can achieve this.
I have checked the idea of extending PayloadValidatingInterceptor for this purpose, but this only provides me a way to customize the fault string or the error detail message of the SOAP fault which is not what I want.
Thanks in advance!
来源:https://stackoverflow.com/questions/32127894/spring-ws-using-custom-schema-for-soap-faults