You need to sign in to do that
Don't have an account?
GET method for download WSDL
Hello
I want to download wsdl file programmaticaly, using my Web JavaScript application. First I do Oauth login and get all tokens. Then I try to download WSDL file using JavaScript:
var xmlHttp = new XMLHttpRequest();
xmlHttp.onload = function () {
alert(xmlHttp.responseText);
};
xmlHttp.open("GET", "https://ap1.salesforce.com/soap/wsdl.jsp", true);
xmlHttp.setRequestHeader("Authorization", "Bearer " + accessToken);
xmlHttp.send(null);
When this code executes I always get error :
XMLHttpRequest cannot load https://ap1.salesforce.com/soap/wsdl.jsp. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin MyLocalHost is therefore not allowed access.
I've already read about CORS. Problem is that I haven't server side application and I can't manage "Access-Control-Allow .." settings. All I have is client-side JavaScript application.
Could you suggest me how can I solve this issue?
Thanks