简体   繁体   English

通过JavaScript调用网络服务

[英]Call webservice through JavaScript

I am calling websevice through javascript by using SOAPClient and its working in Internet Explorer But not working in Firefox. 我正在通过使用SOAPClient及其在Internet Explorer中运行的javascript通过JavaScript调用websevice,但在Firefox中却无法运行。

Actually Its working in firefox also when a webservice within same folder or same project. 实际上,当同一文件夹或同一项目中的Web服务时,它也可以在firefox中工作。

But it not working in firefox if the webservice is not within same project. 但是,如果Web服务不在同一项目中,则它在Firefox中不起作用。

For Internet Explorer it works in both the cases. 对于Internet Explorer,在两种情况下都可以使用。

可能是跨站点HTTP请求问题?

i've also found that if you're using a .net webservice and it's running on the test/debug server instead of the real iis server, explorer's xmlhttprequest will accept answers, but firefox and safari's won't. 我还发现,如果您使用的是.net Web服务,并且它在测试/调试服务器而不是真正的iis服务器上运行,则Explorer的xmlhttprequest将接受答案,但firefox和safari不会。 (does the port count in the cross-site issue??) (跨站点问题中的端口数吗?)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM