Finally, the test asserts that the service returned the expected result. All the web service details are hiding in the configuration.
The test above requires a marshaller and Web Service Template bean. That’s the package name for the generated JAXB classes.
First, I will explain what are the necessary adapters that will allow us to invoke a web service from Spring Integration.
Next, we will go through a brief explanation of a Spring Web Services project, which will be the external web service that will be invoked from our application.
Since Spring WS doesn’t use a service contract, you must know the request and response type.
The test below demonstrates how to create and instantiate a request object of a JAXB generated class, call the marshall Send And Receive method with it and how to cast the response object to an object of the JAXB generated response class.
We checked the XSD several times and we're sure, the data and the schema are correct. I implemented two test cases inside our Spring JUnit4Class Runner using the springframework.xml-validator engine and validation classes to validate the payload outside of the WS against the schema. Does anybody knows a reason why the validation inside the WS behaves different to the manual validation?