Author: dkulp
Date: Tue Jul 7 19:31:56 2009
New Revision: 791950
URL: http://svn.apache.org/viewvc?rev=791950&view=rev
Log:
Merged revisions 791538 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r791538 | dkulp | 2009-07-06 12:52:00 -0400 (Mon, 06 Jul 2009) | 5 lines
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/branches/2.2.x-fixes/ (props changed)
cxf/branches/2.2.x-fixes/rt/javascript/pom.xml
cxf/branches/2.2.x-fixes/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptUtils.java
cxf/branches/2.2.x-fixes/rt/javascript/src/test/java/org/apache/cxf/javascript/AnyTest.java
cxf/branches/2.2.x-fixes/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/AnyImpl.java
Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jul 7 19:31:56 2009
@@ -1 +1 @@
-/cxf/trunk:782728-782730,783097,783294,783396,784059,784181-784184,784893,784895,785279-785282,785468,785621,785624,785651,785734,785866,786142,786271-786272,786395,786512,786514,786582-786583,786638,786647,786850,787200,787269,787277-787279,787290-787291,787305,787323,787366,787849,788030,788060,788187,788444,788451,788703,788752,788774,788819-788820,789013,789371,789387,789420,789527-789530,789704-789705,789788,789811,789896-789901,790074,790094,790134,790188,790294,790553,790637-790644,790868,791301,791354
+/cxf/trunk:782728-782730,783097,783294,783396,784059,784181-784184,784893,784895,785279-785282,785468,785621,785624,785651,785734,785866,786142,786271-786272,786395,786512,786514,786582-786583,786638,786647,786850,787200,787269,787277-787279,787290-787291,787305,787323,787366,787849,788030,788060,788187,788444,788451,788703,788752,788774,788819-788820,789013,789371,789387,789420,789527-789530,789704-789705,789788,789811,789896-789901,790074,790094,790134,790188,790294,790553,790637-790644,790868,791301,791354,791538
Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.2.x-fixes/rt/javascript/pom.xml
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/javascript/pom.xml?rev=791950&r1=791949&r2=791950&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/javascript/pom.xml (original)
+++ cxf/branches/2.2.x-fixes/rt/javascript/pom.xml Tue Jul 7 19:31:56 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/branches/2.2.x-fixes/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptUtils.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptUtils.java?rev=791950&r1=791949&r2=791950&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptUtils.java
(original)
+++
cxf/branches/2.2.x-fixes/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptUtils.java
Tue Jul 7 19:31:56 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/branches/2.2.x-fixes/rt/javascript/src/test/java/org/apache/cxf/javascript/AnyTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/javascript/src/test/java/org/apache/cxf/javascript/AnyTest.java?rev=791950&r1=791949&r2=791950&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/rt/javascript/src/test/java/org/apache/cxf/javascript/AnyTest.java
(original)
+++
cxf/branches/2.2.x-fixes/rt/javascript/src/test/java/org/apache/cxf/javascript/AnyTest.java
Tue Jul 7 19:31:56 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/branches/2.2.x-fixes/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/AnyImpl.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/AnyImpl.java?rev=791950&r1=791949&r2=791950&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/AnyImpl.java
(original)
+++
cxf/branches/2.2.x-fixes/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/AnyImpl.java
Tue Jul 7 19:31:56 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;
}
}
}