Payloadvalidatinginterceptor schemas

Since Spring WS doesn’t use a service contract, you must know the request and response type.

When consuming services, a Web Service Template is provided, in much the same vein as the Spring Web Service Template, that integrates more naturally with the rest of your Groovy code.The code used in this article was developed in my work time at Redpill Linpro.我正在使用spring-ws 2.0.2和spring-ws-test来运行我的SOAP服务器的集成测试.我使用的方法与 Web Service Client.html完全相同 这是我运行的代码,为了简洁而省略了预期的响应XML,因为它与问题无关. 我希望能够在响应有效负载中看到xml,但无法弄清楚如何访问它.如果我在设置响应后设置了一个断点并检查它,我可以看到它有一个Saaj Soap Message类型的私有message Context.response,但我无法弄清楚如何访问它,或者是否有更好的方法来查看响应XML. package com.example.integration; import static org.test.server. Create a String Reader with the String and create a Stream Source object with the String Reader.For all the details, see the source code: When the Payload Validating Interceptor work as expected, the interceptor will throw a Web Service Validation Exception when you try to send a value that’s not valid according to the XSD schema. The validation issues is a minus, but since it’s an open-source project, you always have the chance to replace or extend the classes you want.

Leave a Reply