[Laszlo-checkins] r14138 - in openlaszlo/trunk: lps/components/rpc/library test/rpc/soap

hqm@openlaszlo.org hqm at openlaszlo.org
Mon Jun 15 06:46:18 PDT 2009


Author: hqm
Date: 2009-06-15 06:46:14 -0700 (Mon, 15 Jun 2009)
New Revision: 14138

Modified:
   openlaszlo/trunk/lps/components/rpc/library/rpc.js
   openlaszlo/trunk/test/rpc/soap/dotnet-math.lzx
   openlaszlo/trunk/test/rpc/soap/two-soap-objects.lzx
Log:
Change 20090615-hqm-N by hqm at badtzmaru.home on 2009-06-15 09:44:00 EDT
    in /Users/hqm/openlaszlo/trunk6
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: allow user to set timeout in rpc library

New Features:

Bugs Fixed: LPP-8261

Technical Reviewer: keiji
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
    
+ add a timeout property and setter to the LzRpc class 

Tests:

verify that timeout is set in request in dotnet-math test




Modified: openlaszlo/trunk/lps/components/rpc/library/rpc.js
===================================================================
--- openlaszlo/trunk/lps/components/rpc/library/rpc.js	2009-06-15 10:30:13 UTC (rev 14137)
+++ openlaszlo/trunk/lps/components/rpc/library/rpc.js	2009-06-15 13:46:14 UTC (rev 14138)
@@ -98,6 +98,16 @@
 }
 
 
+/**
+   timeout of requests, in millseconds
+*/
+
+var timeout:Number = canvas.dataloadtimeout;
+
+function setTimeout (msec) {
+    this.timeout = msec;
+}
+
 function handleJSONRPCresponse (dreq:LzRPCDataRequest) {
     var data = JSON.parse(dreq.rawdata);
     var delegate = null;
@@ -352,6 +362,7 @@
 
     dreq.proxyurl = canvas.getProxyURL();
 
+    dreq.timeout = this.timeout;
     dreq.queuerequests      = true;
     dreq.getresponseheaders = true;
     dreq.secureport = secureport;

Modified: openlaszlo/trunk/test/rpc/soap/dotnet-math.lzx
===================================================================
--- openlaszlo/trunk/test/rpc/soap/dotnet-math.lzx	2009-06-15 10:30:13 UTC (rev 14137)
+++ openlaszlo/trunk/test/rpc/soap/dotnet-math.lzx	2009-06-15 13:46:14 UTC (rev 14138)
@@ -20,6 +20,10 @@
     <soap name="maths" 
           wsdl="http://www.dotnetjunkies.com/quickstart/aspplus/samples/services/mathservice/cs/mathservice.asmx?WSDL">
 
+      <handler name="oninit">
+        LzSOAPService.setTimeout(60000);
+      </handler>
+
         <attribute name="loaded" type="boolean" value="false" />
 
         <!-- Method to make a document for SOAP message requests -->
@@ -80,6 +84,6 @@
 
 </canvas>
 <!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2004, 2008 Laszlo Systems, Inc.  All Rights Reserved.              *
+* Copyright 2001-2004, 2008, 2009 Laszlo Systems, Inc.  All Rights Reserved.              *
 * Use is subject to license terms.                                            *
 * X_LZ_COPYRIGHT_END ****************************************************** -->

Modified: openlaszlo/trunk/test/rpc/soap/two-soap-objects.lzx
===================================================================
--- openlaszlo/trunk/test/rpc/soap/two-soap-objects.lzx	2009-06-15 10:30:13 UTC (rev 14137)
+++ openlaszlo/trunk/test/rpc/soap/two-soap-objects.lzx	2009-06-15 13:46:14 UTC (rev 14138)
@@ -7,6 +7,14 @@
 
     <soap name="amazon" wsdl="http://soap.amazon.com/schemas3/AmazonWebServices.wsdl">
 
+      <handler name="oninit">
+        LzSOAPService.setTimeout(60000);
+      </handler>
+
+
+
+
+
         <attribute name="myobject1" value="null" type="expression" />
         <attribute name="isloaded" value="false" />
 
@@ -112,6 +120,6 @@
 
 </canvas>
 <!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.              *
+* Copyright 2001-2009 Laszlo Systems, Inc.  All Rights Reserved.              *
 * Use is subject to license terms.                                            *
 * X_LZ_COPYRIGHT_END ****************************************************** -->



More information about the Laszlo-checkins mailing list