You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by mm...@apache.org on 2006/12/01 08:39:32 UTC
svn commit: r481176 - in /incubator/cxf/trunk: ./
distribution/src/main/release/samples/js_provider/
distribution/src/main/release/samples/js_provider/src/demo/hwDispatch/client/
rt/frontend/js/ rt/frontend/js/src/main/java/org/apache/cxf/js/rhino/ sys...
Author: mmao
Date: Thu Nov 30 23:39:31 2006
New Revision: 481176
URL: http://svn.apache.org/viewvc?view=rev&rev=481176
Log:
Fixed the JS demo (contributed by Steve Vinoski)
* Add the Apache license header again
* Remove the comments in xmlbeans object.
* Update the README
* Upgrade the rhino version to 1.6R5
* Upgrade the xmlbeans version to 2.2.0
* Move the rhino and xmlbeans version to top level pom
Modified:
incubator/cxf/trunk/distribution/src/main/release/samples/js_provider/README.txt
incubator/cxf/trunk/distribution/src/main/release/samples/js_provider/src/demo/hwDispatch/client/GreetMeDocLiteralReq1.xml
incubator/cxf/trunk/distribution/src/main/release/samples/js_provider/src/demo/hwDispatch/client/GreetMeDocLiteralReq3.xml
incubator/cxf/trunk/pom.xml
incubator/cxf/trunk/rt/frontend/js/pom.xml
incubator/cxf/trunk/rt/frontend/js/src/main/java/org/apache/cxf/js/rhino/AbstractDOMProvider.java
incubator/cxf/trunk/systests/pom.xml
Modified: incubator/cxf/trunk/distribution/src/main/release/samples/js_provider/README.txt
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/js_provider/README.txt?view=diff&rev=481176&r1=481175&r2=481176
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/js_provider/README.txt (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/js_provider/README.txt Thu Nov 30 23:39:31 2006
@@ -27,9 +27,9 @@
javac, and java to build and run the demos, you must set the
environment.
-You also need to download js-1.6R2.jar from
-(http://repo1.maven.org/maven2/rhino/js/1.6R2/) and xbean-2.1.0.jar
-from (http://repo1.maven.org/maven2/xmlbeans/xbean/2.1.0/) and place
+You also need to download js-1.6R5.jar from
+(http://repo1.maven.org/maven2/rhino/js/1.6R5/) and xbean-2.2.0.jar
+from (http://repo1.maven.org/maven2/xmlbeans/xbean/2.2.0/) and place
these two jars under CXF_HOME/lib directory.
@@ -76,13 +76,13 @@
For UNIX:
export CLASSPATH=$CLASSPATH:$CXF_HOME/lib/cxf-incubator.jar:
- $CXF_HOME/lib/js-1.6R2.jar:$CXF_HOME/lib/xbean-2.1.0.jar:
+ $CXF_HOME/lib/js-1.6R5.jar:$CXF_HOME/lib/xbean-2.2.0.jar:
build/classes
javac -d build/classes src/demo/hwDispatch/client/*.java
For Windows:
set CLASSPATH=%CLASSPATH%;%CXF_HOME%\lib\cxf-incubator.jar;
- %CXF_HOME%\lib\js-1.6R2.jar;%CXF_HOME%\lib\xbean-2.1.0.jar;
+ %CXF_HOME%\lib\js-1.6R5.jar;%CXF_HOME%\lib\xbean-2.2.0.jar;
build\classes
javac -d build\classes src\demo\hwDispatch\client\*.java
Modified: incubator/cxf/trunk/distribution/src/main/release/samples/js_provider/src/demo/hwDispatch/client/GreetMeDocLiteralReq1.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/js_provider/src/demo/hwDispatch/client/GreetMeDocLiteralReq1.xml?view=diff&rev=481176&r1=481175&r2=481176
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/js_provider/src/demo/hwDispatch/client/GreetMeDocLiteralReq1.xml (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/js_provider/src/demo/hwDispatch/client/GreetMeDocLiteralReq1.xml Thu Nov 30 23:39:31 2006
@@ -1 +1,20 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Body><ns4:greetMe xmlns:ns4="http://apache.org/hello_world_soap_http/types"><ns4:requestType>Gil</ns4:requestType></ns4:greetMe></SOAP-ENV:Body></SOAP-ENV:Envelope>
Modified: incubator/cxf/trunk/distribution/src/main/release/samples/js_provider/src/demo/hwDispatch/client/GreetMeDocLiteralReq3.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/js_provider/src/demo/hwDispatch/client/GreetMeDocLiteralReq3.xml?view=diff&rev=481176&r1=481175&r2=481176
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/js_provider/src/demo/hwDispatch/client/GreetMeDocLiteralReq3.xml (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/js_provider/src/demo/hwDispatch/client/GreetMeDocLiteralReq3.xml Thu Nov 30 23:39:31 2006
@@ -1 +1,20 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Body><ns4:greetMe xmlns:ns4="http://apache.org/hello_world_soap_http/types"><ns4:requestType>Heron</ns4:requestType></ns4:greetMe></SOAP-ENV:Body></SOAP-ENV:Envelope>
Modified: incubator/cxf/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/pom.xml?view=diff&rev=481176&r1=481175&r2=481176
==============================================================================
--- incubator/cxf/trunk/pom.xml (original)
+++ incubator/cxf/trunk/pom.xml Thu Nov 30 23:39:31 2006
@@ -154,6 +154,8 @@
<derby.version>10.1.1.0</derby.version>
<activemq.version>4.0.2</activemq.version>
<geronimo.version>1.0.1</geronimo.version>
+ <rhino.version>1.6R5</rhino.version>
+ <xmlbeans.version>2.2.0</xmlbeans.version>
<eclipse.workspace.dir>${basedir}/${topDirectoryLocation}/../workspace</eclipse.workspace.dir>
@@ -632,6 +634,16 @@
<artifactId>activemq-core</artifactId>
<version>${activemq.version}</version>
</dependency>
+ <dependency>
+ <groupId>rhino</groupId>
+ <artifactId>js</artifactId>
+ <version>${rhino.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>xmlbeans</groupId>
+ <artifactId>xbean</artifactId>
+ <version>${xmlbeans.version}</version>
+ </dependency>
</dependencies>
</dependencyManagement>
Modified: incubator/cxf/trunk/rt/frontend/js/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/js/pom.xml?view=diff&rev=481176&r1=481175&r2=481176
==============================================================================
--- incubator/cxf/trunk/rt/frontend/js/pom.xml (original)
+++ incubator/cxf/trunk/rt/frontend/js/pom.xml Thu Nov 30 23:39:31 2006
@@ -39,13 +39,11 @@
<dependency>
<groupId>rhino</groupId>
<artifactId>js</artifactId>
- <version>1.6R2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>xmlbeans</groupId>
<artifactId>xbean</artifactId>
- <version>2.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
Modified: incubator/cxf/trunk/rt/frontend/js/src/main/java/org/apache/cxf/js/rhino/AbstractDOMProvider.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/js/src/main/java/org/apache/cxf/js/rhino/AbstractDOMProvider.java?view=diff&rev=481176&r1=481175&r2=481176
==============================================================================
--- incubator/cxf/trunk/rt/frontend/js/src/main/java/org/apache/cxf/js/rhino/AbstractDOMProvider.java (original)
+++ incubator/cxf/trunk/rt/frontend/js/src/main/java/org/apache/cxf/js/rhino/AbstractDOMProvider.java Thu Nov 30 23:39:31 2006
@@ -32,6 +32,7 @@
import org.w3c.dom.Node;
+import org.apache.xmlbeans.XmlCursor;
import org.apache.xmlbeans.XmlObject;
import org.mozilla.javascript.Context;
@@ -160,7 +161,16 @@
Object inDoc = null;
if (isE4X) {
try {
- Object xo = XmlObject.Factory.parse(node);
+ XmlObject xo = XmlObject.Factory.parse(node);
+ XmlCursor cursor = xo.newCursor();
+ // strip comments out, as xmlbeans doesn't
+ // seem to like them
+ do {
+ if (cursor.isComment()) {
+ cursor.removeXml();
+ }
+ } while (cursor.toNextToken() != XmlCursor.TokenType.NONE);
+ cursor.dispose();
inDoc = Context.toObject(xo, scope);
Object[] args = {inDoc};
inDoc = cx.newObject(scriptScope, "XML", args);
Modified: incubator/cxf/trunk/systests/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/pom.xml?view=diff&rev=481176&r1=481175&r2=481176
==============================================================================
--- incubator/cxf/trunk/systests/pom.xml (original)
+++ incubator/cxf/trunk/systests/pom.xml Thu Nov 30 23:39:31 2006
@@ -186,13 +186,11 @@
<dependency>
<groupId>rhino</groupId>
<artifactId>js</artifactId>
- <version>1.6R2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>xmlbeans</groupId>
<artifactId>xbean</artifactId>
- <version>2.1.0</version>
<scope>provided</scope>
</dependency>