我正在使用WebServiceTemplate.sendSourceAndReceive调用一个webservice。作为参数,我将soap作为实际包含soap头和主体的源传递。
但是服务器抱怨,无效的操作名。
那么如何在WebServiceTemplate.sendSourceAndReceive方法中指定操作名呢?
提前谢谢。
发布于 2014-07-17 12:31:20
您应该使用其中一个应用sendSourceAndReceive arg的WebServiceMessageCallback。并使用SoapActionCallback
Result result = new DOMResult();
template.sendSourceAndReceiveToResult(
new StringSource("<content xmlns=\"http://tempuri.org\"/>"),
new SoapActionCallback("http://tempuri.org/SOAPAction"),
result);https://stackoverflow.com/questions/24803277
复制相似问题