angular-soap icon indicating copy to clipboard operation
angular-soap copied to clipboard

SOAP call not working on Firefox

Open mongonv opened this issue 10 years ago • 2 comments

We use this lib on our app and it works perfect on chrome and IE, but cannot get firefox to load the wsdl. Have tried debugging thru it and cannot find what is causing the problem in FF. It gets to the following lines and the wsdl variable is null:

SOAPClient._sendSoapRequest = function (url, method, parameters, async, callback, wsdl) { // get namespace var ns = (wsdl.documentElement.attributes["targetNamespace"] + "" == "undefined") ?

It appears to be related to the _loadWsdl function where the xmlHttp.readyState always comes back as 1 instead of the 4 the following is looking for:

SOAPClient._loadWsdl = function (url, method, parameters, async, callback) { // load from cache? var wsdl = SOAPClient_cacheWsdl[url]; if (wsdl + "" != "" && wsdl + "" != "undefined") { return SOAPClient._sendSoapRequest(url, method, parameters, async, callback, wsdl); } // get wsdl var xmlHttp = SOAPClient._getXmlHttp(); xmlHttp.open("GET", url + "?wsdl", async); if (async) { xmlHttp.onreadystatechange = function () { if (xmlHttp.readyState == 4) { SOAPClient._onLoadWsdl(url, method, parameters, async, callback, xmlHttp); } } } xmlHttp.send(null); if (!async) { return SOAPClient._onLoadWsdl(url, method, parameters, async, callback, xmlHttp); } };

Any thoughts or ideas would be greatly appreciated. Ed

mongonv avatar Dec 15 '15 00:12 mongonv

I have the same problem, in my case it works on chrome and iOS, but not on Android. Where you able to fix it?

jfredsilva avatar Feb 05 '16 17:02 jfredsilva

Are you able to duplicate this with some kind of small demo that I could look at?

andrewmcgivery avatar Mar 29 '16 23:03 andrewmcgivery