我有 Spring Soap Web 服务,运行良好。但是我的js客户端
var req = new XMLHttpRequest();
if(req.readyState == 4){....}
req.open('POST', 'http://localhost:8080/CurrencyService', true);
req.setRequestHeader("Content-Type", "text/xml");
req.send(msg);
抛出
405 Method Not Allowed - http://localhost:8080/CurrencyService
如何修复它?
最佳答案
我对 Spring WS 一无所知,但显然您定义的用于处理/CurrencyService 的任何内容都不接受 POST。浏览docs我想说您的 WebServiceMessageReceiverHttpHandler 丢失或配置错误。
关于Spring WS 的 JavaScript 客户端,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8452399/