cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r831581 - in /cxf/trunk/rt/javascript/src: main/resources/org/apache/cxf/javascript/cxf-utils.js test/java/org/apache/cxf/javascript/DocLitWrappedClientTest.java test/resources/DocLitWrappedClientTestBeans.xml
Date Sat, 31 Oct 2009 18:48:48 GMT
Author: bimargulies
Date: Sat Oct 31 18:48:48 2009
New Revision: 831581

URL: http://svn.apache.org/viewvc?rev=831581&view=rev
Log:
CXF-1266. Array parameters of JAX-WS methods are not nillable=true, so stop the Javascript
test case from
trying to send nulls into here. All of this because the original JAXB bug is fixed. Also fix
the content-type
in message from the Javascript code to say 'utf-8'.

Modified:
    cxf/trunk/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
    cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/DocLitWrappedClientTest.java
    cxf/trunk/rt/javascript/src/test/resources/DocLitWrappedClientTestBeans.xml

Modified: cxf/trunk/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js?rev=831581&r1=831580&r2=831581&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js (original)
+++ cxf/trunk/rt/javascript/src/main/resources/org/apache/cxf/javascript/cxf-utils.js Sat
Oct 31 18:48:48 2009
@@ -710,8 +710,9 @@
 		this.req.setRequestHeader("Content-Type", ctHeader);
 
 	} else {
-	// for now, assume SOAP 1.1. 1.2 calls for application/xml. 
-		this.req.setRequestHeader("Content-Type", "text/xml");
+	// for now, assume SOAP 1.1. 1.2 calls for application/xml.
+	// also assume we're talking Unicode here.
+		this.req.setRequestHeader("Content-Type", "text/xml;charset=utf-8");
 	}
 
 	if (headers) { // must be array indexed by header field.

Modified: cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/DocLitWrappedClientTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/DocLitWrappedClientTest.java?rev=831581&r1=831580&r2=831581&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/DocLitWrappedClientTest.java
(original)
+++ cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/DocLitWrappedClientTest.java
Sat Oct 31 18:48:48 2009
@@ -73,7 +73,12 @@
         TestBean1[] beans = new TestBean1[3];
         beans[0] = new TestBean1();
         beans[0].beanTwoNotRequiredItem = new TestBean2("bean2");
-        beans[1] = null;
+        if (useWrapper) {
+            beans[1] = null;
+        } else {
+            // without a wrapper, it can't be null, so put something in there.
+            beans[1] = new TestBean1();
+        }
         beans[2] = new TestBean1();
         beans[2].optionalIntArrayItem = new int[2];
         beans[2].optionalIntArrayItem[0] = 4;
@@ -114,7 +119,6 @@
         return null;
     }
     
-    @org.junit.Ignore // problems with names on auto-generated wrappers!
     @Test
     public void callFunctionWithBeans() {
         LOG.info("about to call test4/beanFunction");
@@ -253,7 +257,7 @@
     public void callTest2WithNullString() {
         testUtilities.runInsideContext(Void.class, new JSRunnable<Void>() {
             public Void run(Context context) {
-                LOG.info("About to call test2 with null string" + getAddress());
+                LOG.info("About to call test2 with null string " + getAddress());
                 Notifier notifier = 
                     testUtilities.rhinoCallConvert("test2", Notifier.class, 
                                                    testUtilities.javaToJS(getAddress()),


Modified: cxf/trunk/rt/javascript/src/test/resources/DocLitWrappedClientTestBeans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/src/test/resources/DocLitWrappedClientTestBeans.xml?rev=831581&r1=831580&r2=831581&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/src/test/resources/DocLitWrappedClientTestBeans.xml (original)
+++ cxf/trunk/rt/javascript/src/test/resources/DocLitWrappedClientTestBeans.xml Sat Oct 31
18:48:48 2009
@@ -20,7 +20,9 @@
 <beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:jaxws="http://cxf.apache.org/jaxws"
+  xmlns:cxf="http://cxf.apache.org/core"
   xsi:schemaLocation="
+           http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
            http://cxf.apache.org/jaxws                                 
               http://cxf.apache.org/schemas/jaxws.xsd
            http://www.springframework.org/schema/beans
@@ -31,6 +33,13 @@
   <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-javascript-client.xml" />
+  <!-- 
+      <cxf:bus>
+        <cxf:features>
+            <cxf:logging/>
+        </cxf:features>
+    </cxf:bus>
+    -->
   
   <jaxws:server id="dlw-service-endpoint" 
     address="http://localhost:8808/SimpleDocLitWrapped" >



Mime
View raw message