jQuery的/ AJAX / SOAP - 访问控制 - 允许原产地 [英] jquery / ajax / soap - access-control-allow-origin
问题描述
我试图使用jQuery / AJAX访问SOAP Web服务,并得到一个访问控制允许起源错误:
I'm trying to access a SOAP web service using jquery / ajax and getting an access control allow origin error:
XMLHtt prequest无法加载 https://site.com/service/Service的.asmx?OP = LoginConsumer 。产地的http://本地主机:8888 不受访问控制 - 允许 - 原产地允许
XMLHttpRequest cannot load https://site.com/service/Service.asmx?op=LoginConsumer. Origin http://localhost:8888 is not allowed by Access-Control-Allow-Origin
有没有解决的办法吗?他们是我需要做的设置这一些事情?有人告诉我,有没有访问控制的地方呢。我是从一个本地服务器(本地主机)测试。
Is there a way around this? Are their certain things I need to do to set this up? I've been told that there are no access controls in place yet. I'm testing from a local server (localhost).
我下面这个教程:
的http://openlandscape.net/2009/09/25/call-soap-xm-web-services-with-jquery-ajax/
推荐答案
您似乎违反同一产地政策限制。您不能发送AJAX请求到不同的领域。
You seem to be violating the same origin policy restriction. You cannot send AJAX requests to different domains.
这篇关于jQuery的/ AJAX / SOAP - 访问控制 - 允许原产地的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!