November 14, 2001 - Assigning A Friendly Name to A Web Service URL

Yehuda Shiran November 14, 2001
Assigning A Friendly Name to A Web Service URL
Tips: November 2001

Yehuda Shiran, Ph.D.
Doc JavaScript

A Web service is identified by a URL. The following is an example for a valid Web service:
  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:
    • Web service file. It has an
    .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 name. A Web Services Description Language (WSDL) file name. The WSDL file must have a
  • .wsdl file extension.
  • Full file path. Full path to a
  • Web service (.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.
  • Relative path. A relative path to a Web service (
  • .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.