JavaScript-SOAP-Client
JavaScript-SOAP-Client copied to clipboard
Accesing a Remote Web-Servie ( cross-domain )?
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.
You have at least 2 options:
- 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.
- 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.