[Laszlo-checkins] r10684 - in openlaszlo/trunk: WEB-INF/lps/lfc/debugger lps/components/rpc

hqm@openlaszlo.org hqm at openlaszlo.org
Wed Aug 13 14:11:55 PDT 2008


Author: hqm
Date: 2008-08-13 14:11:52 -0700 (Wed, 13 Aug 2008)
New Revision: 10684

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/debugger/swf9stubs.lzs
   openlaszlo/trunk/lps/components/rpc/javarpc.lzx
   openlaszlo/trunk/lps/components/rpc/rpc.lzx
Log:
Change 20080813-hqm-X by hqm at badtzmaru on 2008-08-13 16:15:03 EDT
    in /Users/hqm/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary:  fix xmlrpc for swf9

New Features:

Bugs Fixed:

Technical Reviewer: pbr
QA Reviewer: ghost
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:

The Java RPC library automatically defines client-side function stubs based on info
from the server. But the XMLRPC library does not do that. Somehow I had moved the
code for initializing a javarpc object into the base rpc class. This change moves
that setup code into the javarpc.lzx file.

Tests:

test/rpc/xmlrpc/serverenv.lzx  swf9
should get no compiler errors

test/rpc/javarpc/serverenv.lzx swf9



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/debugger/swf9stubs.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/debugger/swf9stubs.lzs	2008-08-13 21:07:22 UTC (rev 10683)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/debugger/swf9stubs.lzs	2008-08-13 21:11:52 UTC (rev 10684)
@@ -16,6 +16,9 @@
       trace(str);
       LFCApplication.write(str);
     }
+    public function inspect(...args):void {
+      this.write('INSPECT: ' + this.formatToString.apply(this, args));
+    }
     public function info(...args):void {
       this.write('INFO: ' + this.formatToString.apply(this, args));
     }

Modified: openlaszlo/trunk/lps/components/rpc/javarpc.lzx
===================================================================
--- openlaszlo/trunk/lps/components/rpc/javarpc.lzx	2008-08-13 21:07:22 UTC (rev 10683)
+++ openlaszlo/trunk/lps/components/rpc/javarpc.lzx	2008-08-13 21:11:52 UTC (rev 10684)
@@ -148,6 +148,38 @@
         ]]>
         </method>
 
+
+       <method name="makeProxyStubFunction" args="fn">
+        <![CDATA[                                                
+                var stubinfo = this.proxyinfo[fn];
+                //classname: 'org.openlaszlo.test.xmlrpc.SystemProp' 
+                //methodname: 'org.openlaszlo.test.xmlrpc.SystemProp.getProperties' 
+                //op: 'invoke'
+
+                var CLASSNAME = stubinfo['classname'];
+                var METHODNAME = stubinfo['methodname'];
+
+                var DOREQ = stubinfo['doreq'] ? stubinfo['doreq'] : false;
+                var DORES = stubinfo['dores'] ? stubinfo['dores'] : false;
+                var stubfunc = function (){
+                   var args = arguments.callee.args;
+                   return LzJavaRPCService.invoke(
+                       arguments[1], 
+                       arguments[0],
+                        {op: 'invoke', 
+                                objectreturntype: args.objectreturntype,
+                                oname: args.attributename, 
+                                scope: args.scope ,
+                                classname: CLASSNAME,
+                                methodname: METHODNAME,
+                                doreq: DOREQ,
+                                dores: DORES}, args.secure, args.secureport);
+                 }
+
+                return stubfunc;
+       ]]>                                                
+       </method>
+
         <!--- @keywords private -->
         <method name="_setup" args="o">
             var ok = super._setup(o);

Modified: openlaszlo/trunk/lps/components/rpc/rpc.lzx
===================================================================
--- openlaszlo/trunk/lps/components/rpc/rpc.lzx	2008-08-13 21:07:22 UTC (rev 10683)
+++ openlaszlo/trunk/lps/components/rpc/rpc.lzx	2008-08-13 21:11:52 UTC (rev 10684)
@@ -185,36 +185,14 @@
         ]]>
         </method>
 
+
        <method name="makeProxyStubFunction" args="fn">
         <![CDATA[                                                
-                var stubinfo = this.proxyinfo[fn];
-                //classname: 'org.openlaszlo.test.xmlrpc.SystemProp' 
-                //methodname: 'org.openlaszlo.test.xmlrpc.SystemProp.getProperties' 
-                //op: 'invoke'
-
-                var CLASSNAME = stubinfo['classname'];
-                var METHODNAME = stubinfo['methodname'];
-
-                var DOREQ = stubinfo['doreq'] ? stubinfo['doreq'] : false;
-                var DORES = stubinfo['dores'] ? stubinfo['dores'] : false;
-                var stubfunc = function (){
-                   var args = arguments.callee.args;
-                   return LzJavaRPCService.invoke(
-                       arguments[1], 
-                       arguments[0],
-                        {op: 'invoke', 
-                                objectreturntype: args.objectreturntype,
-                                oname: args.attributename, 
-                                scope: args.scope ,
-                                classname: CLASSNAME,
-                                methodname: METHODNAME,
-                                doreq: DOREQ,
-                                dores: DORES}, args.secure, args.secureport);
-                 }
-
-                return stubfunc;
+                 return function(...ignore) { Debug.write('base rpc does not automatically define proxy stubs'); };
        ]]>                                                
        </method>
+
+
         <doc>
             <tag name="shortdesc"><text>remote procedure call</text></tag>
             <text>



More information about the Laszlo-checkins mailing list