Javascript を使用して SOAP リクエストを作成しようとしていますが、機能していないようです。使用されている以下のコードを見つけてください。
URL="http://footballpool.dataaccess.eu/data/info.wso";
xmlStr="<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><AllDefenders xmlns="http://footballpool.dataaccess.eu"> <sCountryName>string</sCountryName></AllDefenders></soap:Body></soap:Envelope>";
jQuery.ajax({
type: "POST",
url: URL,
dataType: "xml",
processData: false,
data: xmlStr,
beforeSend: function(req) {
req.setRequestHeader("Method", "POST");
req.setRequestHeader("Content-Type", "text/xml" + "; charset=\"" + "UTF-8" + "\"");
}
});
応答:
Object
OPTIONS http://footballpool.dataaccess.eu/data/info.wso 400 (Bad Request)
jquery.js:4 XMLHttpRequest cannot load http://footballpool.dataaccess.eu/data/info.wso. Origin http://www.know7.com is not allowed by Access-Control-Allow-Origin.
http://footballpool.dataaccess.eu/data/info.wso?op=AllDefendersからの応答を取得しようとしています
ありがとうございました..