Spring ws payloadvalidatinginterceptor

The problem with Spring-WS is that in contrast to SAAJ and Axiom, it doesn’t have a well defined MTOM processing model.Namely, it is unspecified whether the object representing XOP decoded or encoded data.

I've tried to reproduce this, I even wrote some additional unit tests.

See Validator Factory Test Case.java, the test Multiple Schemas Valid Message method.

That new API would be easy to implement in the Axiom based implementation because Axiom already provides the necessary APIs for that.

The case is less trivial for SAAJ because that API doesn’t perform any XOP decoding itself.

in the example below if i send a request that needs to use the Location file i get "2007-08-24 ,015 WARN endpoint.interceptor.

Payload Validating Interceptor - XML validation error on request: cvc-elt.1: Cannot find the declaration of element 'm: Get Distance Request'.: m: Get Distance Request' is a root element of the Location file.Namely the method (or a new, overloaded version of that method) should have an argument that allows the caller to specify whether it expects it to return XOP encoded or decoded data, i.e.whether it is prepared to handle elements or expects to get base64 encoded data instead.Servlet Registration Bean; import org.springframework.context. Application Context; import org.springframework.context.annotation. Bean; import org.springframework.context.annotation. Message Dispatcher Servlet; import org.wsdl.wsdl11. Since Spring-WS has two implementations, one based on SAAJ and another one based on Apache Axiom let’s start by examining how these two libraries handle MTOM.

Tags: , ,