Web Services, Part III: WebService's Methods

The createUseOptions() Method

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.

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: