WebServiceMessageCallback,消息无法解析为变量

时间:2013-10-30 22:27:02

标签: java spring soap spring-ws

我正在使用Spring WS来调用XML Web服务。当我尝试在WebServiceMessageCallback的doWithMessage方法中检查“message”时,我得到“消息无法解析为变量”。代码确实可以编译,但似乎没有记录消息。

this.webserviceTemplate.sendSourceAndReceiveToResult(source,
new WebServiceMessageCallback() {
    @Override
    public void doWithMessage(WebServiceMessage message)
            throws IOException, TransformerException {
        if (LOG.isDebugEnabled()) {
            // log the SOAP request
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            message.writeTo(out);
            LOG.debug("SOAP Request Payload: " + new String(out.toByteArray()));
            }
        }
        }, result);

0 个答案:

没有答案