Spring ws payloadvalidatinginterceptor issues in workplace dating

Rated 4.38/5 based on 539 customer reviews

In the next post, I’ll show you how to communicate errors back to a client who is not even sending good XML.This tutorial demonstrates how to develop a web service with Spring WS.

spring ws payloadvalidatinginterceptor-89

spring ws payloadvalidatinginterceptor-74

spring ws payloadvalidatinginterceptor-23

This approach will handle your XSD validation errors, but for the message to even be checked for correctness, it must be valid XML.

I’ll add an error element: If you want to customize how Spring-WS handle XSD errors, you need to extend the Spring-WS Abstract Validating Interceptor class and set that as the validating Interceptor bean in the Spring context.

A Validating Interceptor provides hooks for handling validation errors that occur during a POX request or response.

It follows Postel’s robustness principle – “be conservative in what you send, liberal in what you accept” – and that’s probably OK for such a simple service.

But for something more complex, you might consider Mark Rose’s rebuttal to the robustness principle, and impose more restrictions.

Leave a Reply