Author: asoldano
Date: 2015-03-10 12:58:48 -0400 (Tue, 10 Mar 2015)
New Revision: 19550
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/WEB-INF/jboss-webservices.xml
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase.java
Log:
[JBWS-3875] Yet another FastInfoset test addition using jboss-webservices.xml
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase.java 2015-03-10
16:15:03 UTC (rev 19549)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase.java 2015-03-10
16:58:48 UTC (rev 19550)
@@ -34,6 +34,7 @@
import org.apache.cxf.interceptor.LoggingInInterceptor;
import org.apache.cxf.interceptor.LoggingOutInterceptor;
import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.OperateOnDeployment;
import org.jboss.arquillian.container.test.api.RunAsClient;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.arquillian.test.api.ArquillianResource;
@@ -53,11 +54,14 @@
@RunWith(Arquillian.class)
public class FastInfosetTestCase extends JBossWSTest
{
+ public static final String DEP1 = "dep1";
+ public static final String DEP2 = "dep2";
+
@ArquillianResource
private URL baseURL;
- @Deployment(testable = false)
- public static WebArchive createDeployment() {
+ @Deployment(testable = false, name = DEP1)
+ public static WebArchive createDeployment1() {
WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-cxf-fastinfoset.war");
archive.setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ "Dependencies: org.apache.cxf\n"))
@@ -69,6 +73,16 @@
return archive;
}
+ @Deployment(testable = false, name = DEP2)
+ public static WebArchive createDeployment2() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-cxf-fastinfoset2.war");
+ archive.setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.apache.cxf\n"))
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/fastinfoset/WEB-INF/jboss-webservices.xml"),
"jboss-webservices.xml")
+ .addClass(org.jboss.test.ws.jaxws.cxf.fastinfoset.HelloWorldImpl.class);
+ return archive;
+ }
+
@Override
protected String getClientJarPaths() {
return JBossWSTestHelper.writeToFile(new
JBossWSTestHelper.JarDeployment("jaxws-cxf-fastinfoset-client.jar") { {
@@ -81,7 +95,8 @@
@Test
@RunAsClient
- public void testInfoset() throws Exception
+ @OperateOnDeployment(DEP1)
+ public void testInfosetUsingFastInfosetAnnotation() throws Exception
{
ByteArrayOutputStream out = new ByteArrayOutputStream();
ByteArrayOutputStream in = new ByteArrayOutputStream();
@@ -106,11 +121,11 @@
pwOut.close();
pwIn.close();
}
-
}
@Test
@RunAsClient
+ @OperateOnDeployment(DEP1)
public void testInfosetUsingFeature() throws Exception
{
ByteArrayOutputStream out = new ByteArrayOutputStream();
@@ -136,14 +151,33 @@
pwOut.close();
pwIn.close();
}
-
}
@Test
@RunAsClient
@WrapThreadContextClassLoader
+ @OperateOnDeployment(DEP1)
public void testInfosetUsingFeatureProperties() throws Exception
{
+ URL wsdlURL = new URL(baseURL +
"HelloWorldService/HelloWorldImpl?wsdl");
+ QName serviceName = new
QName("http://org.jboss.ws/jaxws/cxf/fastinfoset",
"HelloWorldService");
+ QName portQName = new QName("http://org.jboss.ws/jaxws/cxf/fastinfoset",
"HelloWorldImplPort");
+ internalTestInfosetUsingFeatureProperties(wsdlURL, serviceName, portQName);
+ }
+
+ @Test
+ @RunAsClient
+ @WrapThreadContextClassLoader
+ @OperateOnDeployment(DEP2)
+ public void testInfosetUsingFeatureProperties2() throws Exception
+ {
+ URL wsdlURL = new URL(baseURL + "HelloWorldService?wsdl");
+ QName serviceName = new
QName("http://org.jboss.ws/jaxws/cxf/fastinfoset",
"HelloWorldService");
+ QName portQName = new QName("http://org.jboss.ws/jaxws/cxf/fastinfoset",
"HelloWorldImplPort");
+ internalTestInfosetUsingFeatureProperties(wsdlURL, serviceName, portQName);
+ }
+
+ private void internalTestInfosetUsingFeatureProperties(URL wsdlURL, QName serviceName,
QName portQName) throws Exception {
ByteArrayOutputStream out = new ByteArrayOutputStream();
ByteArrayOutputStream in = new ByteArrayOutputStream();
PrintWriter pwIn = new PrintWriter(in);
@@ -154,10 +188,7 @@
bus.getInInterceptors().add(new LoggingInInterceptor(pwIn));
bus.getOutInterceptors().add(new LoggingOutInterceptor(pwOut));
- URL wsdlURL = new URL(baseURL +
"HelloWorldService/HelloWorldImpl?wsdl");
- QName serviceName = new
QName("http://org.jboss.ws/jaxws/cxf/fastinfoset",
"HelloWorldService");
Service service = Service.create(wsdlURL, serviceName, new
UseThreadBusFeature());
- QName portQName = new
QName("http://org.jboss.ws/jaxws/cxf/fastinfoset",
"HelloWorldImplPort");
HelloWorld port = (HelloWorld) service.getPort(portQName, HelloWorld.class);
ClientConfigurer configurer = ClientConfigUtil.resolveClientConfigurer();
@@ -171,7 +202,6 @@
pwOut.close();
pwIn.close();
}
-
}
}
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/WEB-INF/jboss-webservices.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/WEB-INF/jboss-webservices.xml
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/WEB-INF/jboss-webservices.xml 2015-03-10
16:58:48 UTC (rev 19550)
@@ -0,0 +1,12 @@
+<?xml version="1.1" encoding="UTF-8"?>
+<webservices
+
xmlns="http://www.jboss.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ version="1.2"
+
xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee">
+ <property>
+ <name>cxf.features</name>
+ <value>org.apache.cxf.feature.FastInfosetFeature</value>
+ </property>
+
+</webservices>
Property changes on:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/WEB-INF/jboss-webservices.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native