我试图通过角度js代码调用soap webservice但是我通过xmlHttp.send方法发送xml时遇到异常,其中xmlHttp是 var xmlHttp = SOAPClient._getXmlHttp();
无法加载资源:服务器响应状态为401(未经授权)。
当我通过soap UI Client发送相同的请求时,我收到正确的响应。我还设置凭据以通过下面给出的角度代码验证xml请求: -
*app.factory("soapService", ['$soap',function($soap){
var base_url = "http://10.75.108.90:61001/SOAPRouterServlet/?javaBean=true";
$soap.setCredentials("ORWFMT01","******");
return {
GetUsers: function(){
return $soap.post(base_url,"enterNotesForJob",{"destination": "AT", "pck": "PCK<01069JobManagement123Clientuserid2001071912345678BT-0000000001339","callerId":"sss","besUserId":"*******","channel":"ORSI","jobNo":"GBB02001","e2EData":""});
}
}
}]);*
我正在关注推介angular soap example
的链接