[Laszlo-checkins] r11368 - in openlaszlo/trunk: WEB-INF/lps/server/src/org/openlaszlo/remote/json/soap/encoding lps/components/rpc/library

hqm@openlaszlo.org hqm at openlaszlo.org
Mon Oct 6 19:55:06 PDT 2008


Author: hqm
Date: 2008-10-06 19:55:03 -0700 (Mon, 06 Oct 2008)
New Revision: 11368

Modified:
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/remote/json/soap/encoding/JSONArrayDeserializer.java
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/remote/json/soap/encoding/JSONObjectDeserializer.java
   openlaszlo/trunk/lps/components/rpc/library/qname.js
   openlaszlo/trunk/lps/components/rpc/library/soap.js
Log:
Change 20081006-hqm-1 by hqm at badtzmaru.home on 2008-10-06 22:50:10 EDT
    in /Users/hqm/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary:  yet more SOAP update

New Features:

Bugs Fixed:

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

Documentation:

Release Notes:

Details:
    

Tests:

test/rpc/soap/google.lzx 
test/rpc/soap/geography.lzx
soaptest3.lzx
dotnet-math.lzx



Modified: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/remote/json/soap/encoding/JSONArrayDeserializer.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/remote/json/soap/encoding/JSONArrayDeserializer.java	2008-10-07 02:09:11 UTC (rev 11367)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/remote/json/soap/encoding/JSONArrayDeserializer.java	2008-10-07 02:55:03 UTC (rev 11368)
@@ -3,7 +3,7 @@
  * ****************************************************************************/
 
 /* J_LZ_COPYRIGHT_BEGIN *******************************************************
- * Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.              *
+ * Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.              *
  * Use is subject to license terms.                                            *
  * J_LZ_COPYRIGHT_END *********************************************************/
 
@@ -94,7 +94,7 @@
                 StringBuffer body = new StringBuffer();
                 int alen=list.size();
                 int count = 0;
-                body.append("LzSOAPService.__LZarray([");
+                body.append("[");
                 while (count < alen) {
                     body.append((String)(list.get(count)));
                     if (++count < alen) {
@@ -102,7 +102,7 @@
                     }
                 }
 
-                body.append("],"+ScriptCompiler.quote(mItemTag)+")");
+                body.append("]");
                 value = body.toString();
 
                 mLogger.debug("JSONArrayDeserializer valueComplete value.class = "+value.getClass()+" value="+value);

Modified: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/remote/json/soap/encoding/JSONObjectDeserializer.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/remote/json/soap/encoding/JSONObjectDeserializer.java	2008-10-07 02:09:11 UTC (rev 11367)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/remote/json/soap/encoding/JSONObjectDeserializer.java	2008-10-07 02:55:03 UTC (rev 11368)
@@ -186,7 +186,6 @@
                 // push all members
                 Iterator iter = mMembers.entrySet().iterator();
                 String keys = "";
-                body.append("LzSOAPService.__LZnormObj(");
                 body.append("{");
                 int count = 0;
                 while (iter.hasNext()) {
@@ -223,7 +222,7 @@
                 body.append(",");
                 body.append("\"__LZclassname\": ");
                 body.append(ScriptCompiler.quote(mClassName));
-                body.append("})");
+                body.append("}");
 
                 // Call LzSOAPService.__LZnormObj(). This function will set the
                 // object's prototype to one that exists in the namespace and will

Modified: openlaszlo/trunk/lps/components/rpc/library/qname.js
===================================================================
--- openlaszlo/trunk/lps/components/rpc/library/qname.js	2008-10-07 02:09:11 UTC (rev 11367)
+++ openlaszlo/trunk/lps/components/rpc/library/qname.js	2008-10-07 02:55:03 UTC (rev 11368)
@@ -374,7 +374,7 @@
 // @return true if supported, else false.
 //------------------------------------------------------------------------------
 static function isSupported (qn:LzQName) {
-    return (!!LzQName.SUPPORTED_TYPES[qn.toString()]);
+    return (!!QNAME_SUPPORTED_TYPES[qn.toString()]);
 }
 
 }

Modified: openlaszlo/trunk/lps/components/rpc/library/soap.js
===================================================================
--- openlaszlo/trunk/lps/components/rpc/library/soap.js	2008-10-07 02:09:11 UTC (rev 11367)
+++ openlaszlo/trunk/lps/components/rpc/library/soap.js	2008-10-07 02:55:03 UTC (rev 11368)
@@ -69,9 +69,10 @@
     if (service != null && service != "") params['service'] = service;
     if (port != null && port != "") params['port'] = port;
 
+    dreq.opinfo = {opstyle: 'rpc'};
+
     dreq.proxied = true;
     dreq.src = 'soap://soap';
-    dreq.opinfo = {optype: 'LOADOBJECT'};
     return this.request( dreq, delegate, secure, secureport );
 }
 
@@ -360,7 +361,7 @@
 
 override function handleResponse (dreq:LzRPCDataRequest) {
     // The setup of the proxy object comes back as JSON
-    if (dreq.rpcinfo.opinfo && dreq.rpcinfo.opinfo['optype'] =='LOADOBJECT') {
+    if (dreq.rpcinfo.opinfo && dreq.rpcinfo.opinfo['opstyle'] =='rpc') {
         this.handleJSONRPCresponse(dreq);
     } else {
         // the response to a SOAP operation comes back as XML
@@ -430,31 +431,7 @@
 
 }
 
-
 //------------------------------------------------------------------------------
-// Prototype an object based on namespace and classname. If prototype doesn't 
-// exist, we leave the object alone. There's code in the server code under
-// remote.soap.encoding.SWFObjectDeserializer that create SWF bytes that call
-// this function.
-//
-// @param obj: object to correctly prototype.
-// @keywords private
-//------------------------------------------------------------------------------
-function __LZnormObj (obj) {
-    /*
-      var ns = LzNamespace.ns[obj.__LZclassnamespace];
-    var type = ns ? ns[obj.__LZclassname] : null;
-    if (typeof(type) == 'function') {
-        obj.__proto__ = type.prototype;
-    }
-    */
-
-// Debug.write('xxx', obj.__proto__, ',', obj);
-    return obj;
-}
-
-    
-//------------------------------------------------------------------------------
 //The SOAP deserializer on the server will call this to tag arrays with a "item"
 //property, used by LzDataElement.__LZv2E
 //------------------------------------------------------------------------------
@@ -462,8 +439,14 @@
     arr.__LZtag = tag;
     return arr;
 }
+
+
+
 }
 
+
+
+
 // global SOAP service
 var LzSOAPService:LzSOAP = new LzSOAP();
 



More information about the Laszlo-checkins mailing list