The client part of Spring WS can validate the parsed XML before it sends the XML document.
Endpoints provide access to the application behavior which is typically defined by a business service interface.
Exceptions that are thrown during handling of the request get picked up by any of the endpoint exception resolvers that are declared in the application context.
An endpoint can choose from a large amount of XML handling libraries supported by Spring-WS, including the DOM family (W3C DOM, JDOM, dom4j, and XOM), SAX or St AX for faster performance, XPath to extract information from the message, or even marshalling techniques (JAXB, Castor, XMLBeans, Ji BX, or XStream) to convert the XML to objects and vice-versa.
It’s an issue with the SAX validator and the DOM source element that represents the parsed XML.
A quick fix to solve this problem is to transform the DOM source to a String.
The Spring WS client is a lightweight alternative that doesn’t need a WSDL to work.