cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r597688 - in /incubator/cxf/trunk/rt/javascript/src: main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java test/java/org/apache/cxf/javascript/DocLitWrappedClientTest.java test/resources/logging.properties
Date Fri, 23 Nov 2007 15:36:23 GMT
Author: bimargulies
Date: Fri Nov 23 07:36:22 2007
New Revision: 597688

URL: http://svn.apache.org/viewvc?rev=597688&view=rev
Log:
Successfully execute one call of a doc lit wrapped service over soap 1.1.

Modified:
    incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java
    incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/DocLitWrappedClientTest.java
    incubator/cxf/trunk/rt/javascript/src/test/resources/logging.properties

Modified: incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java?rev=597688&r1=597687&r2=597688&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java
(original)
+++ incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java
Fri Nov 23 07:36:22 2007
@@ -240,12 +240,13 @@
         // functions.
         utils.appendLine("this._onsuccess = successCallback;");
         utils.appendLine("this._onerror = errorCallback;");
-        utils.appendLine("this.client.onsuccess = this." 
+        utils.appendLine("var closureThis = this;");
+        utils.appendLine("this.client.onsuccess = function(that) { closureThis." 
                          + opFunctionPropertyName
-                         + "_onsuccess");
-        utils.appendLine("this.client.onerror = this."
+                         + "_onsuccess(that); };");
+        utils.appendLine("this.client.onerror = function(that) { closureThis."
                          + opFunctionPropertyName
-                         + "_error");
+                         + "_onerror(that); };");
 
         utils.appendLine("var requestHeaders = [];");
 
@@ -292,7 +293,9 @@
         String successFunctionGlobalName = opFunctionGlobalName + "_onsuccess"; 
         String successFunctionPropertyName = opFunctionPropertyName + "_onsuccess"; 
         code.append("function " + successFunctionGlobalName + "(responseXml) {\n");
-        utils.startIf("_onsuccess");
+        utils.appendLine("this.jsutils.trace('" + successFunctionGlobalName + " _onsuccess:
' " 
+                         + " + this._onsuccess);");
+        utils.startIf("this._onsuccess");
         utils.appendLine("var responseObject = null;");
         if (outputMessage != null) {
             if (soapBindingInfo != null) { // soap
@@ -308,6 +311,7 @@
             }
 
             String deserializerFunctionName = outputDeserializerFunctionName(outputMessage);
+            utils.appendLine("this.jsutils.trace('calling " + deserializerFunctionName +
"');");
             utils.appendLine("responseObject = " + deserializerFunctionName + "(this.jsutils,
element);");
         }
         utils.appendLine("this._onsuccess(responseObject);");

Modified: incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/DocLitWrappedClientTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/DocLitWrappedClientTest.java?rev=597688&r1=597687&r2=597688&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/DocLitWrappedClientTest.java
(original)
+++ incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/DocLitWrappedClientTest.java
Fri Nov 23 07:36:22 2007
@@ -38,7 +38,6 @@
 import org.mozilla.javascript.Context;
 import org.springframework.context.support.GenericApplicationContext;
 
-@org.junit.Ignore
 public class DocLitWrappedClientTest extends AbstractCXFSpringTest {
     
     private static final Logger LOG = LogUtils.getL7dLogger(DocLitWrappedClientTest.class);

Modified: incubator/cxf/trunk/rt/javascript/src/test/resources/logging.properties
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/test/resources/logging.properties?rev=597688&r1=597687&r2=597688&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/javascript/src/test/resources/logging.properties (original)
+++ incubator/cxf/trunk/rt/javascript/src/test/resources/logging.properties Fri Nov 23 07:36:22
2007
@@ -23,6 +23,5 @@
 .level= WARNING
 java.util.logging.ConsoleHandler.level = FINE
 java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
-org.apache.cxf.javascript.level=INFO
 #org.apache.cxf.javascript.service.ServiceJavascriptBuilder.level=FINE
-org.apache.cxf.javascript.JavascriptTestUtilities.level=FINE
+#org.apache.cxf.javascript.JavascriptTestUtilities.level=FINE



Mime
View raw message