Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post soapAction with colon #16

Open
valjar opened this issue Oct 16, 2015 · 0 comments
Open

Post soapAction with colon #16

valjar opened this issue Oct 16, 2015 · 0 comments
Labels

Comments

@valjar
Copy link

valjar commented Oct 16, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants