|
The WebService behavior supports four methods:
crateUseOptions()
createCallOptions()
callService()
useService()
The first two methods create objects, while the latter two consumes these objects and pass them to the WebService behavior. The createUseOptions() method creates a useOptions object, which tells the WebService behavior whether to persist the connection authentication data for each remote method invocation. Here is the syntax:
objReuseConn = sElementID.createUseOptions
([boolReuseConn])
where:
sElementID is the ID of the element to which the WebService behavior is attached.
boolReuseConn is an optional Boolean, specifying whether the Secure Sockets Layer (SSL) authentication data is preserved for each remote method invocation.
The objReuseConn object is of type useOptions. The useOptions object has a single property, reuseConnection. This parameter can be either true when the connection authentication persists, or false when it does not persist. When the authentication persists, the user is not prompted again for the username and password before a repetitive transaction with a Web site that requires SSL.
Here is an example for enabling the authentication persistency by explicitly setting the reuseConnection property:
<SCRIPT LANGUAGE="JavaScript">
function init()
{
var options = service.createUseOptions();
options.reuseConnection = true;
oProxy.useService(wsdl, aService, options);
}
</SCRIPT>
<BODY onload="init()">
<DIV ID="service" STYLE="behavior:url(webservice.htc)">
</DIV>
</BODY>
In the following example, the reuseConnection property is set to true by passing a Boolean parameter to the createUseOptions method:
<SCRIPT LANGUAGE="JavaScript">
function init()
{
var options = service.createUseOptions(true);
oProxy.useService(wsdl, aService, options);
}
</SCRIPT>
<BODY onload="init()">
<DIV ID="service" STYLE="behavior:url(webservice.htc)">
</DIV>
</BODY>
|