JavaScript-SOAP-Client icon indicating copy to clipboard operation
JavaScript-SOAP-Client copied to clipboard

Accesing a Remote Web-Servie ( cross-domain )?

Open hugomosh opened this issue 11 years ago • 1 comments
trafficstars

Is there a work around solution for the problem of

No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.

soi I can access the web-service in another url.

hugomosh avatar Apr 25 '14 19:04 hugomosh

You have at least 2 options:

  1. You should add header 'Access-Control-Allow-Origin' at your server side in response to HTTP OPTIONS request. Value of header should be an address of host that performs SOAP request.
  2. You should configure your web server to proxy-pass local requests to remote server. So for JavaScript SOAP request it'll be a local request to same host. But web-server will 'redirect' (proxy-pass in terms of nginx) request to remote server.

introkun avatar Apr 25 '14 19:04 introkun