November 16, 2001 - Loading the Web Service First
November 16, 2001 Loading the Web Service First Tips: November 2001
Yehuda Shiran, Ph.D.
|
useService
method works correctly, you should place it inside an event handling function for the onload
event. In this way, you will ensure that the first attempt to call a method in the behavior occurs only after the page has been downloaded and parsed. The event handling function may define friendly names for one or more Web Services. Here is an example:
<BODY ID="webServiceCallerBody" onload="loadService()" style="behavior:url(webservice.htc)">
<SCRIPT LANGUAGE="JavaScript">
<!--
function loadService() {
webServiceCallerBody.useService(
"https://soap.bluestone.com:80/interop/EchoService/EchoService.wsdl","echo");
webServiceCallerBody.useService(
"/services/math.asmx?WSDL", "MyMath");
}
// -->
</SCRIPT>