web services - How to consume SOAP Webservice in Angularjs -


i want consume below web service using angularjs $http service,

enter image description here

i tried following code,

               $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) {                      });                                       };  

but getting response

xmlhttprequest cannot load https://incometaxindiaefiling.gov.in/efilingws/ditws/gettaxcredmismatchrequest.wsdl. response preflight has invalid http status code 405  

please let me know wrong did.


Comments