Author: ffang
Date: Fri May 13 08:31:26 2011
New Revision: 1102605
URL: http://svn.apache.org/viewvc?rev=1102605&view=rev
Log:
Merged revisions 1102593 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1102593 | ffang | 2011-05-13 15:51:12 +0800 (δΊ”, 13 5 2011) | 1 line
[CXF-3501]testcase to demonstrate how to pass array by dynamic client
........
Added:
cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ArrayService.java
- copied unchanged from r1102593,
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ArrayService.java
cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ArrayServiceImpl.java
- copied unchanged from r1102593,
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ArrayServiceImpl.java
cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ArrayServiceServer.java
- copied unchanged from r1102593,
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ArrayServiceServer.java
Modified:
cxf/branches/2.3.x-fixes/ (props changed)
cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/JaxWsDynamicClientTest.java
Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/JaxWsDynamicClientTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/JaxWsDynamicClientTest.java?rev=1102605&r1=1102604&r2=1102605&view=diff
==============================================================================
---
cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/JaxWsDynamicClientTest.java
(original)
+++
cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/JaxWsDynamicClientTest.java
Fri May 13 08:31:26 2011
@@ -22,11 +22,14 @@ package org.apache.cxf.systest.jaxws;
import java.net.URL;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
-
+import java.util.Arrays;
+import java.util.List;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.endpoint.ClientCallback;
import org.apache.cxf.helpers.IOUtils;
+import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
import org.apache.cxf.no_body_parts.types.Operation1;
import org.apache.cxf.no_body_parts.types.Operation1Response;
@@ -38,6 +41,7 @@ import org.junit.Test;
public class JaxWsDynamicClientTest extends AbstractBusClientServerTestBase {
static final String PORT = TestUtil.getPortNumber(ServerNoBodyParts.class);
+ static final String PORT1 =
TestUtil.getPortNumber(ArrayServiceServer.class);
private String md5(byte[] bytes) {
MessageDigest algorithm;
@@ -61,6 +65,8 @@ public class JaxWsDynamicClientTest exte
public static void startServers() throws Exception {
assertTrue("server did not launch correctly",
launchServer(ServerNoBodyParts.class, true));
+ assertTrue("server did not launch correctly",
+ launchServer(ArrayServiceServer.class, true));
}
@Test
@@ -85,4 +91,18 @@ public class JaxWsDynamicClientTest exte
assertEquals(md5(bucketOfBytes), r.getStatus());
}
+ @Test
+ public void testArrayList() throws Exception {
+ JaxWsDynamicClientFactory dcf =
JaxWsDynamicClientFactory.newInstance();
+ Client client = dcf.createClient(new URL("http://localhost:"
+ + PORT1 +
"/ArrayService?wsdl"));
+
+ String[] values = new String[] {"foobar", "something" };
+ List<String> list = Arrays.asList(values);
+
+ client.getOutInterceptors().add(new LoggingOutInterceptor());
+ client.getInInterceptors().add(new LoggingInInterceptor());
+ client.invoke("init", list);
+ }
+
}