调用webservice时出错 [英] Error when calling webservice

查看:140
本文介绍了调用webservice时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在,我想使用来自http://www.webservicex.net/globalweather.asmx的服务来通过javascript获取天气。我试试这段代码:

https://gist.github.com/phuong1492/565be0e13df60d1ecaef

并且出现错误No'Access-Control-Allow-Origin'标题是出现在请求的资源上。因此不允许原点'null'访问。

Now, i want to use service from http://www.webservicex.net/globalweather.asmx to get weather by javascript. I try this code:
https://gist.github.com/phuong1492/565be0e13df60d1ecaef
And have error "No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. "

推荐答案

在这里阅读,



http:// stackoverflow .com / questions / 20035101 / no-access-control-allow-origin-header-is-present-on-the-requested-resource [ ^ ]



http://stackoverflow.com/questions/20433655/no-access-control-allow-origin-header-is-pres请求资源或 [ ^ ]
Read here ,

http://stackoverflow.com/questions/20035101/no-access-control-allow-origin-header-is-present-on-the-requested-resource[^]

http://stackoverflow.com/questions/20433655/no-access-control-allow-origin-header-is-present-on-the-requested-resource-or[^]


这篇关于调用webservice时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆