cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r731420 - /cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsHttpRequestTest.java
Date Mon, 05 Jan 2009 02:35:56 GMT
Author: bimargulies
Date: Sun Jan  4 18:35:55 2009
New Revision: 731420

URL: http://svn.apache.org/viewvc?rev=731420&view=rev
Log:
Last particle of Jaxen in the Javascript generator.

Modified:
    cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsHttpRequestTest.java

Modified: cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsHttpRequestTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsHttpRequestTest.java?rev=731420&r1=731419&r2=731420&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsHttpRequestTest.java
(original)
+++ cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsHttpRequestTest.java
Sun Jan  4 18:35:55 2009
@@ -25,14 +25,17 @@
 import java.net.URL;
 import java.util.Properties;
 
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+
 import org.w3c.dom.Document;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.javascript.JavascriptTestUtilities.Notifier;
 import org.apache.cxf.jaxws.EndpointImpl;
 import org.apache.cxf.test.AbstractCXFSpringTest;
-import org.jaxen.XPath;
-import org.jaxen.dom.DOMXPath;
+import org.apache.cxf.test.XPathAssert;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
@@ -123,9 +126,9 @@
                                            testUtilities.javaToJS(xml));
         assertNotNull(xmlResponse);
         Document doc = (Document)xmlResponse.getWrappedNode();
-        XPath echoStringPath = new DOMXPath("//t:responseType/text()");
-        echoStringPath.addNamespace("t", "http://apache.org/hello_world_xml_http/wrapped/types");
-        String nodeText = echoStringPath.stringValueOf(echoStringPath.selectSingleNode(doc));
+        testUtilities.addNamespace("t", "http://apache.org/hello_world_xml_http/wrapped/types");
+        XPath textPath = XPathAssert.createXPath(testUtilities.getNamespaces());
+        String nodeText = (String)textPath.evaluate("//t:responseType/text()", doc, XPathConstants.STRING);
         assertEquals(nodeText, "Hello \u05e9\u05dc\u05d5\u05dd");
     }
     



Mime
View raw message