doedje / jquery.soap

This script uses $.ajax to send a SOAP:Envelope. It can take XML DOM, XML string or JSON as input and the response can be returned as either XML DOM, XML string or JSON too.
352 stars 147 forks source link

Getting the following error #33

Closed ghost closed 10 years ago

ghost commented 10 years ago

OPTIONS [...] 415 (Unsupported Media Type) jquery-2.0.3.js:7845 OPTIONS [...] No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. jquery-2.0.3.js:7845 XMLHttpRequest cannot load [...]. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.

Please help

doedje commented 10 years ago

first guess you are trying to do a cross-server request which is not allowed due to same-origin-policy...

read: https://github.com/doedje/jquery.soap#same-origin-policy

Let me know when you are sure this is not the case.

ghost commented 10 years ago

And how to use CORS with the plugin?

doedje commented 10 years ago

It is something you setup on the server hosting your site and on the server hosting the webservice. Settings this up is not done in javascript or in jquery.soap. Google it. =]