andrewmcgivery / angular-soap

An angular port of a Javascript SOAP Client into a factory that has a similar syntax to $http.
114 stars 84 forks source link

Function run incorrectly when server does not response http status code or 404 code. #13

Open jerrybk108 opened 9 years ago

jerrybk108 commented 9 years ago

Hi, My factory: angular.module('apps').factory('test_factory', ['$soap',function($soap){ var url = "abcdef.gh"; // invalid url to test for a case that server is broken. var act = "something"; var parms = {"a":"b"}; return{ test_nonresponse: function(parms){ return $soap.post(url,act ,parms ).then(function(response){ console.log("RESULT"); },function(response){ console.log("Unexpected result"); }) } } } in controller: test_factory.test_nonrespons(); => no result was returned.

Thanks in advance!