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

Post soapAction with colon

Open valjar opened this issue 10 years ago • 0 comments

I have to pass soapAction which includes colon. In my case it must bee urn:getSubscriber, so that's why i have changed your var soapaction.

xmlHttp.open("POST", url, async);
var soapaction = "urn:" + method; //must be urn:getSubscriber
xmlHttp.setRequestHeader("SOAPAction", soapaction);
xmlHttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8");

When i do so my callback always crashes. If i try same action without colon everything works fine.

//Create Callback
        var soapCallback = function(e){
                    //Error Uncaught TypeError: Cannot read property 'constructor' of null
                    if(e.constructor.toString().indexOf("function Error()") != -1){
                        deferred.reject("An error has occurred.");
                    } else {
                        deferred.resolve(e);
                    }
                }
            SOAPClient.invoke(url, action, soapParams, true, soapCallback);
            return deferred.promise;
        },
        setCredentials: function(username, password){
            SOAPClient.username = username;
            SOAPClient.password = password;
        }

error: Uncaught TypeError: Cannot read property 'constructor' of null

I hope you can help. If you need any additional info. please let me know.

Regards

valjar avatar Oct 16 '15 14:10 valjar