Calling a web service from http to https

2019-08-11 23:52发布

Here is my scenario...

I'm working on a server that is http:// in Classic ASP

The company purchased a web service that verifies information, this web service is https://xxx.svc?etc

What can I do to call this service? I've tried AJAX with jQuery, I've tried XmlHTTPRequest and XDR, and I'm just about out of ideas. I'm running into the same error every time.."Access Denied" when I call "open" on my object. I've heard a few things about Same Domain policies and Cross Site Scripting, but it's 2012 now. Is there any way to accomplish this?

标签: asp-classic
2条回答
劳资没心,怎么记你
2楼-- · 2019-08-12 00:48

2 suggestions...

Have you looked at JSONP: http://en.wikipedia.org/wiki/JSONP

Or you could call the service on the server side…

查看更多
欢心
3楼-- · 2019-08-12 00:55

You are running into cross domain issues.

Setup a server side page that communicates with the webservice through the ServerXMLHttp object. Read more about this here.

You could then process the request server side or make use of JavaScript to make an AJAX request to your server side page. Since it will be on the same domain, you will not run into cross domain issues.

查看更多
登录 后发表回答