gyc gyc - 7 months ago 53
AngularJS Question

Angularjs soap library throws a typeError on Firefox, not in Chrome

I'm using the soap service for AngularJS from Andrew McGivery

It works perfectly when called from Chrome but it returns a typeError on Firefox and IE11.

TypeError: e is null at angular.soap.js line 16

The code in question is as follows:

return {
post: function(url, action, params){
var deferred = $q.defer();

//Create SOAPClientParameters
var soapParams = new SOAPClientParameters();
for(var param in params){
soapParams.add(param, params[param]);

var soapCallback = function(e){
if(e.constructor.toString().indexOf("function Error()") != -1){
deferred.reject("An error has occurred.");
} else {

SOAPClient.invoke(url, action, soapParams, true, soapCallback);

return deferred.promise;
setCredentials: function(username, password){
SOAPClient.username = username;
SOAPClient.password = password;

e in Chrome is the object returned by my webservice (user object), in Firefox it's null and I don't know where to look in the library to debug the problem.


My controller looks like this:

.controller('SoapCtrl', function($soap) {

this.login = function(credentials) {

$'MYAPI', 'MYMETHOD', {login: credentials.login, password: credentials.password}).then(function(data) {


I also tried calling the same webservice from the jquery plugin jquery.soap inside my angular application and I get the expected behaviour in both Chrome and Firefox.


Since this is a professional project, we decided to move on to a plugin that works. jquery.soap

2 issues have been posted on the author's page with no answer for the moment.

I would have awarded the bounty to a valid answer but half the bounty is going automatically to the answer with 2 upvotes...


in the function SOAPClient._getElementsByTagName
I change the line
return document.getElementsByTagName(tagName);
return document.getElementsByTagNameNS("*", tagName);

work for me!