spacer
Yehuda Shiran November 30, 2001
Sending the Options Object to the Web Service
Tips: November 2001

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Eclipse Helios Update Brings New PHP Tools
Internet Explorer 9 Ups Standards Support
JBoss Portal 5 Release Easier to Use

In order to persist the SSL authentication information, you need to create the useOptions object, and send it as the last (optional) parameter of useService(). Here is an example:

<SCRIPT LANGUAGE="JavaScript">
function init()
{
   var optionsObj = webServiceCallerBody.createUseOptions();
   optionsObj.reuseConnection = true;
   oProxy.useService(wsdl, aService, optionsObj);
}
</SCRIPT>
<BODY onload="init()" ID="webServiceCallerBody" style="behavior:url(webservice.htc)">
</BODY>
Notice the setting of the reuseConnection property to true. You can assign it directly during the object creation, as follows:

<SCRIPT LANGUAGE="JavaScript">
function init()
{
   var optionsObj = webServiceCallerBody.createUseOptions(true);
   oProxy.useService(wsdl, aService, optionsObj);
}
</SCRIPT>
<BODY onload="init()" ID="webServiceCallerBody" STYLE="behavior:url(webservice.htc)">
</BODY>

People who read this tip also read these tips:

Look for similar tips by subject:

webref The latest from WebReference.com Browse >
Flashmaps' DynamicLocator: Interactive Maps for Small Areas · Flashmaps' AreaSelector: Interactive Maps for Wide Areas · The DB Mapper: Interactive Street-level Maps of U.S. and Canada
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
MS Access and MySQL · Cisco AutoQoS: VoIP QoS for Mere Mortals · While VoIP Adoption Explodes in Enterprise, Carrier Spending Lags