我想使用angularjs $ http服务
来使用以下网络服务我尝试了以下代码,
$scope.btnSignIn = function(){
var soapRequest = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"'+
'xmlns:v="http://incometaxindiaefiling.gov.in/ditws/TaxCredMismatch/v_1_0">'+
'<soapenv:Header/>'+
'<soapenv:Body>'+
'<v:getTaxCredMismatchRequest>'+
'<LoginInfo>'+
'<userName>AJAPA5685E</userName>'+
'<password>pass123</password>'+
'</LoginInfo>'+
'<UserInput>'+
'<panNo>AJAPA5685E</panNo>'+
'<asseessmentyear>2014-15</asseessmentyear>'+
'</UserInput>'+
'</v:getTaxCredMismatchRequest>'+
'</soapenv:Body>'+
'</soapenv:Envelope>';
$http({
method: 'POST',
url: 'https://incometaxindiaefiling.gov.in/eFilingWS/ditws/getTaxCredMismatchRequest.wsdl',
data: soapRequest,
headers: {'Content-Type': 'application/xml'}
}).success(function(data,status, headers, config) {
console.log(data);
}).error(function(data, status, headers, config,statusText) {
});
};
但是得到了回复
XMLHttpRequest cannot load https://incometaxindiaefiling.gov.in/eFilingWS/ditws/getTaxCredMismatchRequest.wsdl. Response for preflight has invalid HTTP status code 405
请让我知道我做错了什么。