Export (0) Print
Expand All

createUseOptions Method

This topic documents a feature of Binary Behaviors, which are obsolete as of Internet Explorer 10.

Creates a useOptions object that can be passed as a parameter to the useService method.

Syntax

objOptions = sElementID.createUseOptions( [boolReuseConn])

Parameters

sElementID Required. The id of the element to which the WebService behavior is attached.
boolReuseConn Optional. A Boolean specifying whether the Secure Sockets Layer (SSL) authentication data is preserved for each remote method invocation.

Return Value

A useOptions object.

Remarks

Create a useOptions object when you use Web services that require SSL authentication. The useOptions object has a single Boolean property, reuseConnection, that is used to determine if the connection authentication data is reused for each remote method call.

To preserve the authentication information for each remote method invocation, create a useOptions object and set reuseConnection to true. Then pass the object to the useService method. The following examples illustrate this technique.

Examples

The following sample illustrates how the useOptions object can be created and used with the useService method.


<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>

The following sample illustrates a more concise approach, where 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>

Applies To

WebService

See Also

Community Additions

Show:
© 2015 Microsoft