为 Soap 请求发送模拟响应

Send Mock response for Soap Request

我们已经创建了一个 soap 请求并使用 WebServiceTemplate 发送了该请求

WebServiceTemplate.marshalSendAndReceive(request)

因为我的客户端还没有准备好服务器。我正在尝试在本地处理此请求并计划 post 一些虚拟响应。

你能帮我如何模拟这个回复吗?

如果您使用的是 CXF,请参阅我的 JUnit 规则 utility project。它使用 JaxWsServerFactoryBean 创建端点。