November 14, 2001 - Assigning A Friendly Name to A Web Service URL
![]() |
November 14, 2001 Assigning A Friendly Name to A Web Service URL Tips: November 2001
Yehuda Shiran, Ph.D.
|
http://soap.bluestone.com:80/interop/EchoService/EchoService.wsdl
It is quite cumbersome to use this URL every time you need to reference the Web service. The useService() method establishes a friendly name for a Web service URL, which can be referenced later from within the code. Here is the formal syntax:
sElementID.useService(sWebServiceURL, sFriendlyName [, oUseOptions])
where:
sElementID is the ID of the element to which the WebService behavior is attached. This parameter is required.
sWebServiceURL is the WebService URL. This parameter is required. The path can be of four different types:
.asmx file extension. This short form of the URL is sufficient, provided that the Web service is located in the same folder as the Web page using the WebService behavior. In this case, the ?WSDL query string is assumed by the behavior.
.wsdl file extension.
.asmx) or WSDL (.wsdl) file. A file path to a Web Service must include the ?WSDL query string. Either a local file path or a URL can be specified.
.asmx) or WSDL (.wsdl) file. A file path to a Web service must include the ?WSDL query string.
sFriendlyName is a string representing a friendly name for the Web service URL. This parameter is required.
oUseOptions is an instance of the useOptions object. It has a single property, reuseConnection, that specifies the persistence of the connection information required by Web services that use Secure Sockets Layer (SSL) authentication.


Find a programming school near you