cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r791538 - in /cxf/trunk/rt/javascript: pom.xml src/main/java/org/apache/cxf/javascript/JavascriptUtils.java src/test/java/org/apache/cxf/javascript/AnyTest.java src/test/java/org/apache/cxf/javascript/fortest/AnyImpl.java
Date Mon, 06 Jul 2009 16:52:00 GMT
Author: dkulp
Date: Mon Jul  6 16:52:00 2009
New Revision: 791538

URL: http://svn.apache.org/viewvc?rev=791538&view=rev
Log:
Update javascript stuff to run with java6.
1)  Add a timeout so if something goes wrong, exception is thrown, not a
hang
2) Use specific (working) version of Xerces and not the broken junk in
the JDK for the validation.

Modified:
    cxf/trunk/rt/javascript/pom.xml
    cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptUtils.java
    cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/AnyTest.java
    cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/AnyImpl.java

Modified: cxf/trunk/rt/javascript/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/pom.xml?rev=791538&r1=791537&r2=791538&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/pom.xml (original)
+++ cxf/trunk/rt/javascript/pom.xml Mon Jul  6 16:52:00 2009
@@ -37,12 +37,6 @@
 
         <dependency>
             <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-databinding-aegis</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-transports-local</artifactId>
             <version>${project.version}</version>            
         </dependency>
@@ -81,6 +75,18 @@
             <scope>test</scope>
         </dependency>
         <dependency>
+            <groupId>xerces</groupId>
+            <artifactId>xercesImpl</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-databinding-aegis</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
            <groupId>rhino</groupId>
            <artifactId>js</artifactId>
            <version>${rhino.version}</version>

Modified: cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptUtils.java?rev=791538&r1=791537&r2=791538&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptUtils.java (original)
+++ cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptUtils.java Mon
Jul  6 16:52:00 2009
@@ -29,7 +29,6 @@
 
 import org.w3c.dom.Attr;
 
-import org.apache.cxf.aegis.type.mtom.AbstractXOPType;
 import org.apache.cxf.common.WSDLConstants;
 import org.apache.cxf.common.xmlschema.SchemaCollection;
 import org.apache.cxf.common.xmlschema.XmlSchemaConstants;
@@ -253,7 +252,7 @@
             // We could do something much more complex in terms of evaluating whether the
type
             // permits the contentType attribute. This, however, is enough to clue us in
for what Aegis
             // does.
-            if (AbstractXOPType.XML_MIME_BASE64.equals(typeName)) {
+            if (new QName("http://www.w3.org/2005/05/xmlmime", "base64Binary").equals(typeName))
{
                 return true;
             }
             

Modified: cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/AnyTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/AnyTest.java?rev=791538&r1=791537&r2=791538&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/AnyTest.java (original)
+++ cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/AnyTest.java Mon Jul 
6 16:52:00 2009
@@ -27,6 +27,7 @@
 import org.apache.cxf.javascript.JavascriptTestUtilities.JSRunnable;
 import org.apache.cxf.javascript.JavascriptTestUtilities.Notifier;
 import org.apache.cxf.javascript.fortest.AnyImpl;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.mozilla.javascript.Context;
@@ -65,7 +66,8 @@
         implementor = (AnyImpl)rawImplementor;
         implementor.reset();
     }
-    
+
+  
     private Void acceptOneChalk(Context context) {
         LOG.info("About to call accept1 with Chalk" + getAddress());
         implementor.prepareToWaitForOneWay();
@@ -136,7 +138,6 @@
         assertEquals("after chalk", implementor.getAfter());
         return null;
     }
-    
     @Test
     public void callAcceptNRaw() {
         testUtilities.runInsideContext(Void.class, new JSRunnable<Void>() {
@@ -164,6 +165,7 @@
         return null;
     }
     
+    
     @Test
     public void callReturnAny1() throws Exception {
         testUtilities.runInsideContext(Void.class, new JSRunnable<Void>() {
@@ -172,6 +174,7 @@
             }
         });
     }
+    
 
 
 

Modified: cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/AnyImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/AnyImpl.java?rev=791538&r1=791537&r2=791538&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/AnyImpl.java (original)
+++ cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/AnyImpl.java Mon
Jul  6 16:52:00 2009
@@ -21,6 +21,7 @@
 
 import java.util.Arrays;
 import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
 
 import uri.cxf_apache_org.jstest.any.AcceptAny;
 import uri.cxf_apache_org.jstest.types.any.AcceptAny1;
@@ -189,10 +190,13 @@
             return;
         }
         try {
-            onewayNotify.await();
-            onewayNotify = null;
+            if (!onewayNotify.await(5000, TimeUnit.MILLISECONDS)) {
+                throw new RuntimeException("Did not get the oneway!");
+            }
         } catch (InterruptedException e) {
             //
+        } finally {
+            onewayNotify = null;            
         }
     }
 }



Mime
View raw message