Search code examples
javascriptjavaspringspring-ws

JavaScript client for Spring WS


I have spring soap web service that works well. But my js client

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);

throws

405 Method Not Allowed - http://localhost:8080/CurrencyService

How can I fix it?


Solution

  • I don't know anything about Spring WS, but apaprently whatever you have defined to handle /CurrencyService doesn't accept a POST. Skimming the docs I'd say your WebServiceMessageReceiverHttpHandler is missing or misconfigured.