You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by bi...@apache.org on 2007/11/19 00:52:29 UTC
svn commit: r596164 - in /incubator/cxf/trunk/rt/javascript/src/test:
java/org/apache/cxf/javascript/ resources/
resources/org/apache/cxf/javascript/
Author: bimargulies
Date: Sun Nov 18 15:52:28 2007
New Revision: 596164
URL: http://svn.apache.org/viewvc?rev=596164&view=rev
Log:
More removal of attempts to do overloading in Javascript.
Modified:
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsHttpRequestTest.java
incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsXMLHttpRequest.java
incubator/cxf/trunk/rt/javascript/src/test/resources/XMLHttpRequestTestBeans.xml
incubator/cxf/trunk/rt/javascript/src/test/resources/org/apache/cxf/javascript/XMLHttpRequestTests.js
Modified: incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsHttpRequestTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsHttpRequestTest.java?rev=596164&r1=596163&r2=596164&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsHttpRequestTest.java (original)
+++ incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsHttpRequestTest.java Sun Nov 18 15:52:28 2007
@@ -122,7 +122,6 @@
assertTrue(httpResponse.contains("\u05e9\u05dc\u05d5\u05dd"));
}
- @org.junit.Ignore
@Test
public void testSyncWebServiceInteraction() throws Exception {
Reader r = getResourceAsReader("/org/apache/cxf/javascript/XML_GreetMeDocLiteralReq.xml");
Modified: incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsXMLHttpRequest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsXMLHttpRequest.java?rev=596164&r1=596163&r2=596164&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsXMLHttpRequest.java (original)
+++ incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsXMLHttpRequest.java Sun Nov 18 15:52:28 2007
@@ -78,6 +78,8 @@
validMethods.add("OPTIONS");
validMethods.add("DELETE");
}
+
+
private static String[] invalidHeaders = {"Accept-Charset", "Accept-Encoding", "Connection",
"Content-Length", "Content-Transfer-Encoding", "Date",
"Expect", "Host", "Keep-Alive", "Referer", "TE", "Trailer",
@@ -576,19 +578,17 @@
return readyState;
}
- public void jsFunction_open(String method, String url) {
- doOpen(method, url, true, null, null);
- }
-
- public void jsFunction_open(String method, String url, boolean async) {
- doOpen(method, url, async, null, null);
- }
-
- public void jsFunction_open(String method, String url, boolean async, String user) {
- doOpen(method, url, async, user, null);
- }
-
- public void jsFunction_open(String method, String url, boolean async, String user, String password) {
+ public void jsFunction_open(String method, String url, Boolean async, String user, String password) {
+ if (async == Context.getUndefinedValue()) {
+ async = Boolean.TRUE;
+ }
+ if (user == Context.getUndefinedValue()) {
+ user = null;
+ }
+ if (password == Context.getUndefinedValue()) {
+ user = null;
+ }
+
doOpen(method, url, async, user, password);
}
@@ -637,3 +637,36 @@
return doGetStatusText();
}
}
+
+// fodder for local transport.
+// return invoke("local://" + service, LocalTransportFactory.TRANSPORT_ID, message);
+//EndpointInfo ei = new EndpointInfo(null, "http://schemas.xmlsoap.org/soap/http");
+//ei.setAddress(address);
+//
+//ConduitInitiatorManager conduitMgr = getBus().getExtension(ConduitInitiatorManager.class);
+//ConduitInitiator conduitInit = conduitMgr.getConduitInitiator(transport);
+//Conduit conduit = conduitInit.getConduit(ei);
+//
+//TestMessageObserver obs = new TestMessageObserver();
+//conduit.setMessageObserver(obs);
+//
+//Message m = new MessageImpl();
+//conduit.prepare(m);
+//
+//OutputStream os = m.getContent(OutputStream.class);
+//InputStream is = getResourceAsStream(message);
+//if (is == null) {
+// throw new RuntimeException("Could not find resource " + message);
+//}
+//
+//IOUtils.copy(is, os);
+//
+//// TODO: shouldn't have to do this. IO caching needs cleaning
+//// up or possibly removal...
+//os.flush();
+//is.close();
+//os.close();
+//
+//byte[] bs = obs.getResponseStream().toByteArray();
+//
+//return bs;
\ No newline at end of file
Modified: incubator/cxf/trunk/rt/javascript/src/test/resources/XMLHttpRequestTestBeans.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/test/resources/XMLHttpRequestTestBeans.xml?rev=596164&r1=596163&r2=596164&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/javascript/src/test/resources/XMLHttpRequestTestBeans.xml (original)
+++ incubator/cxf/trunk/rt/javascript/src/test/resources/XMLHttpRequestTestBeans.xml Sun Nov 18 15:52:28 2007
@@ -40,6 +40,7 @@
<import resource="classpath:META-INF/cxf/cxf-extension-xml.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-local.xml" />
<httpj:engine-factory bus="cxf">
<httpj:engine port="8808">
@@ -63,7 +64,7 @@
<jaxws:endpoint id="greeter-service-endpoint"
implementor="org.apache.hello_world_xml_http.wrapped.GreeterImpl"
- address="http://localhost:8808/Greeter">
+ address="http://localhost:8808/Greeter" >
</jaxws:endpoint>
</beans>
Modified: incubator/cxf/trunk/rt/javascript/src/test/resources/org/apache/cxf/javascript/XMLHttpRequestTests.js
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/test/resources/org/apache/cxf/javascript/XMLHttpRequestTests.js?rev=596164&r1=596163&r2=596164&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/javascript/src/test/resources/org/apache/cxf/javascript/XMLHttpRequestTests.js (original)
+++ incubator/cxf/trunk/rt/javascript/src/test/resources/org/apache/cxf/javascript/XMLHttpRequestTests.js Sun Nov 18 15:52:28 2007
@@ -83,7 +83,7 @@
assertionFailed("state not DONE after sync send.")
}
if(globalState != r.DONE) {
- assertionFailed("global state not DONE after sync send (event handler didn't run?)");
+ assertionFailed("global state not DONE after sync send (event handler didn't run?) :" + globalState);
}
}