spacer
Yehuda Shiran December 10, 2001
Restrictions in Calling Web Services
Tips: December 2001

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?

You have probably noticed that there are restrictions in calling Web services. Try copying example.html and webservice.htc to your client machine. You can call the EchoService Web service on (soap.bluestone.com), by clicking one of the two buttons. It works fine.

Now try loading example.html from our server (www.webreference.com) directly to your Web browser. Click on the first button to call the EchoService Web service on (soap.bluestone.com). You will get a script error. It's a result of the fact that the WebService behavior will not work when the page resides on a server (www.webreference.com) and is downloaded to a client machine (your machine), where the page tries to call a service residing on a server in a different domain (soap.bluestone.com) than the first server. This scenario is represented by the diagram below (from Microsoft):

This result is a consequence of the cross-domain restriction built into the browser.


People who read this tip also read these tips:

Look for similar tips by subject:

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Rolling Out Your Own HTML Application Version Control · HTML 5: Client-side Storage · Working with Ajax Server Extensions
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Wi-Fi Product Watch, November 2009 · Chip Market Recovering From '08 Collapse · Low-Cost Tools to Kickstart Your New Business