SOAPサービスを呼び出すと404エラーがスローされますが、SOAP UIでは問題なく動作します。 「*」が、運以下SOAPサービスはAJAX呼び出しで失敗しますが、SOAPUIで正常に動作します
は私がサービス
let _this=this;
var webServiceURL = 'http://localhost:8082/ode/processes/WS_Invocation.WS_InvocationPort';
var soapMessage = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.invocation.tps"><soapenv:Header/><soapenv:Body><ws:WS_InvocationRequest><ws:input>1</ws:input><ws:input1>Mohan</ws:input1></ws:WS_InvocationRequest></soapenv:Body></soapenv:Envelope>'
$.ajax({
url: _this.webServiceURL,
type: "POST",
dataType: "xml",
crossDomain: true,
headers: {
'Access-Control-Allow-Origin': '*'
},
data: _this.soapMessage,
contentType: "text/xml; charset=\"utf-8\"",
success: _this.OnSuccess,
error: _this.OnError
});
を呼び出していますどのようにされていない:どこか私はこれが原因CORSの問題があった可能性がありので、私は「アクセス制御 - 許可 - 起源」にヘッダを設定しました以下は、SOAP UI
あなたの '$ .ajax'呼び出しから' headers:{'Access-Control-Allow-Origin': '*'} 'を削除してください。 Access-Control-Allow-Originは、サーバーが送信する必要がある* response *ヘッダーです。リクエストヘッダーとして送信しても、問題は解決されません。それを削除した後、ヘルプを得るためhttps://stackoverflow.com/posts/45309437/editを使って質問を編集/更新し、ブラウザのdevtoolsコンソールに表示されている正確なエラーメッセージを追加してください。 – sideshowbarker