I am trying to call our Salesforce SOAP API from an external server using JavaScript, but I am getting an error because the URL it is using is from my localhost server. I am getting this error:

POST http://localhost:8888/services/Soap/u/33.0 404 (Not Found) connection.js:594

I am using the connection.js on my login.salesforce.com server and passing my credentials by sforce.connection.login(username, password);

  • have you downloaded javascript files from Salesforce server and uploaded them outside of salesforce? – Anshul Apr 14 '15 at 19:04
  • no. which files were you thinkin? – anton2g Apr 14 '15 at 19:05
  • 1
    can you provide more details as to where are you trying to access Salesforce API from. How are you using connection.js – Anshul Apr 14 '15 at 21:00
  • I am trying to access it from a local webserver. I moved around the login call with an init call before it. sforce.connection.init("null", "login.salesforce.com/services/Soap/u/33.0"); Now I get a different error: login.salesforce.com/services/Soap/u/33.0. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'localhost:8888' is therefore not allowed access. – anton2g Apr 15 '15 at 16:04
  • you should probably find your answer at salesforce.stackexchange.com/questions/60344/… – Anshul Apr 15 '15 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.