April 6, 2002 - Partitioning your Multiple Web Service Code
![]() |
April 6, 2002 Partitioning your Multiple Web Service Code Tips: April 2002
Yehuda Shiran, Ph.D.
|
init() function assigns a short name to the Web service URL
The init() function can be shared among Web services. It is invoked upon loading of the page, onload=init(). We call the behavior's useService() method to assign short identifiers to the Web service's rather-long URL. We call the Add Web service by simpleCalcWebService and the isPrime Web service by isPrimeNumberWebService:
function init() {
myWebService.useService("
http://www.dev1.eraserver.net/D2S/WebServiceSample/isPrime.asmx?WSDL",
"isPrimeNumberWebService");
myWebService.useService("http://63.210.240.215/d2s/20011205/add.asmx?WSDL",
"simpleCalcWebService");
}
These Web service examples work properly in Internet Explorer 5.5 or later browsers. If you are using Internet Explorer 5.5+ and receiving errors with the examples, you need to enable the access data sources across domains option. See Column 105 for details.To learn more on consuming multiple Web services, go to Column 106, Web services Part XI: Consuming Multiple Web Services.


Find a programming school near you