Author: rsearls
Date: 2015-01-21 16:03:21 -0500 (Wed, 21 Jan 2015)
New Revision: 19411
Added:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/etc/arquillian.xml
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/etc/container.properties
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/scripts/
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/scripts/jbws-testsuite-spring-default-config-tests.groovy
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/scripts/jbws-testsuite-spring-default.groovy
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/pom.xml
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisAnnotationTestCase.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisTestCase.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/JBossWSCXFConfigurerTestCase.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/DescriptorJSETestCase.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/in_container_client/CustomBusServletTestCaseForked.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/in_container_client/ServletTestCase.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3497/JBWS3497TestCase.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3670/JBWS3670TestCase.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointAPITestCaseForked.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointOnlyDeploymentTestCaseForked.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCaseForked.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/mixtype/MixedTypeTestCase.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/webserviceref/WebServiceRefServletTestCase.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocTestCase.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCTestCase.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/DeploymentArchives.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/SimpleServiceTestCase.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignTestCase.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationTestCase.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameDeploymentArchives.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameServletTestCase.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameTestCase.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/KerberosTestCase.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseDigest/UsernameDigestTestCase.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseEJB/WsseEjbTestCase.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/SignEncryptTestCase.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/SignTestCase.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/UsernameTestCase.java
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms/META-INF/wsdl/HelloWorldService.wsdl
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/webserviceref/WEB-INF/wsdl/Endpoint.wsdl
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/wsrm/basic-doc/wsrm-basic-doc.wsdl
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/wsrm/basic-rpc/wsrm-basic-rpc.wsdl
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsrm/WEB-INF/wsdl/SimpleService.wsdl
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsse/kerberos/WEB-INF/wsdl/DoubleItKerberos.wsdl
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/wsdl/SecurityService.wsdl
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsse/username-authorize/WEB-INF/wsdl/SecurityService.wsdl
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsse/username-digest/WEB-INF/wsdl/SecurityService.wsdl
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wssePolicy/sign-encrypt/WEB-INF/wsdl/SecurityService.wsdl
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wssePolicy/username/WEB-INF/wsdl/SecurityService.wsdl
stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/etc/container.properties
stack/cxf/branches/arquillian/modules/testsuite/pom.xml
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/etc/container.properties
Log:
migration of cxf-spring-test
Modified: stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/pom.xml
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/pom.xml 2015-01-21
17:07:53 UTC (rev 19410)
+++ stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/pom.xml 2015-01-21
21:03:21 UTC (rev 19411)
@@ -72,11 +72,59 @@
</activation>
<build>
<plugins>
+
+ <plugin>
+ <groupId>org.codehaus.gmaven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>testsuite-default</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+
<source>${basedir}/src/test/scripts/jbws-testsuite-spring-default.groovy</source>
+ <properties>
+
<inputFile>${jboss.home}/standalone/configuration/standalone-full.xml</inputFile>
+
<outputFile>${jboss.home}/standalone/configuration/jbws-testsuite-spring-default.xml</outputFile>
+
<serverLog>jbws-testsuite-spring-default.log</serverLog>
+ <!--
+
<usersPropFile>${project.build.directory}/test-classes/jbossws-users.properties</usersPropFile>
+
<rolesPropFile>${project.build.directory}/test-classes/jbossws-roles.properties</rolesPropFile>
+
<keystorePath>${project.build.directory}/test-classes/test.keystore</keystorePath>
+ -->
+
<testResourcesDir>${project.build.directory}/test-resources</testResourcesDir>
+ </properties>
+ </configuration>
+ </execution>
+ <execution>
+ <id>testsuite-default-config-tests</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+
<source>${basedir}/src/test/scripts/jbws-testsuite-spring-default-config-tests.groovy</source>
+ <properties>
+
<inputFile>${jboss.home}/standalone/configuration/standalone-full.xml</inputFile>
+
<outputFile>${jboss.home}/standalone/configuration/jbws-testsuite-spring-default-config-tests.xml</outputFile>
+
<serverLog>jbws-testsuite-spring-default-config-tests.log</serverLog>
+ </properties>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+
+
+ <!-- This copies jbossws-cxf-factories jar to endorsed dir before the
integration-tests are run -->
+ <!-- rls start old stuff
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
- <execution> <!-- This copies jbossws-cxf-factories jar to
endorsed dir before the integration-tests are run -->
+ <execution>
<id>copy-endorsed</id>
<phase>pre-integration-test</phase>
<goals>
@@ -95,10 +143,88 @@
</execution>
</executions>
</plugin>
+ rls end -->
</plugins>
</build>
</profile>
-
+
+
+ <!-- When the 'fast' profile is on, the testsuite runs in parallel mode;
Arquillan messes up with containers in such a scenario, unless they're started
upfront.
+ So we start all the containers specified in the arquillan.xml configuration
-->
+ <profile>
+ <id>fast</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.wildfly.plugins</groupId>
+ <artifactId>wildfly-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>jboss</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ <configuration>
+ <jvmArgs>-server -XX:+UseCompressedOops -Xms64m
+ -Xmx512m -XX:MaxPermSize=256m
+
-Djboss.socket.binding.port-offset=${port-offset.shared-tests.jboss}
+ ${additionalJvmArgs}
+ </jvmArgs>
+ <serverConfig>jbws-testsuite-spring-default.xml
+ </serverConfig>
+ <jbossHome>${jboss.home}</jbossHome>
+ <port>34990</port>
+ <!-- Keep in sync with the port-offset -->
+ </configuration>
+ </execution>
+ <execution>
+ <id>jboss-shutdown</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>shutdown</goal>
+ </goals>
+ <configuration>
+ <port>34990</port>
+ <!-- Keep in sync with the port-offset -->
+ </configuration>
+ </execution>
+ <execution>
+ <id>default-config-tests</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ <configuration>
+ <jvmArgs>-server -XX:+UseCompressedOops -Xms48m
+ -Xmx384m -XX:MaxPermSize=192m
+
-Djboss.socket.binding.port-offset=${port-offset.shared-tests.default-config-tests}
+ ${additionalJvmArgs}
+ </jvmArgs>
+ <serverConfig>
+ jbws-testsuite-spring-default-config-tests.xml
+ </serverConfig>
+ <jbossHome>${jboss.home}</jbossHome>
+ <port>39990</port>
+ <!-- Keep in sync with the port-offset -->
+ </configuration>
+ </execution>
+ <execution>
+ <id>default-config-tests-shutdown</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>shutdown</goal>
+ </goals>
+ <configuration>
+ <port>39990</port>
+ <!-- Keep in sync with the port-offset -->
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
</project>
Added:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/etc/arquillian.xml
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/etc/arquillian.xml
(rev 0)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/etc/arquillian.xml 2015-01-21
21:03:21 UTC (rev 19411)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<arquillian
xmlns="http://jboss.org/schema/arquillian"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://jboss.org/schema/arquillian
http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
+
+ <group qualifier="cxf-spring-tests" default="true">
+ <container qualifier="jboss" default="true">
+ <configuration>
+ <property name="jbossHome">${jboss.home}</property>
+ <property name="javaVmArguments">-server
-XX:+UseCompressedOops -Xms64m -Xmx512m -XX:MaxPermSize=256m
${additionalJvmArgs}</property>
+ <property
name="serverConfig">jbws-testsuite-spring-default.xml</property>
+ <property
name="allowConnectingToRunningServer">true</property>
+ <property
name="managementAddress">${jboss.bind.address:localhost}</property>
+ <property
name="jbossArguments">${jbossArguments}</property>
+ <property
name="managementPort">${add_int(port-offset.spring-tests.jboss,9990)}</property>
<!-- Keep in sync with the port-offset -->
+ <!-- AS7-4070 -->
+ <property
name="waitForPorts">${add_int(port-offset.spring-tests.jboss,8787)}
${add_int(port-offset.spring-tests.jboss,9990)}</property> <!-- Keep in sync with
the port-offset -->
+ <property
name="waitForPortsTimeoutInSeconds">8</property>
+ </configuration>
+ </container>
+
+ <container qualifier="default-config-tests" mode="manual">
+ <configuration>
+ <property name="jbossHome">${jboss.home}</property>
+ <property name="javaVmArguments">-server
-XX:+UseCompressedOops -Xms48m -Xmx384m -XX:MaxPermSize=192m
-Djboss.socket.binding.port-offset=${port-offset.cxf-tests.default-config-tests}
${additionalJvmArgs}</property>
+ <property
name="serverConfig">jbws-testsuite-spring-default-config-tests.xml</property>
+ <property
name="allowConnectingToRunningServer">true</property>
+ <property
name="managementAddress">${jboss.bind.address:localhost}</property>
+ <property
name="jbossArguments">${jbossArguments}</property>
+ <property
name="managementPort">${add_int(port-offset.spring-tests.default-config-tests,9990)}</property>
+ <!-- AS7-4070 -->
+ <property
name="waitForPorts">${add_int(port-offset.spring-tests.default-config-tests,8787)}
${add_int(port-offset.cxf-tests.default-config-tests,9990)}</property>
+ <property
name="waitForPortsTimeoutInSeconds">8</property>
+ </configuration>
+ </container>
+
+ </group>
+</arquillian>
Added:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/etc/container.properties
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/etc/container.properties
(rev 0)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/etc/container.properties 2015-01-21
21:03:21 UTC (rev 19411)
@@ -0,0 +1,9 @@
+default.container.qualifier=jboss
+default.container.group.qualifier=cxf-spring-tests
+port-offset.cxf-tests.jboss=(a)port-offset.cxf-tests.jboss@
+port-offset.cxf-tests.ssl-mutual-auth=(a)port-offset.cxf-tests.ssl-mutual-auth@
+port-offset.cxf-tests.default-config-tests=(a)port-offset.cxf-tests.default-config-tests@
+port-offset.shared-tests.jboss=(a)port-offset.shared-tests.jboss@
+port-offset.shared-tests.default-config-tests=(a)port-offset.shared-tests.default-config-tests@
+port-offset.spring-tests.jboss=(a)port-offset.spring-tests.jboss@
+port-offset.spring-tests.default-config-tests=(a)port-offset.spring-tests.default-config-tests@
\ No newline at end of file
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisAnnotationTestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisAnnotationTestCase.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisAnnotationTestCase.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -21,26 +21,28 @@
*/
package org.jboss.test.ws.jaxws.cxf.aegis;
-import java.io.File;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import junit.framework.Test;
-
import org.apache.cxf.aegis.databinding.AegisDatabinding;
import org.apache.cxf.frontend.ClientProxyFactoryBean;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.StringAsset;
-import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestHelper;
-import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import java.io.File;
+import java.util.Map;
+
+(a)RunWith(Arquillian.class)
public class AegisAnnotationTestCase extends JBossWSTest
{
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new
JBossWSTestHelper.WarDeployment("jaxws-aegis-annotation.war") { {
+ @Deployment(testable = false)
+ public static WebArchive createWarDeployment() {
+ WebArchive archive =
ShrinkWrap.create(WebArchive.class,"jaxws-aegis-annotation.war");
archive
.setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ "Dependencies: org.apache.cxf.impl\n")) //cxf impl
required due to AegisDataBinding reference in endpoint impl
@@ -48,22 +50,17 @@
.addClass(org.jboss.test.ws.jaxws.cxf.aegis.AegisAnnotationGroupQueryImpl.class)
.addClass(org.jboss.test.ws.jaxws.cxf.aegis.Member.class)
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/aegis/jaxws/annotation/WEB-INF/web.xml"));
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(AegisAnnotationTestCase.class,
JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
+ @Test
+ @RunAsClient
public void testAccessAnnotation() throws Exception
{
ClientProxyFactoryBean proxyFactory = new ClientProxyFactoryBean();
proxyFactory.setDataBinding(new AegisDatabinding());
proxyFactory.setServiceClass(AegisGroupQuery.class);
- proxyFactory.setAddress("http://" + getServerHost() +
":8080/jaxws-aegis-annotation");
+ proxyFactory.setAddress("http://" + getServerHost() + ":" +
getServerPort() + "/jaxws-aegis-annotation");
AegisGroupQuery query = (AegisGroupQuery)proxyFactory.create();
@SuppressWarnings("unchecked")
Map<Integer, String> members = query.getMembers();
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisTestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisTestCase.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisTestCase.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -21,26 +21,28 @@
*/
package org.jboss.test.ws.jaxws.cxf.aegis;
-import java.io.File;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import junit.framework.Test;
-
import org.apache.cxf.aegis.databinding.AegisDatabinding;
import org.apache.cxf.frontend.ClientProxyFactoryBean;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.StringAsset;
-import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestHelper;
-import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import java.io.File;
+import java.util.Map;
+
+(a)RunWith(Arquillian.class)
public class AegisTestCase extends JBossWSTest
{
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.WarDeployment("jaxws-aegis.war") { {
+ @Deployment(testable = false)
+ public static WebArchive createWarDeployment() {
+ WebArchive archive =
ShrinkWrap.create(WebArchive.class,"jaxws-aegis.war");
archive
.setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ "Dependencies: org.apache.cxf\n"))
@@ -49,22 +51,17 @@
.addClass(org.jboss.test.ws.jaxws.cxf.aegis.Member.class)
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/aegis/jaxws/WEB-INF//jbossws-cxf.xml"),
"jbossws-cxf.xml")
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/aegis/jaxws/WEB-INF/web.xml"));
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(AegisTestCase.class,
JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
+ @Test
+ @RunAsClient
public void testAccess() throws Exception
{
ClientProxyFactoryBean proxyFactory = new ClientProxyFactoryBean();
proxyFactory.setDataBinding(new AegisDatabinding());
proxyFactory.setServiceClass(AegisGroupQuery.class);
- proxyFactory.setAddress("http://" + getServerHost() +
":8080/jaxws-aegis");
+ proxyFactory.setAddress("http://" + getServerHost() + ":" +
getServerPort() + "/jaxws-aegis");
AegisGroupQuery query = (AegisGroupQuery)proxyFactory.create();
@SuppressWarnings("unchecked")
Map<Integer, String> members = query.getMembers();
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/JBossWSCXFConfigurerTestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/JBossWSCXFConfigurerTestCase.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/JBossWSCXFConfigurerTestCase.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -29,7 +29,14 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import junit.framework.Test;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
@@ -42,33 +49,27 @@
*
* @author <a href="ema(a)redhat.com">Jim Ma</a>
*/
+(a)RunWith(Arquillian.class)
public class JBossWSCXFConfigurerTestCase extends JBossWSTest
{
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new
JBossWSTestHelper.WarDeployment("jaxws-cxf-configuration.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.apache.cxf\n"))
-
.addClass(org.jboss.test.ws.jaxws.cxf.configuration.ChangeRequestnterceptor.class)
- .addClass(org.jboss.test.ws.jaxws.cxf.configuration.Endpoint.class)
- .addClass(org.jboss.test.ws.jaxws.cxf.configuration.EndpointImpl.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/configuration/WEB-INF/jbossws-cxf.xml"),
"jbossws-cxf.xml")
- .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/configuration/WEB-INF/web.xml"));
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ @Deployment(testable = false)
+ public static WebArchive createDeployments() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-cxf-configuration.war");
+ archive
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.apache.cxf\n"))
+
.addClass(org.jboss.test.ws.jaxws.cxf.configuration.ChangeRequestnterceptor.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.configuration.Endpoint.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.configuration.EndpointImpl.class)
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/configuration/WEB-INF/jbossws-cxf.xml"),
"jbossws-cxf.xml")
+ .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/configuration/WEB-INF/web.xml"));
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(JBossWSCXFConfigurerTestCase.class,
JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
//JBWS-3033
public void testConfiguration() throws Exception
{
- URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-cxf-configuration?wsdl");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":" +
getServerPort() + "/jaxws-cxf-configuration?wsdl");
QName serviceName = new QName("http://org.jboss.ws/jbws3033",
"EndpointService");
Service service = Service.create(wsdlURL, serviceName);
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/DescriptorJSETestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/DescriptorJSETestCase.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/DescriptorJSETestCase.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -21,36 +21,37 @@
*/
package org.jboss.test.ws.jaxws.cxf.descriptor;
-import java.io.File;
-import java.net.URL;
-import java.util.LinkedList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-
-import junit.framework.Test;
-
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.StringAsset;
-import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestHelper;
-import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import java.io.File;
+import java.net.URL;
+
/**
* Test a CXF endpoint with provided jbossws-cxf.xml
*
* @author Thomas.Diesler(a)jboss.org
* @since 12-Dec-2007
*/
+(a)RunWith(Arquillian.class)
public class DescriptorJSETestCase extends JBossWSTest
{
- private String endpointURL = "http://" + getServerHost() +
":8080/jaxws-cxf-descriptor/TestService";
+ private String endpointURL = "http://" + getServerHost() + ":" +
getServerPort() + "/jaxws-cxf-descriptor/TestService";
private String targetNS = "http://org.jboss.ws.jaxws.cxf/descriptor";
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.WarDeployment("jaxws-cxf-descriptor.war")
{ {
+ @Deployment(testable = false)
+ public static WebArchive createClientDeployment() {
+ WebArchive archive =
ShrinkWrap.create(WebArchive.class,"jaxws-cxf-descriptor.war");
archive
.setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ "Dependencies: org.apache.cxf.impl\n")) //cxf impl
required due to custom interceptor in deployment
@@ -59,16 +60,11 @@
.addClass(org.jboss.test.ws.jaxws.cxf.descriptor.TestLoggingInInterceptor.class)
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/descriptor/WEB-INF/jbossws-cxf.xml"), "jbossws-cxf.xml")
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/descriptor/WEB-INF/web.xml"));
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(DescriptorJSETestCase.class,
JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
+ @Test
+ @RunAsClient
public void testLegalAccess() throws Exception
{
URL wsdlURL = new URL(endpointURL + "?wsdl");
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/in_container_client/CustomBusServletTestCaseForked.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/in_container_client/CustomBusServletTestCaseForked.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/in_container_client/CustomBusServletTestCaseForked.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -23,11 +23,19 @@
import static
org.jboss.wsf.stack.cxf.client.Constants.JBWS_CXF_JAXWS_CLIENT_BUS_SELECTOR;
import java.io.File;
+import java.lang.Override;
import java.net.URL;
import java.util.LinkedList;
import java.util.List;
-import junit.framework.Test;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import org.jboss.ws.common.IOUtils;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
@@ -40,68 +48,67 @@
* for creating client and server Bus instances
*
*/
+(a)RunWith(Arquillian.class)
public class CustomBusServletTestCaseForked extends JBossWSTest
{
- public static BaseDeployment<?>[] createDeployments() {
-
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new
JBossWSTestHelper.WarDeployment("jaxws-cxf-in_container_client-client_spring.war")
{ {
- archive
- .addManifest()
- .addAsResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/in_container_client/cxf.xml"), "cxf.xml")
- .addAsResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/in_container_client/cxf-client.xml"), "cxf-client.xml")
-
.addClass(org.jboss.test.ws.jaxws.cxf.in_container_client.HelloWorld.class)
- .addClass(org.jboss.test.ws.jaxws.cxf.in_container_client.Helper.class)
- .addClass(org.jboss.wsf.test.ClientHelper.class)
- .addClass(org.jboss.wsf.test.TestServlet.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/in_container_client/WEB-INF/jboss-deployment-structure.xml"),
"jboss-deployment-structure.xml");
- }
- });
- list.add(new
JBossWSTestHelper.WarDeployment("jaxws-cxf-in_container_client_spring.war") { {
- archive
- .addManifest()
-
.addClass(org.jboss.test.ws.jaxws.cxf.in_container_client.HelloWorld.class)
-
.addClass(org.jboss.test.ws.jaxws.cxf.in_container_client.HelloWorldImpl.class);
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ @Deployment(name = "jaxws-cxf-in_container_client-client_spring", order = 1,
testable = false)
+ public static WebArchive createDeployment1() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-cxf-in_container_client-client_spring.war");
+ archive
+ .addManifest()
+ .addAsResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/in_container_client/cxf.xml"), "cxf.xml")
+ .addAsResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/in_container_client/cxf-client.xml"), "cxf-client.xml")
+ .addClass(org.jboss.test.ws.jaxws.cxf.in_container_client.HelloWorld.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.in_container_client.Helper.class)
+ .addClass(org.jboss.wsf.test.ClientHelper.class)
+ .addClass(org.jboss.wsf.test.TestServlet.class)
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/in_container_client/WEB-INF/jboss-deployment-structure.xml"),
"jboss-deployment-structure.xml");
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(CustomBusServletTestCaseForked.class,
JBossWSTestHelper.writeToFile(createDeployments())) {
- /// see
https://issues.jboss.org/browse/JBWS-3832
- private static final String PROPERTY_NAME =
JBWS_CXF_JAXWS_CLIENT_BUS_SELECTOR;
- private static final String SPRING_BUS_SELECTOR =
"org.jboss.wsf.stack.cxf.client.SpringCustomClientBusSelector";
+ @Deployment(name = "jaxws-cxf-in_container_client_spring", order = 2,
testable = false)
+ public static WebArchive createDeployment2() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-cxf-in_container_client_spring.war");
+ archive
+ .addManifest()
+ .addClass(org.jboss.test.ws.jaxws.cxf.in_container_client.HelloWorld.class)
+
.addClass(org.jboss.test.ws.jaxws.cxf.in_container_client.HelloWorldImpl.class);
+ return archive;
+ }
- private String formerValue;
+ private static final String PROPERTY_NAME = JBWS_CXF_JAXWS_CLIENT_BUS_SELECTOR;
+ private static final String SPRING_BUS_SELECTOR =
"org.jboss.wsf.stack.cxf.client.SpringCustomClientBusSelector";
- @Override
- public void setUp() throws Exception {
- formerValue = JBossWSTestHelper.setSystemProperty(PROPERTY_NAME,
SPRING_BUS_SELECTOR);
- JBossWSTestHelper.restartServer();
- super.setUp();
- }
+ private String formerValue;
- @Override
- public void tearDown() throws Exception {
- super.tearDown();
- JBossWSTestHelper.setSystemProperty(PROPERTY_NAME, formerValue);
- JBossWSTestHelper.restartServer();
- formerValue = null;
- }
- };
+ @Override
+ protected void setUp() throws Exception {
+ formerValue = JBossWSTestHelper.setSystemProperty(PROPERTY_NAME,
SPRING_BUS_SELECTOR);
+ JBossWSTestHelper.restartServer();
+ super.setUp();
}
-
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ JBossWSTestHelper.setSystemProperty(PROPERTY_NAME, formerValue);
+ JBossWSTestHelper.restartServer();
+ formerValue = null;
+ }
+
+ @Test
+ @RunAsClient
public void test() throws Exception
{
+ setUp();
assertEquals("1", runTestInContainer("testSpringBus"));
+ tearDown();
}
private String runTestInContainer(String test) throws Exception
{
- URL url = new URL("http://" + getServerHost()
- +
":8080/jaxws-cxf-in_container_client-client_spring?path=/jaxws-cxf-in_container_client_spring/HelloWorldService&method="
+ test
+ URL url = new URL("http://" + getServerHost() + ":" +
getServerPort()
+ +
"/jaxws-cxf-in_container_client-client_spring?path=/jaxws-cxf-in_container_client_spring/HelloWorldService&method="
+ test
+ "&helper=" + Helper.class.getName());
return IOUtils.readAndCloseStream(url.openStream());
}
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/in_container_client/ServletTestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/in_container_client/ServletTestCase.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/in_container_client/ServletTestCase.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -26,7 +26,14 @@
import java.util.LinkedList;
import java.util.List;
-import junit.framework.Test;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import org.jboss.ws.common.IOUtils;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
@@ -42,36 +49,35 @@
* @since 08-May-2013
*
*/
+(a)RunWith(Arquillian.class)
public class ServletTestCase extends JBossWSTest
{
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new
JBossWSTestHelper.WarDeployment("jaxws-cxf-in_container_client-client.war") { {
- archive
- .addManifest()
- .addAsResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/in_container_client/cxf.xml"), "cxf.xml")
-
.addClass(org.jboss.test.ws.jaxws.cxf.in_container_client.HelloWorld.class)
- .addClass(org.jboss.test.ws.jaxws.cxf.in_container_client.Helper.class)
- .addClass(org.jboss.wsf.test.ClientHelper.class)
- .addClass(org.jboss.wsf.test.TestServlet.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/in_container_client/WEB-INF/jboss-deployment-structure.xml"),
"jboss-deployment-structure.xml");
- }
- });
- list.add(new
JBossWSTestHelper.WarDeployment("jaxws-cxf-in_container_client.war") { {
- archive
- .addManifest()
-
.addClass(org.jboss.test.ws.jaxws.cxf.in_container_client.HelloWorld.class)
-
.addClass(org.jboss.test.ws.jaxws.cxf.in_container_client.HelloWorldImpl.class);
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ @Deployment(name = "jaxws-cxf-in_container_client-client", order = 1,
testable = false)
+ public static WebArchive createDeployment1() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-cxf-in_container_client-client.war");
+ archive
+ .addManifest()
+ .addAsResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/in_container_client/cxf.xml"), "cxf.xml")
+ .addClass(org.jboss.test.ws.jaxws.cxf.in_container_client.HelloWorld.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.in_container_client.Helper.class)
+ .addClass(org.jboss.wsf.test.ClientHelper.class)
+ .addClass(org.jboss.wsf.test.TestServlet.class)
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/in_container_client/WEB-INF/jboss-deployment-structure.xml"),
"jboss-deployment-structure.xml");
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(ServletTestCase.class,
JBossWSTestHelper.writeToFile(createDeployments()));
+ @Deployment(name = "jaxws-cxf-in_container_client", order = 2, testable =
false)
+ public static WebArchive createDeployment2() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-cxf-in_container_client.war");
+ archive
+ .addManifest()
+ .addClass(org.jboss.test.ws.jaxws.cxf.in_container_client.HelloWorld.class)
+
.addClass(org.jboss.test.ws.jaxws.cxf.in_container_client.HelloWorldImpl.class);
+ return archive;
}
-
+
+ @Test
+ @RunAsClient
public void test() throws Exception
{
assertEquals("1", runTestInContainer("test"));
@@ -79,8 +85,8 @@
private String runTestInContainer(String test) throws Exception
{
- URL url = new URL("http://" + getServerHost()
- +
":8080/jaxws-cxf-in_container_client-client?path=/jaxws-cxf-in_container_client/HelloWorldService&method="
+ test
+ URL url = new URL("http://" + getServerHost() + ":" +
getServerPort()
+ +
"/jaxws-cxf-in_container_client-client?path=/jaxws-cxf-in_container_client/HelloWorldService&method="
+ test
+ "&helper=" + Helper.class.getName());
return IOUtils.readAndCloseStream(url.openStream());
}
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3497/JBWS3497TestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3497/JBWS3497TestCase.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3497/JBWS3497TestCase.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -35,7 +35,14 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import junit.framework.Test;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
@@ -50,15 +57,16 @@
* @author alessio.soldano(a)jboss.com
*
*/
+(a)RunWith(Arquillian.class)
public class JBWS3497TestCase extends JBossWSTest
{
private EndpointOne portOne;
protected int defaultSize = 200;
-
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.WarDeployment("jaxws-cxf-jbws3497.war") {
{
+
+ @Deployment(testable = false)
+ public static WebArchive createDeployments() {
+ WebArchive archive =
ShrinkWrap.create(WebArchive.class,"jaxws-cxf-jbws3497.war");
archive
.setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ "Dependencies:
org.apache.cxf,org.jboss.ws.cxf.jbossws-cxf-server\n"))
@@ -67,16 +75,11 @@
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/jbws3497/WEB-INF/jbossws-cxf.xml"), "jbossws-cxf.xml")
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/jbws3497/WEB-INF/cxf.xml"), "classes/cxf.xml")
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/jbws3497/WEB-INF/web.xml"));
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(JBWS3497TestCase.class,
JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
+ @Test
+ @RunAsClient
public void testAccess() throws Exception
{
initPorts();
@@ -118,7 +121,7 @@
private void initPorts() throws MalformedURLException
{
- URL wsdlOneURL = new URL("http://" + getServerHost() +
":8080/jaxws-cxf-jbws3497/ServiceOne/EndpointOne?wsdl");
+ URL wsdlOneURL = new URL("http://" + getServerHost() + ":" +
getServerPort() + "/jaxws-cxf-jbws3497/ServiceOne/EndpointOne?wsdl");
QName serviceOneName = new
QName("http://org.jboss.ws.jaxws.cxf/jbws3497", "ServiceOne");
Service serviceOne = Service.create(wsdlOneURL, serviceOneName);
portOne = (EndpointOne)serviceOne.getPort(EndpointOne.class);
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3670/JBWS3670TestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3670/JBWS3670TestCase.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3670/JBWS3670TestCase.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -29,44 +29,45 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import junit.framework.Test;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestHelper;
import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
+(a)RunWith(Arquillian.class)
public class JBWS3670TestCase extends JBossWSTest
{
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.WarDeployment("jaxws-cxf-jbws3670.war") {
{
- archive
- .addManifest()
- .addClass(org.jboss.test.ws.jaxws.cxf.jbws3670.HelloWorldService.class)
- .addClass(org.jboss.test.ws.jaxws.cxf.jbws3670.HelloWorldServiceI.class)
- .addClass(org.jboss.test.ws.jaxws.cxf.jbws3670.TestBean.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/jbws3670/WEB-INF/jbossws-cxf.xml"), "jbossws-cxf.xml")
- .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/jbws3670/WEB-INF/web.xml"));
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ @Deployment(testable = false)
+ public static WebArchive createDeployments() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-cxf-jbws3670.war");
+ archive
+ .addManifest()
+ .addClass(org.jboss.test.ws.jaxws.cxf.jbws3670.HelloWorldService.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.jbws3670.HelloWorldServiceI.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.jbws3670.TestBean.class)
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/jbws3670/WEB-INF/jbossws-cxf.xml"), "jbossws-cxf.xml")
+ .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/jbws3670/WEB-INF/web.xml"));
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(JBWS3670TestCase.class,
JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
+ @Test
+ @RunAsClient
public void testAccess() throws Exception
{
- URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-cxf-jbws3670/helloworld?wsdl");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":" +
getServerPort() + "/jaxws-cxf-jbws3670/helloworld?wsdl");
QName serviceName = new
QName("http://jbossws.jboss.org/helloworld",
"HelloWorldService");
Service service = Service.create(wsdlURL, serviceName);
HelloWorldServiceI port = service.getPort(HelloWorldServiceI.class);
assertEquals("TestBean is not injected", "Hello jbossws",
port.sayHello("jbossws"));
}
-
-
}
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointAPITestCaseForked.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointAPITestCaseForked.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointAPITestCaseForked.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -21,31 +21,33 @@
*/
package org.jboss.test.ws.jaxws.cxf.jms;
-import java.io.File;
-import java.net.URL;
-import java.util.LinkedList;
-import java.util.List;
-
-import junit.framework.Test;
-
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.StringAsset;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.jboss.ws.common.IOUtils;
-import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestHelper;
-import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import java.io.File;
+import java.net.URL;
+
/**
* Test case for publishing a JMS (SOAP-over-JMS 1.0) endpoint through API
*
* @author alessio.soldano(a)jboss.com
* @since 29-Apr-2011
*/
+(a)RunWith(Arquillian.class)
public final class JMSEndpointAPITestCaseForked extends JBossWSTest
{
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.WarDeployment("jaxws-cxf-jms-api.war") {
{
+ @Deployment(testable = false)
+ public static WebArchive createWarDeployment() {
+ WebArchive archive =
ShrinkWrap.create(WebArchive.class,"jaxws-cxf-jms-api.war");
archive
.setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client
services,org.hornetq\n"))
@@ -53,19 +55,14 @@
.addClass(org.jboss.test.ws.jaxws.cxf.jms.HelloWorld.class)
.addClass(org.jboss.test.ws.jaxws.cxf.jms.HelloWorldImpl.class)
.addClass(org.jboss.test.ws.jaxws.cxf.jms.TestServlet.class);
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(JMSEndpointAPITestCaseForked.class,
JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
+ @Test
+ @RunAsClient
public void testServerSide() throws Exception
{
- URL url = new URL("http://" + getServerHost() +
":8080/jaxws-cxf-jms-api");
+ URL url = new URL("http://" + getServerHost() + ":" +
getServerPort() + "/jaxws-cxf-jms-api");
assertEquals("true", IOUtils.readAndCloseStream(url.openStream()));
}
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointOnlyDeploymentTestCaseForked.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointOnlyDeploymentTestCaseForked.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointOnlyDeploymentTestCaseForked.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -21,84 +21,77 @@
*/
package org.jboss.test.ws.jaxws.cxf.jms;
-import java.io.File;
-import java.net.URL;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Properties;
-
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueReceiver;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-
-import junit.framework.Test;
-
import org.apache.cxf.frontend.ClientProxy;
import org.apache.cxf.transport.jms.JMSConduit;
import org.apache.cxf.transport.jms.JMSConfiguration;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.StringAsset;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.jboss.ws.common.DOMUtils;
import org.jboss.ws.common.IOUtils;
-import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestHelper;
-import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import javax.jms.*;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import java.io.File;
+import java.net.URL;
+import java.util.Properties;
+
/**
* Test case for deploying an archive with a JMS (SOAP-over-JMS 1.0) endpoint only
*
* @author alessio.soldano(a)jboss.com
* @since 10-Jun-2011
*/
+(a)RunWith(Arquillian.class)
public class JMSEndpointOnlyDeploymentTestCaseForked extends JBossWSTest
{
private static volatile boolean waitForResponse;
-
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new
JBossWSTestHelper.WarDeployment("jaxws-cxf-jms-only-deployment-test-servlet.war")
{ {
+
+ @Deployment(name="jaxws-cxf-jms-only-deployment-test-servlet", order=1,
testable = false)
+ public static WebArchive createWarDeployment() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-cxf-jms-only-deployment-test-servlet.war");
archive
.setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client
services,org.hornetq\n"))
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/jms/META-INF/wsdl/HelloWorldService.wsdl"),
"classes/META-INF/wsdl/HelloWorldService.wsdl")
.addClass(org.jboss.test.ws.jaxws.cxf.jms.DeploymentTestServlet.class)
.addClass(org.jboss.test.ws.jaxws.cxf.jms.HelloWorld.class);
- }
- });
- list.add(new
JBossWSTestHelper.JarDeployment("jaxws-cxf-jms-only-deployment.jar") { {
+ return archive;
+ }
+
+ @Deployment(name="jaxws-cxf-jms-only-deployment", order=2, testable =
false)
+ public static JavaArchive createJarDeployment() {
+ JavaArchive archive =
ShrinkWrap.create(JavaArchive.class,"jaxws-cxf-jms-only-deployment.jar");
archive
.setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ "Dependencies: org.hornetq\n"))
.addClass(org.jboss.test.ws.jaxws.cxf.jms.HelloWorld.class)
.addClass(org.jboss.test.ws.jaxws.cxf.jms.HelloWorldImpl.class)
.addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/jms/META-INF/wsdl/HelloWorldService.wsdl"),
"wsdl/HelloWorldService.wsdl");
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(JMSEndpointOnlyDeploymentTestCaseForked.class,
JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
+ @Test
+ @RunAsClient
public void testJMSEndpointServerSide() throws Exception
{
- URL url = new URL("http://" + getServerHost() +
":8080/jaxws-cxf-jms-only-deployment-test-servlet");
+ URL url = new URL("http://" + getServerHost() + ":" +
getServerPort() + "/jaxws-cxf-jms-only-deployment-test-servlet");
assertEquals("true", IOUtils.readAndCloseStream(url.openStream()));
}
-
+
+ @Test
+ @RunAsClient
public void testJMSEndpointClientSide() throws Exception
{
URL wsdlUrl =
getResourceURL("jaxws/cxf/jms/META-INF/wsdl/HelloWorldService.wsdl");
@@ -113,7 +106,9 @@
rethrowAndHandleAuthWarning(e);
}
}
-
+
+ @Test
+ @RunAsClient
public void testMessagingClient() throws Exception
{
String reqMessage =
@@ -136,7 +131,7 @@
Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jboss.naming.remote.client.InitialContextFactory");
- env.put(Context.PROVIDER_URL, "http-remoting://" + getServerHost() +
":8080");
+ env.put(Context.PROVIDER_URL, "http-remoting://" + getServerHost() +
":" + getServerPort());
env.put(Context.SECURITY_PRINCIPAL, JBossWSTestHelper.getTestUsername());
env.put(Context.SECURITY_CREDENTIALS, JBossWSTestHelper.getTestPassword());
InitialContext context = null;
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCaseForked.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCaseForked.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCaseForked.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -31,7 +31,14 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import junit.framework.Test;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import org.apache.cxf.frontend.ClientProxy;
import org.apache.cxf.transport.jms.JMSConduit;
@@ -50,44 +57,45 @@
* @author alessio.soldano(a)jboss.com
* @since 10-Jun-2011
*/
+(a)RunWith(Arquillian.class)
public final class JMSHTTPEndpointDeploymentTestCaseForked extends JBossWSTest
{
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new
JBossWSTestHelper.WarDeployment("jaxws-cxf-jms-http-deployment.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.hornetq\n"))
- .addClass(org.jboss.test.ws.jaxws.cxf.jms_http.HelloWorld.class)
- .addClass(org.jboss.test.ws.jaxws.cxf.jms_http.HelloWorldImpl.class)
- .addClass(org.jboss.test.ws.jaxws.cxf.jms_http.HttpHelloWorldImpl.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl"),
"wsdl/HelloWorldService.wsdl")
- .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/jms_http/WEB-INF/web.xml"));
- }
- });
- list.add(new
JBossWSTestHelper.WarDeployment("jaxws-cxf-jms-http-deployment-test-servlet.war")
{ {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client
services,org.hornetq\n"))
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl"),
"classes/META-INF/wsdl/HelloWorldService.wsdl")
-
.addClass(org.jboss.test.ws.jaxws.cxf.jms_http.DeploymentTestServlet.class)
- .addClass(org.jboss.test.ws.jaxws.cxf.jms_http.HelloWorld.class);
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
- }
+ @Deployment(name="jaxws-cxf-jms-http-deployment", order=1, testable =
false)
+ public static WebArchive createDeployment1() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-cxf-jms-http-deployment.war");
+ archive
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.hornetq\n"))
+ .addClass(org.jboss.test.ws.jaxws.cxf.jms_http.HelloWorld.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.jms_http.HelloWorldImpl.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.jms_http.HttpHelloWorldImpl.class)
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl"),
"wsdl/HelloWorldService.wsdl")
+ .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/jms_http/WEB-INF/web.xml"));
+ return archive;
+ }
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(JMSHTTPEndpointDeploymentTestCaseForked.class,
JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
+ @Deployment(name="jaxws-cxf-jms-http-deployment-test-servlet", order=2,
testable = false)
+ public static WebArchive createDeployment2() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-cxf-jms-http-deployment-test-servlet.war");
+ archive
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client
services,org.hornetq\n"))
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl"),
"classes/META-INF/wsdl/HelloWorldService.wsdl")
+
.addClass(org.jboss.test.ws.jaxws.cxf.jms_http.DeploymentTestServlet.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.jms_http.HelloWorld.class);
+ return archive;
+ }
+
+ @Test
+ @RunAsClient
public void testJMSEndpointServerSide() throws Exception
{
- URL url = new URL("http://" + getServerHost() +
":8080/jaxws-cxf-jms-http-deployment-test-servlet");
+ URL url = new URL("http://" + getServerHost() + ":" +
getServerPort() + "/jaxws-cxf-jms-http-deployment-test-servlet");
assertEquals("true", IOUtils.readAndCloseStream(url.openStream()));
}
-
+
+ @Test
+ @RunAsClient
public void testJMSEndpointClientSide() throws Exception
{
URL wsdlUrl =
getResourceURL("jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl");
@@ -105,10 +113,12 @@
throw e;
}
}
-
+
+ @Test
+ @RunAsClient
public void testHTTPEndpointClientSide() throws Exception
{
- URL wsdlUrl = new URL("http://" + getServerHost() +
":8080/jaxws-cxf-jms-http-deployment?wsdl");
+ URL wsdlUrl = new URL("http://" + getServerHost() + ":" +
getServerPort() + "/jaxws-cxf-jms-http-deployment?wsdl");
QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/jms",
"HelloWorldService");
Service service = Service.create(wsdlUrl, serviceName);
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/mixtype/MixedTypeTestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/mixtype/MixedTypeTestCase.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/mixtype/MixedTypeTestCase.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -29,20 +29,28 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import junit.framework.Test;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestHelper;
import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
+(a)RunWith(Arquillian.class)
public class MixedTypeTestCase extends JBossWSTest
{
private final String targetNS = "http://org.jboss.ws.jaxws.cxf/mixtype";
-
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.WarDeployment("jaxws-cxf-mixtype.war") {
{
+
+ @Deployment(testable = false)
+ public static WebArchive createDeployments() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-cxf-mixtype.war");
archive
.addManifest()
.addClass(org.jboss.test.ws.jaxws.cxf.mixtype.EndpointOne.class)
@@ -51,29 +59,26 @@
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/mixtype/WEB-INF/jboss-web.xml"), "jboss-web.xml")
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/mixtype/WEB-INF/jbossws-cxf.xml"), "jbossws-cxf.xml")
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/mixtype/WEB-INF/web.xml"));
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(MixedTypeTestCase.class,
JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
+ @Test
+ @RunAsClient
public void testEndpoint() throws Exception
{
- URL wsdlOneURL = new URL("http://" + getServerHost() +
":8080/mixtype/jaxws-cxf-mixtype?wsdl");
+ URL wsdlOneURL = new URL("http://" + getServerHost() + ":" +
getServerPort() + "/mixtype/jaxws-cxf-mixtype?wsdl");
QName serviceOneName = new QName(targetNS, "ServiceOne");
Service serviceOne = Service.create(wsdlOneURL, serviceOneName);
EndpointOne endpoint = (EndpointOne)serviceOne.getPort(new QName(targetNS,
"EndpointOnePort"), EndpointOne.class);
assertEquals("mixedType", endpoint.echo("mixedType"));
assertEquals(1, endpoint.getCount());
}
-
+
+ @Test
+ @RunAsClient
public void testEJBEndpoint() throws Exception
{
- URL wsdlOneURL = new URL("http://" + getServerHost() +
":8080/mixtype/EJBServiceOne/EJBEndpointOne?wsdl");
+ URL wsdlOneURL = new URL("http://" + getServerHost() + ":" +
getServerPort() + "/mixtype/EJBServiceOne/EJBEndpointOne?wsdl");
QName serviceOneName = new QName(targetNS, "EJBServiceOne");
Service serviceOne = Service.create(wsdlOneURL, serviceOneName);
EndpointOne endpoint = (EndpointOne)serviceOne.getPort(new QName(targetNS,
"EJBEndpointOnePort"), EndpointOne.class);
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/webserviceref/WebServiceRefServletTestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/webserviceref/WebServiceRefServletTestCase.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/webserviceref/WebServiceRefServletTestCase.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -21,20 +21,26 @@
*/
package org.jboss.test.ws.jaxws.cxf.webserviceref;
-import java.io.File;
-import java.net.URL;
+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;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.ws.common.IOUtils;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.jboss.arquillian.container.test.api.Deployer;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
+import java.io.File;
+import java.net.URL;
-import junit.framework.Test;
-import org.jboss.ws.common.IOUtils;
-import org.jboss.wsf.test.JBossWSCXFTestSetup;
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestHelper;
-import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
-
/**
* Test @javax.xml.ws.WebServiceref with a custom CXF jaxws:client
* configuration provided through jbossws-cxf.xml file.
@@ -42,12 +48,18 @@
* @author alessio.soldano(a)jboss.com
* @since 19-Nov-2009
*/
+(a)RunWith(Arquillian.class)
public class WebServiceRefServletTestCase extends JBossWSTest
{
- public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() +
":8080/jaxws-cxf-webserviceref";
+ public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() +
":" + getServerPort() + "/jaxws-cxf-webserviceref";
- public static BaseDeployment<?> createClientDeployment() {
- return new
JBossWSTestHelper.WarDeployment("jaxws-cxf-webserviceref-servlet-client.war") {
{
+ @ArquillianResource
+ private Deployer deployer;
+
+ private static final String CLIENT_WAR
="jaxws-cxf-webserviceref-servlet-client";
+ @Deployment(name=CLIENT_WAR, testable = false, managed=false)
+ public static WebArchive createClientDeployment() {
+ WebArchive archive =
ShrinkWrap.create(WebArchive.class,"jaxws-cxf-webserviceref-servlet-client.war");
archive
.addManifest()
.addClass(org.jboss.test.ws.jaxws.cxf.webserviceref.Endpoint.class)
@@ -57,25 +69,22 @@
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/webserviceref/WEB-INF/wsdl/Endpoint.wsdl"),
"wsdl/Endpoint.wsdl")
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/webserviceref/WEB-INF-client/jbossws-cxf.xml"),
"jbossws-cxf.xml")
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/webserviceref/WEB-INF-client/web.xml"));
- }
- };
+ return archive;
}
- public static BaseDeployment<?> createServerDeployment() {
- return new JBossWSTestHelper.WarDeployment("jaxws-cxf-webserviceref.war")
{ {
+ @Deployment(name="jaxws-cxf-webserviceref", testable = false)
+ public static WebArchive createServerDeployment() {
+ WebArchive archive =
ShrinkWrap.create(WebArchive.class,"jaxws-cxf-webserviceref.war");
archive
.addManifest()
.addClass(org.jboss.test.ws.jaxws.cxf.webserviceref.EndpointImpl.class)
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/webserviceref/WEB-INF/web.xml"));
- }
- };
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(WebServiceRefServletTestCase.class,
JBossWSTestHelper.writeToFile(createServerDeployment()));
- }
-
+ @Test
+ @RunAsClient
+ @OperateOnDeployment("jaxws-cxf-webserviceref")
public void testDynamicProxy() throws Exception
{
URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
@@ -88,10 +97,11 @@
assertEquals(helloWorld, retObj);
}
+ @Test
+ @RunAsClient
public void testServletClient() throws Exception
{
- final String clientDepName =
JBossWSTestHelper.writeToFile(createClientDeployment());
- deploy(clientDepName);
+ deployer.deploy(CLIENT_WAR);
try
{
URL url = new URL(TARGET_ENDPOINT_ADDRESS +
"-servlet-client?echo=HelloWorld");
@@ -99,7 +109,7 @@
}
finally
{
- undeploy(clientDepName);
+ deployer.undeploy(CLIENT_WAR);
}
}
}
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocTestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocTestCase.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocTestCase.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -21,39 +21,66 @@
*/
package org.jboss.test.ws.jaxws.cxf.wsrm;
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-
-import junit.framework.Test;
-
import org.apache.cxf.endpoint.Client;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.ws.common.DOMUtils;
-import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import org.w3c.dom.Element;
+import org.jboss.wsf.test.JBossWSTestHelper;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import java.net.URL;
+import java.io.File;
+
/**
* Test the CXF WS-ReliableMessaging
*
* @author Thomas.Diesler(a)jboss.org
* @since 12-Dec-2007
*/
+(a)RunWith(Arquillian.class)
public class BasicDocTestCase extends JBossWSTest
{
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(BasicDocTestCase.class,
DeploymentArchives.DOC_SERVER + " " + DeploymentArchives.CLIENT);
+ @Deployment(name="jaxws-cxf-wsrm-basic-doc", order=1, testable = false)
+ public static WebArchive createDocServerDeployment() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-cxf-wsrm-basic-doc.war");
+ archive
+ .addManifest()
+ .addClass(org.jboss.test.ws.jaxws.cxf.wsrm.BasicDocEndpoint.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.wsrm.BasicDocEndpointImpl.class)
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/wsrm/basic-doc/WEB-INF/jbossws-cxf.xml"),
"jbossws-cxf.xml")
+ .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/wsrm/basic-doc/WEB-INF/web.xml"));
+ return archive;
}
+ @Deployment(name = "jaxws-cxf-wsrm-basic-client", order=2, testable =
false)
+ public static JavaArchive createClientDeployment() {
+ JavaArchive archive = ShrinkWrap.create(JavaArchive.class,
"jaxws-cxf-wsrm-basic-client.jar");
+ archive
+ .addManifest()
+ .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/wsrm/cxf.xml"), "cxf.xml");
+ return archive;
+ }
+
+ @Test
+ @RunAsClient
public void testWSDLAccess() throws Exception
{
- URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-cxf-wsrm-basic-doc?wsdl");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":" +
getServerPort() + "/jaxws-cxf-wsrm-basic-doc?wsdl");
Element wsdl = DOMUtils.parse(wsdlURL.openStream());
assertNotNull(wsdl);
}
+ @Test
+ @RunAsClient
public void testClient() throws Exception
{
URL wsdlURL =
getResourceURL("jaxws/cxf/wsrm/basic-doc/wsrm-basic-doc.wsdl");
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCTestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCTestCase.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCTestCase.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -21,39 +21,66 @@
*/
package org.jboss.test.ws.jaxws.cxf.wsrm;
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-
-import junit.framework.Test;
-
import org.apache.cxf.endpoint.Client;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.ws.common.DOMUtils;
-import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import org.w3c.dom.Element;
+import org.jboss.wsf.test.JBossWSTestHelper;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import java.net.URL;
+import java.io.File;
+
/**
* Test the CXF WS-ReliableMessaging
*
* @author Thomas.Diesler(a)jboss.org
* @since 12-Dec-2007
*/
+(a)RunWith(Arquillian.class)
public class BasicRPCTestCase extends JBossWSTest
{
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(BasicRPCTestCase.class,
DeploymentArchives.RPC_SERVER + " " + DeploymentArchives.CLIENT);
+ @Deployment(name="jaxws-cxf-wsrm-basic-rpc", order=1, testable = false)
+ public static WebArchive createRpcServerDeployment() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-cxf-wsrm-basic-rpc.war");
+ archive
+ .addManifest()
+ .addClass(org.jboss.test.ws.jaxws.cxf.wsrm.BasicRPCEndpoint.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.wsrm.BasicRPCEndpointImpl.class)
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/wsrm/basic-rpc/WEB-INF/jbossws-cxf.xml"),
"jbossws-cxf.xml")
+ .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/wsrm/basic-rpc/WEB-INF/web.xml"));
+ return archive;
}
+ @Deployment(name = "jaxws-cxf-wsrm-basic-client", order=2, testable =
false)
+ public static JavaArchive createClientDeployment() {
+ JavaArchive archive = ShrinkWrap.create(JavaArchive.class,
"jaxws-cxf-wsrm-basic-client.jar");
+ archive
+ .addManifest()
+ .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/wsrm/cxf.xml"), "cxf.xml");
+ return archive;
+ }
+
+ @Test
+ @RunAsClient
public void testWSDLAccess() throws Exception
{
- URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-cxf-wsrm-basic-rpc?wsdl");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":" +
getServerPort() + "/jaxws-cxf-wsrm-basic-rpc?wsdl");
Element wsdl = DOMUtils.parse(wsdlURL.openStream());
assertNotNull(wsdl);
}
+ @Test
+ @RunAsClient
public void testClient() throws Exception
{
URL wsdlURL =
getResourceURL("jaxws/cxf/wsrm/basic-rpc/wsrm-basic-rpc.wsdl");
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/DeploymentArchives.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/DeploymentArchives.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/DeploymentArchives.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -27,7 +27,8 @@
public final class DeploymentArchives
{
- public static final String RPC_SERVER = JBossWSTestHelper.writeToFile(new
JBossWSTestHelper.WarDeployment("jaxws-cxf-wsrm-basic-rpc.war") { {
+ public static final String RPC_SERVER =
+ JBossWSTestHelper.writeToFile(new
JBossWSTestHelper.WarDeployment("jaxws-cxf-wsrm-basic-rpc.war") { {
archive
.addManifest()
.addClass(org.jboss.test.ws.jaxws.cxf.wsrm.BasicRPCEndpoint.class)
@@ -36,7 +37,7 @@
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/wsrm/basic-rpc/WEB-INF/web.xml"));
}
});
-
+
public static final String DOC_SERVER = JBossWSTestHelper.writeToFile(new
JBossWSTestHelper.WarDeployment("jaxws-cxf-wsrm-basic-doc.war") { {
archive
.addManifest()
@@ -46,7 +47,7 @@
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/wsrm/basic-doc/WEB-INF/web.xml"));
}
});
-
+
public static final String CLIENT = JBossWSTestHelper.writeToFile(new
JBossWSTestHelper.JarDeployment("jaxws-cxf-wsrm-basic-client.jar") { {
archive
.addManifest()
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/SimpleServiceTestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/SimpleServiceTestCase.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/SimpleServiceTestCase.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -29,7 +29,15 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import junit.framework.Test;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import org.apache.cxf.endpoint.Client;
import org.jboss.test.ws.jaxws.samples.wsrm.generated.SimpleService;
@@ -43,36 +51,33 @@
*
* @author richard.opalka(a)jboss.com
*/
+(a)RunWith(Arquillian.class)
public final class SimpleServiceTestCase extends JBossWSTest
{
- private final String serviceURL = "http://" + getServerHost() +
":8080/jaxws-samples-wsrm/SimpleService";
+ private final String serviceURL = "http://" + getServerHost() +
":" + getServerPort() + "/jaxws-samples-wsrm/SimpleService";
private SimpleService proxy;
-
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.WarDeployment("jaxws-samples-wsrm.war") {
{
- archive
- .addManifest()
-
.addClass(org.jboss.test.ws.jaxws.samples.wsrm.service.SimpleServiceImpl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsrm.service.jaxws.Echo.class)
-
.addClass(org.jboss.test.ws.jaxws.samples.wsrm.service.jaxws.EchoResponse.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsrm.service.jaxws.Ping.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsrm/WEB-INF/wsdl/SimpleService.wsdl"),
"wsdl/SimpleService.wsdl")
- .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsrm/WEB-INF/web.xml"));
- }
- });
- list.add(new
JBossWSTestHelper.JarDeployment("jaxws-samples-wsrm-client.jar") { {
- archive
- .addManifest()
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsrm/cxf.xml"), "cxf.xml");
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+
+ @Deployment(name = "jaxws-samples-wsrm", order = 1, testable = false)
+ public static WebArchive createDeployment1() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-samples-wsrm.war");
+ archive
+ .addManifest()
+ .addClass(org.jboss.test.ws.jaxws.samples.wsrm.service.SimpleServiceImpl.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsrm.service.jaxws.Echo.class)
+
.addClass(org.jboss.test.ws.jaxws.samples.wsrm.service.jaxws.EchoResponse.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsrm.service.jaxws.Ping.class)
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsrm/WEB-INF/wsdl/SimpleService.wsdl"),
"wsdl/SimpleService.wsdl")
+ .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsrm/WEB-INF/web.xml"));
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(SimpleServiceTestCase.class,
JBossWSTestHelper.writeToFile(createDeployments()));
+ @Deployment(name = "jaxws-samples-wsrm-client", order = 2, testable =
false)
+ public static JavaArchive createDeployment2() {
+ JavaArchive archive = ShrinkWrap.create(JavaArchive.class,
"jaxws-samples-wsrm-client.jar");
+ archive
+ .addManifest()
+ .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsrm/cxf.xml"), "cxf.xml");
+ return archive;
}
@Override
@@ -94,6 +99,8 @@
}
}
+ @Test
+ @RunAsClient
public void test() throws Exception
{
assertEquals("Hello World!", proxy.echo("Hello World!")); //
request responce call
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -32,7 +32,15 @@
import javax.xml.ws.Service;
import javax.xml.ws.soap.SOAPFaultException;
-import junit.framework.Test;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import org.apache.cxf.binding.soap.saaj.SAAJInInterceptor;
import org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor;
@@ -53,13 +61,14 @@
* @author alessio.soldano(a)jboss.com
* @since 29-May-2008
*/
+(a)RunWith(Arquillian.class)
public final class SignEncryptTestCase extends JBossWSTest
{
- private final String serviceURL = "http://" + getServerHost() +
":8080/jaxws-samples-wsse-sign-encrypt";
-
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new
JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-sign-encrypt.war") { {
+ private final String serviceURL = "http://" + getServerHost() +
":" + getServerPort() + "/jaxws-samples-wsse-sign-encrypt";
+
+ @Deployment(name="jaxws-samples-wsse-sign-encrypt", order=1, testable =
false)
+ public static WebArchive createDeployment1() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-samples-wsse-sign-encrypt.war");
archive
.setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ "Dependencies: org.apache.ws.security\n"))
@@ -76,23 +85,21 @@
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/sign-encrypt/WEB-INF/wsdl/SecurityService.wsdl"),
"wsdl/SecurityService.wsdl")
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/sign-encrypt/WEB-INF/wsdl/SecurityService_schema1.xsd"),
"wsdl/SecurityService_schema1.xsd")
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/sign-encrypt/WEB-INF/web.xml"));
- }
- });
- list.add(new
JBossWSTestHelper.JarDeployment("jaxws-samples-wsse-sign-encrypt-client.jar") {
{
+ return archive;
+ }
+
+ @Deployment(name="jaxws-samples-wsse-sign-encrypt-client", order=2, testable
= false)
+ public static JavaArchive createDeployment2() {
+ JavaArchive archive =
ShrinkWrap.create(JavaArchive.class,("jaxws-samples-wsse-sign-encrypt-client.jar"));
archive
.addManifest()
.addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/sign-encrypt/META-INF/alice.jks"), "alice.jks")
.addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/sign-encrypt/META-INF/alice.properties"),
"alice.properties");
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(SignEncryptTestCase.class,
JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
+ @Test
+ @RunAsClient
public void test() throws Exception
{
QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wssecurity",
"SecurityService");
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignTestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignTestCase.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignTestCase.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -31,7 +31,15 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import junit.framework.Test;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import org.apache.cxf.binding.soap.saaj.SAAJInInterceptor;
import org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor;
@@ -52,21 +60,25 @@
* @author alessio.soldano(a)jboss.com
* @since 28-May-2008
*/
+(a)RunWith(Arquillian.class)
public final class SignTestCase extends JBossWSTest
{
- private final String serviceURL = "http://" + getServerHost() +
":8080/jaxws-samples-wsse-sign";
-
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new
JBossWSTestHelper.JarDeployment("jaxws-samples-wsse-sign-client.jar") { {
+ private final String serviceURL = "http://" + getServerHost() +
":" + getServerPort() + "/jaxws-samples-wsse-sign";
+
+ @Deployment(name = "jaxws-samples-wsse-sign-client", order = 1, testable =
false)
+ public static WebArchive createJarDeployment() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-samples-wsse-sign-client.jar");
+ archive
+ .addManifest()
+ .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/sign/META-INF/alice.jks"), "alice.jks")
+ .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/sign/META-INF/alice.properties"),
"alice.properties");
+ return archive;
+ }
+
+ @Deployment(name="jaxws-samples-wsse-sign", order=2, testable = false)
+ public static WebArchive createDeployment2() {
+ WebArchive archive =
ShrinkWrap.create(WebArchive.class,"jaxws-samples-wsse-sign.war");
archive
- .addManifest()
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/sign/META-INF/alice.jks"), "alice.jks")
- .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/sign/META-INF/alice.properties"),
"alice.properties");
- }
- });
- list.add(new
JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-sign.war") { {
- archive
.setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ "Dependencies: org.apache.ws.security\n"))
.addClass(org.jboss.test.ws.jaxws.samples.wsse.KeystorePasswordCallback.class)
@@ -82,16 +94,11 @@
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/sign/WEB-INF/wsdl/SecurityService.wsdl"),
"wsdl/SecurityService.wsdl")
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/sign/WEB-INF/wsdl/SecurityService_schema1.xsd"),
"wsdl/SecurityService_schema1.xsd")
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/sign/WEB-INF/web.xml"));
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(SignTestCase.class,
JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
+ @Test
+ @RunAsClient
public void test() throws Exception
{
QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wssecurity",
"SecurityService");
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationTestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationTestCase.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationTestCase.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -31,7 +31,14 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import junit.framework.Test;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor;
import org.apache.cxf.endpoint.Client;
@@ -49,44 +56,40 @@
* @author Sergey Beryozkin
*
*/
+(a)RunWith(Arquillian.class)
public final class UsernameAuthorizationTestCase extends JBossWSTest
{
- private final String serviceURL = "http://" + getServerHost() +
":8080/jaxws-samples-wsse-username-authorize/default-config";
+ private final String serviceURL = "http://" + getServerHost() +
":" + getServerPort() +
"/jaxws-samples-wsse-username-authorize/default-config";
private final QName servicePort = new
QName("http://www.jboss.org/jbossws/ws-extensions/wssecurity",
"SecurityServicePort");
-
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new
JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-username-authorize.war") {
{
- archive
- .addManifest()
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.ServiceIface.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.jaxws.GreetMe.class)
-
.addClass(org.jboss.test.ws.jaxws.samples.wsse.jaxws.GreetMeResponse.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.jaxws.SayHello.class)
-
.addClass(org.jboss.test.ws.jaxws.samples.wsse.jaxws.SayHelloResponse.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/username-authorize/WEB-INF/jboss-web.xml"),
"jboss-web.xml")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/username-authorize/WEB-INF/jbossws-cxf.xml"),
"jbossws-cxf.xml")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/username-authorize/WEB-INF/wsdl/SecurityService.wsdl"),
"wsdl/SecurityService.wsdl")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/username-authorize/WEB-INF/wsdl/SecurityService_schema1.xsd"),
"wsdl/SecurityService_schema1.xsd")
- .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/username-authorize/WEB-INF/web.xml"));
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
- }
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(UsernameAuthorizationTestCase.class,
JBossWSTestHelper.writeToFile(createDeployments()), true);
+ @Deployment(testable = false)
+ public static WebArchive createDeployments() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-samples-wsse-username-authorize.war");
+ archive
+ .addManifest()
+ .addClass(org.jboss.test.ws.jaxws.samples.wsse.ServiceIface.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsse.jaxws.GreetMe.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsse.jaxws.GreetMeResponse.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsse.jaxws.SayHello.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsse.jaxws.SayHelloResponse.class)
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/username-authorize/WEB-INF/jboss-web.xml"),
"jboss-web.xml")
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/username-authorize/WEB-INF/jbossws-cxf.xml"),
"jbossws-cxf.xml")
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/username-authorize/WEB-INF/wsdl/SecurityService.wsdl"),
"wsdl/SecurityService.wsdl")
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/username-authorize/WEB-INF/wsdl/SecurityService_schema1.xsd"),
"wsdl/SecurityService_schema1.xsd")
+ .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/username-authorize/WEB-INF/web.xml"));
+ return archive;
}
+ @Test
+ @RunAsClient
public void testAuthorized() throws Exception
{
doTestAuthorized(serviceURL, servicePort, "kermit");
}
-private void doTestAuthorized(String endpointAddress, QName portName, String userName)
throws Exception
+ private void doTestAuthorized(String endpointAddress, QName portName, String userName)
throws Exception
{
QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wssecurity",
"SecurityService");
URL wsdlURL = new URL(endpointAddress + "?wsdl");
@@ -96,6 +99,8 @@
assertEquals("Secure Hello World!", proxy.sayHello());
}
+ @Test
+ @RunAsClient
public void testUnauthenticated() throws Exception
{
QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wssecurity",
"SecurityService");
@@ -114,6 +119,8 @@
}
}
+ @Test
+ @RunAsClient
public void testUnauthorized() throws Exception
{
doTestUnauthorized(serviceURL, servicePort, "kermit");
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameDeploymentArchives.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameDeploymentArchives.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameDeploymentArchives.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -23,44 +23,39 @@
import java.io.File;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.wsf.test.JBossWSTestHelper;
public final class UsernameDeploymentArchives
{
- public static String SERVER_WAR = JBossWSTestHelper.writeToFile(new
JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-username.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.apache.ws.security\n"))
-
.addClass(org.jboss.test.ws.jaxws.samples.wsse.ServerUsernamePasswordCallback.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.ServiceIface.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.jaxws.GreetMe.class)
-
.addClass(org.jboss.test.ws.jaxws.samples.wsse.jaxws.GreetMeResponse.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.jaxws.SayHello.class)
-
.addClass(org.jboss.test.ws.jaxws.samples.wsse.jaxws.SayHelloResponse.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/username/WEB-INF/jbossws-cxf.xml"),
"jbossws-cxf.xml")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/username/WEB-INF/wsdl/SecurityService.wsdl"),
"wsdl/SecurityService.wsdl")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/username/WEB-INF/wsdl/SecurityService_schema1.xsd"),
"wsdl/SecurityService_schema1.xsd")
- .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/username/WEB-INF/web.xml"));
- }
- });
- public static String CLIENT_WAR = JBossWSTestHelper.writeToFile(new
JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-username-client.war") { {
- archive
- .setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies:
org.apache.ws.security,org.jboss.ws.cxf.jbossws-cxf-client
services,org.apache.cxf.impl\n"))
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.ServiceIface.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.UsernameHelper.class)
-
.addClass(org.jboss.test.ws.jaxws.samples.wsse.UsernamePasswordCallback.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.jaxws.GreetMe.class)
-
.addClass(org.jboss.test.ws.jaxws.samples.wsse.jaxws.GreetMeResponse.class)
- .addClass(org.jboss.test.ws.jaxws.samples.wsse.jaxws.SayHello.class)
-
.addClass(org.jboss.test.ws.jaxws.samples.wsse.jaxws.SayHelloResponse.class)
- .addClass(org.jboss.wsf.test.ClientHelper.class)
- .addClass(org.jboss.wsf.test.TestServlet.class);
- }
- });
-
+ public static WebArchive createServerwar() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-samples-wsse-username.war");
+ archive
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.apache.ws.security\n"))
+
.addClass(org.jboss.test.ws.jaxws.samples.wsse.ServerUsernamePasswordCallback.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsse.ServiceIface.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsse.jaxws.GreetMe.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsse.jaxws.GreetMeResponse.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsse.jaxws.SayHello.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsse.jaxws.SayHelloResponse.class)
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/username/WEB-INF/jbossws-cxf.xml"),
"jbossws-cxf.xml")
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/username/WEB-INF/wsdl/SecurityService.wsdl"),
"wsdl/SecurityService.wsdl")
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/username/WEB-INF/wsdl/SecurityService_schema1.xsd"),
"wsdl/SecurityService_schema1.xsd")
+ .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/username/WEB-INF/web.xml"));
+ return archive;
+ }
+
private UsernameDeploymentArchives() {
//NOOP
}
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameServletTestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameServletTestCase.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameServletTestCase.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -23,11 +23,19 @@
import java.net.URL;
-import junit.framework.Test;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import org.jboss.ws.common.IOUtils;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
/**
* WS-Security username test case
@@ -37,16 +45,39 @@
*/
public final class UsernameServletTestCase extends JBossWSTest
{
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(UsernameServletTestCase.class,
UsernameDeploymentArchives.SERVER_WAR + " " +
UsernameDeploymentArchives.CLIENT_WAR);
+
+ @Deployment(name="jaxws-samples-wsse-username", order=1, testable = false)
//SERVER_WAR
+ public static WebArchive createServerwar() {
+ return UsernameDeploymentArchives.createServerwar();
}
+ @Deployment(name="jaxws-samples-wsse-username-client", order=2, testable =
false)
+ public static WebArchive createClientWar() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-samples-wsse-username-client.war");
+ archive
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies:
org.apache.ws.security,org.jboss.ws.cxf.jbossws-cxf-client
services,org.apache.cxf.impl\n"))
+ .addClass(org.jboss.test.ws.jaxws.samples.wsse.ServiceIface.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsse.UsernameHelper.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsse.UsernamePasswordCallback.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsse.jaxws.GreetMe.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsse.jaxws.GreetMeResponse.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsse.jaxws.SayHello.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsse.jaxws.SayHelloResponse.class)
+ .addClass(org.jboss.wsf.test.ClientHelper.class)
+ .addClass(org.jboss.wsf.test.TestServlet.class);
+ return archive;
+ }
+
+ @Test
+ @RunAsClient
public void test() throws Exception
{
assertEquals("1", runTestInContainer("test"));
}
-
+
+ @Test
+ @RunAsClient
public void testWrongPassword() throws Exception
{
assertEquals("1", runTestInContainer("testWrongPassword"));
@@ -54,8 +85,8 @@
private String runTestInContainer(String test) throws Exception
{
- URL url = new URL("http://" + getServerHost()
- +
":8080/jaxws-samples-wsse-username-client?path=/jaxws-samples-wsse-username&method="
+ test
+ URL url = new URL("http://" + getServerHost() + ":" +
getServerPort()
+ +
"/jaxws-samples-wsse-username-client?path=/jaxws-samples-wsse-username&method="
+ test
+ "&helper=" + UsernameHelper.class.getName());
return IOUtils.readAndCloseStream(url.openStream());
}
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameTestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameTestCase.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameTestCase.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -28,7 +28,14 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import junit.framework.Test;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor;
import org.apache.cxf.endpoint.Client;
@@ -44,15 +51,18 @@
* @author alessio.soldano(a)jboss.com
* @since 28-May-2008
*/
+(a)RunWith(Arquillian.class)
public final class UsernameTestCase extends JBossWSTest
{
- private final String serviceURL = "http://" + getServerHost() +
":8080/jaxws-samples-wsse-username";
-
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(UsernameTestCase.class,
UsernameDeploymentArchives.SERVER_WAR);
+ private final String serviceURL = "http://" + getServerHost() +
":" + getServerPort() + "/jaxws-samples-wsse-username";
+
+ @Deployment(testable = false) //SERVER_WAR
+ public static WebArchive createServerwar() {
+ return UsernameDeploymentArchives.createServerwar();
}
+ @Test
+ @RunAsClient
public void test() throws Exception
{
QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wssecurity",
"SecurityService");
@@ -62,7 +72,9 @@
setupWsse(proxy, "kermit");
assertEquals("Secure Hello World!", proxy.sayHello());
}
-
+
+ @Test
+ @RunAsClient
public void testWrongPassword() throws Exception
{
QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wssecurity",
"SecurityService");
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/KerberosTestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/KerberosTestCase.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/KerberosTestCase.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -31,7 +31,15 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import junit.framework.Test;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.endpoint.Endpoint;
@@ -85,18 +93,18 @@
</pre>
* Run this test with command : <pre>mvn clean install
-Ptestsuite,wildfly800,spring -Dtest=KerberosTestCase
*
-Djava.security.auth.login.config=modules/testsuite/cxf-spring-tests/target/test-resources/jaxws/samples/wsse/kerberos/kerberos.jaas</pre>
- */
-
+ */
+(a)RunWith(Arquillian.class)
public class KerberosTestCase extends JBossWSTest
{
private static final String namespace =
"http://www.example.org/contract/DoubleIt";
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new
JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-kerberos.war") { {
+ @Deployment(name="jaxws-samples-wsse-kerberos", order=1, testable = false)
+ public static WebArchive createDeployment1() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-samples-wsse-kerberos.war");
archive
.setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ "Dependencies: org.apache.ws.security\n"))
@@ -114,9 +122,12 @@
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/kerberos/WEB-INF/wsdl/DoubleItKerberos.wsdl"),
"wsdl/DoubleItKerberos.wsdl")
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/kerberos/WEB-INF/wsdl/DoubleItLogical.wsdl"),
"wsdl/DoubleItLogical.wsdl")
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/kerberos/WEB-INF/web.xml"));
- }
- });
- list.add(new
JBossWSTestHelper.JarDeployment("jaxws-samples-wsse-kerberos-client.jar") { {
+ return archive;
+ }
+
+ @Deployment(name="jaxws-samples-wsse-kerberos-client", order=2, testable =
false)
+ public static JavaArchive createDeployment2() {
+ JavaArchive archive =
ShrinkWrap.create(JavaArchive.class,"jaxws-samples-wsse-kerberos-client.jar");
archive
.addManifest()
.addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/kerberos//cxf.xml"), "cxf.xml")
@@ -124,11 +135,9 @@
.addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/kerberos/META-INF/alice.properties"),
"alice.properties")
.addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/kerberos/META-INF/bob.jks"), "bob.jks")
.addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/kerberos/META-INF/bob.properties"),
"bob.properties");
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
-
+ /**
public static Test suite()
{
JBossWSCXFTestSetup testSetup;
@@ -141,10 +150,12 @@
return testSetup;
}
-
+ ***/
+ @Test
+ @RunAsClient
public void testKerberosSupport() throws Exception
{
- String serviceURL = "http://" + getServerHost() +
":8080/jaxws-samples-wsse-kerberos/DoubleItKerberosSupport";
+ String serviceURL = "http://" + getServerHost() + ":" +
getServerPort() + "/jaxws-samples-wsse-kerberos/DoubleItKerberosSupport";
QName servicePort = new QName(namespace,
"DoubleItKerberosSupportingPort");
QName serviceName = new QName(namespace, "DoubleItService");
@@ -154,11 +165,16 @@
setupKerberosSupport(proxy);
assertEquals(20, proxy.doubleIt(10));
}
-
-
+
+
+ @Test
+ @RunAsClient
public void testKerberosTransport() throws Exception
{
- String serviceURL = "https://" + getServerHost() +
":8443/jaxws-samples-wsse-kerberos/DoubleItKerberosTransport";
+ final int serverPort = getServerPort();
+ final int serverSecurePort = serverPort + 363; //8080 + 363 = 8443
+
+ String serviceURL = "https://" + getServerHost() + ":" +
serverSecurePort + "/jaxws-samples-wsse-kerberos/DoubleItKerberosTransport";
QName servicePort = new QName(namespace,
"DoubleItKerberosTransportPort");
QName serviceName = new QName(namespace, "DoubleItService");
URL wsdlURL = new URL(serviceURL + "?wsdl");
@@ -167,11 +183,13 @@
setupKerberosTransport(proxy);
assertEquals(20, proxy.doubleIt(10));
}
-
-
+
+
+ @Test
+ @RunAsClient
public void testKerberosSymmetricSupporting() throws Exception
{
- String serviceURL = "http://" + getServerHost() +
":8080/jaxws-samples-wsse-kerberos/DoubleItKerberosOverSymmetricSupporting";
+ String serviceURL = "http://" + getServerHost() + ":" +
getServerPort() +
"/jaxws-samples-wsse-kerberos/DoubleItKerberosOverSymmetricSupporting";
QName servicePort = new QName(namespace,
"DoubleItKerberosSymmetricSupportingPort");
QName serviceName = new QName(namespace, "DoubleItService");
URL wsdlURL = new URL(serviceURL + "?wsdl");
@@ -180,11 +198,13 @@
setupSymmetricSupporting(proxy);
assertEquals(20, proxy.doubleIt(10));
}
-
-
+
+
+ @Test
+ @RunAsClient
public void testKerberosAsymmetric() throws Exception
{
- String serviceURL = "http://" + getServerHost() +
":8080/jaxws-samples-wsse-kerberos/DoubleItKerberosAsymmetric";
+ String serviceURL = "http://" + getServerHost() + ":" +
getServerPort() + "/jaxws-samples-wsse-kerberos/DoubleItKerberosAsymmetric";
QName servicePort = new QName(namespace,
"DoubleItKerberosAsymmetricPort");
QName serviceName = new QName(namespace, "DoubleItService");
URL wsdlURL = new URL(serviceURL + "?wsdl");
@@ -193,10 +213,12 @@
setupAsymmetric(proxy);
assertEquals(20, proxy.doubleIt(10));
}
-
+
+ @Test
+ @RunAsClient
public void testKerberosOverAsymmetricSignedEncrypted() throws Exception
{
- String serviceURL = "http://" + getServerHost() +
":8080/jaxws-samples-wsse-kerberos/DoubleItKerberosOverAsymmetricSignedEncrypted";
+ String serviceURL = "http://" + getServerHost() + ":" +
getServerPort() +
"/jaxws-samples-wsse-kerberos/DoubleItKerberosOverAsymmetricSignedEncrypted";
QName servicePort = new QName(namespace,
"DoubleItKerberosAsymmetricSignedEncryptedPort");
QName serviceName = new QName(namespace, "DoubleItService");
URL wsdlURL = new URL(serviceURL + "?wsdl");
@@ -205,10 +227,12 @@
setupAsymmetricSignedEncrypted(proxy);
assertEquals(20, proxy.doubleIt(10));
}
-
+
+ @Test
+ @RunAsClient
public void testKerberosKerberosSymmetric() throws Exception
{
- String serviceURL = "http://" + getServerHost() +
":8080/jaxws-samples-wsse-kerberos/DoubleItKerberosSymmetric";
+ String serviceURL = "http://" + getServerHost() + ":" +
getServerPort() + "/jaxws-samples-wsse-kerberos/DoubleItKerberosSymmetric";
QName servicePort = new QName(namespace,
"DoubleItKerberosSymmetricPort");
QName serviceName = new QName(namespace, "DoubleItService");
URL wsdlURL = new URL(serviceURL + "?wsdl");
@@ -230,7 +254,7 @@
client.getBus().getFeatures().add(new LoggingFeature());
client.getBus().getFeatures().add(new WSPolicyFeature());
- KerberosClient kerberosClient = new KerberosClient(client.getBus());
+ KerberosClient kerberosClient = new KerberosClient();
kerberosClient.setServiceName("bob(a)service.ws.apache.org");
kerberosClient.setContextName("alice");
cxfEndpoint.put("ws-security.kerberos.client", kerberosClient);
@@ -248,7 +272,7 @@
client.getBus().getFeatures().add(new LoggingFeature());
client.getBus().getFeatures().add(new WSPolicyFeature());
- KerberosClient kerberosClient = new KerberosClient(client.getBus());
+ KerberosClient kerberosClient = new KerberosClient();
kerberosClient.setServiceName("bob(a)service.ws.apache.org");
kerberosClient.setContextName("alice");
cxfEndpoint.put("ws-security.kerberos.client", kerberosClient);
@@ -263,7 +287,7 @@
client.getBus().getFeatures().add(new LoggingFeature());
client.getBus().getFeatures().add(new WSPolicyFeature());
- KerberosClient kerberosClient = new KerberosClient(client.getBus());
+ KerberosClient kerberosClient = new KerberosClient();
kerberosClient.setServiceName("bob(a)service.ws.apache.org");
kerberosClient.setContextName("alice");
cxfEndpoint.put("ws-security.kerberos.client", kerberosClient);
@@ -275,7 +299,7 @@
Endpoint cxfEndpoint = client.getEndpoint();
client.getBus().getFeatures().add(new LoggingFeature());
client.getBus().getFeatures().add(new WSPolicyFeature());
- KerberosClient kerberosClient = new KerberosClient(client.getBus());
+ KerberosClient kerberosClient = new KerberosClient();
kerberosClient.setServiceName("bob(a)service.ws.apache.org");
kerberosClient.setContextName("alice");
cxfEndpoint.put("ws-security.kerberos.client", kerberosClient);
@@ -290,7 +314,7 @@
client.getBus().getFeatures().add(new LoggingFeature());
client.getBus().getFeatures().add(new WSPolicyFeature());
- KerberosClient kerberosClient = new KerberosClient(client.getBus());
+ KerberosClient kerberosClient = new KerberosClient();
kerberosClient.setServiceName("bob(a)service.ws.apache.org");
kerberosClient.setContextName("alice");
cxfEndpoint.put("ws-security.kerberos.client", kerberosClient);
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseDigest/UsernameDigestTestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseDigest/UsernameDigestTestCase.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseDigest/UsernameDigestTestCase.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -31,7 +31,14 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import junit.framework.Test;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor;
import org.apache.cxf.endpoint.Client;
@@ -51,15 +58,16 @@
* @author Sergey Beryozkin
*
*/
+(a)RunWith(Arquillian.class)
public final class UsernameDigestTestCase extends JBossWSTest
{
- private final String serviceURL = "http://" + getServerHost() +
":8080/jaxws-samples-wsse-username-digest";
+ private final String serviceURL = "http://" + getServerHost() +
":" + getServerPort()+ "/jaxws-samples-wsse-username-digest";
private final QName servicePort = new
QName("http://www.jboss.org/jbossws/ws-extensions/wssecurity",
"SecurityServicePort");
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new
JBossWSTestHelper.WarDeployment("jaxws-samples-wsse-username-digest.war") { {
+ @Deployment(testable = false)
+ public static WebArchive createDeployment1() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-samples-wsse-username-digest.war");
archive
.setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ "Dependencies: org.jboss.ws.cxf.jbossws-cxf-server\n"))
@@ -75,11 +83,10 @@
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/username-digest/WEB-INF/wsdl/SecurityService.wsdl"),
"wsdl/SecurityService.wsdl")
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/username-digest/WEB-INF/wsdl/SecurityService_schema1.xsd"),
"wsdl/SecurityService_schema1.xsd")
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsse/username-digest/WEB-INF/web.xml"));
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
+ /***
public static Test suite()
{
JBossWSCXFTestSetup testSetup;
@@ -99,7 +106,9 @@
testSetup.addSecurityDomainRequirement("JBossWSDigest",
authenticationOptions);
return testSetup;
}
-
+ ***/
+ @Test
+ @RunAsClient
public void testAuthorized() throws Exception
{
doTestAuthorized(serviceURL, servicePort, "kermit");
@@ -115,6 +124,8 @@
assertEquals("Secure Hello World!", proxy.sayHello());
}
+ @Test
+ @RunAsClient
public void testUnauthenticated() throws Exception
{
QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wssecurity",
"SecurityService");
@@ -133,6 +144,8 @@
}
}
+ @Test
+ @RunAsClient
public void testUnauthorized() throws Exception
{
doTestUnauthorized(serviceURL, servicePort, "kermit");
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseEJB/WsseEjbTestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseEJB/WsseEjbTestCase.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseEJB/WsseEjbTestCase.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -31,7 +31,14 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import junit.framework.Test;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor;
import org.apache.cxf.endpoint.Client;
@@ -48,13 +55,14 @@
*
* @author sberyozk(a)jredhat.com
*/
+(a)RunWith(Arquillian.class)
public class WsseEjbTestCase extends JBossWSTest
{
- public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() +
":8080/jaxws-samples-wsseEJB/EjbEndpointService/EjbEndpoint";
+ public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() +
":" + getServerPort() +
"/jaxws-samples-wsseEJB/EjbEndpointService/EjbEndpoint";
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.JarDeployment("jaxws-samples-wsseEJB.jar")
{ {
+ @Deployment(testable = false)
+ public static WebArchive createDeployments() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-samples-wsseEJB.jar");
archive
.addManifest()
.addClass(org.jboss.test.ws.jaxws.samples.wsseEJB.EjbEndpoint.class)
@@ -66,16 +74,9 @@
.addClass(org.jboss.test.ws.jaxws.samples.wsseEJB.UsernamePasswordCallback.class)
.addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsseEJB/META-INF/jboss.xml"), "jboss.xml")
.addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wsseEJB/META-INF/jbossws-cxf.xml"),
"jbossws-cxf.xml");
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(WsseEjbTestCase.class,
JBossWSTestHelper.writeToFile(createDeployments()), true);
- }
-
private EjbEndpoint getPort() throws Exception
{
URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
@@ -84,6 +85,8 @@
return port;
}
+ @Test
+ @RunAsClient
public void testHello() throws Exception
{
EjbEndpoint proxy = getPort();
@@ -92,6 +95,8 @@
assertEquals("hello", retObj);
}
+ @Test
+ @RunAsClient
public void testGreetMeUnauthorized() throws Exception
{
EjbEndpoint proxy = getPort();
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/SignEncryptTestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/SignEncryptTestCase.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/SignEncryptTestCase.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -31,7 +31,15 @@
import javax.xml.ws.Service;
import javax.xml.ws.soap.SOAPFaultException;
-import junit.framework.Test;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import org.apache.cxf.ws.security.SecurityConstants;
import org.jboss.shrinkwrap.api.asset.StringAsset;
@@ -46,11 +54,12 @@
* @author alessio.soldano(a)jboss.com
* @since 1-May-2009
*/
+(a)RunWith(Arquillian.class)
public final class SignEncryptTestCase extends JBossWSTest
{
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new
JBossWSTestHelper.WarDeployment("jaxws-samples-wssePolicy-sign-encrypt.war") {
{
+ @Deployment(name="jaxws-samples-wssePolicy-sign-encrypt", order=1, testable
= false)
+ public static WebArchive createDeployment1() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-samples-wssePolicy-sign-encrypt.war");
archive
.setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ "Dependencies: org.apache.ws.security\n"))
@@ -65,27 +74,25 @@
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wssePolicy/sign-encrypt/WEB-INF/wsdl/SecurityService.wsdl"),
"wsdl/SecurityService.wsdl")
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wssePolicy/sign-encrypt/WEB-INF/wsdl/SecurityService_schema1.xsd"),
"wsdl/SecurityService_schema1.xsd")
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wssePolicy/sign-encrypt/WEB-INF/web.xml"));
- }
- });
- list.add(new
JBossWSTestHelper.JarDeployment("jaxws-samples-wssePolicy-sign-encrypt-client.jar")
{ {
+ return archive;
+ }
+
+ @Deployment(name="jaxws-samples-wssePolicy-sign-encrypt-client", order=2,
testable = false)
+ public static JavaArchive createDeployment2() {
+ JavaArchive archive = ShrinkWrap.create(JavaArchive.class,
"jaxws-samples-wssePolicy-sign-encrypt-client.jar");
archive
.addManifest()
.addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wssePolicy/sign-encrypt/META-INF/alice.jks"),
"alice.jks")
.addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wssePolicy/sign-encrypt/META-INF/alice.properties"),
"alice.properties");
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(SignEncryptTestCase.class,
JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
+ @Test
+ @RunAsClient
public void test() throws Exception
{
QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy",
"SecurityService");
- URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-samples-wssePolicy-sign-encrypt?wsdl");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":" +
getServerPort() + "/jaxws-samples-wssePolicy-sign-encrypt?wsdl");
Service service = Service.create(wsdlURL, serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
setupWsse(proxy);
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/SignTestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/SignTestCase.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/SignTestCase.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -30,7 +30,15 @@
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
-import junit.framework.Test;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import org.apache.cxf.ws.security.SecurityConstants;
import org.jboss.shrinkwrap.api.asset.StringAsset;
@@ -45,13 +53,14 @@
* @author alessio.soldano(a)jboss.com
* @since 1-May-2009
*/
+(a)RunWith(Arquillian.class)
public final class SignTestCase extends JBossWSTest
{
- private final String serviceURL = "http://" + getServerHost() +
":8080/jaxws-samples-wssePolicy-sign";
+ private final String serviceURL = "http://" + getServerHost() +
":" + getServerPort() + "/jaxws-samples-wssePolicy-sign";
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new
JBossWSTestHelper.WarDeployment("jaxws-samples-wssePolicy-sign.war") { {
+ @Deployment(name="jaxws-samples-wssePolicy-sign", order=1, testable =
false)
+ public static WebArchive createDeployment1() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-samples-wssePolicy-sign.war");
archive
.setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ "Dependencies: org.apache.ws.security\n"))
@@ -66,23 +75,20 @@
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wssePolicy/sign/WEB-INF/wsdl/SecurityService.wsdl"),
"wsdl/SecurityService.wsdl")
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wssePolicy/sign/WEB-INF/wsdl/SecurityService_schema1.xsd"),
"wsdl/SecurityService_schema1.xsd")
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wssePolicy/sign/WEB-INF/web.xml"));
- }
- });
- list.add(new
JBossWSTestHelper.JarDeployment("jaxws-samples-wssePolicy-sign-client.jar") { {
+ return archive;
+ }
+ @Deployment(name="jaxws-samples-wssePolicy-sign-client", order=2, testable =
false)
+ public static JavaArchive createDeployment2() {
+ JavaArchive archive = ShrinkWrap.create(JavaArchive.class,
"jaxws-samples-wssePolicy-sign-client.jar");
archive
.addManifest()
.addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wssePolicy/sign/META-INF/alice.jks"), "alice.jks")
.addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wssePolicy/sign/META-INF/alice.properties"),
"alice.properties");
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(SignTestCase.class,
JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
+ @Test
+ @RunAsClient
public void test() throws Exception
{
QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy",
"SecurityService");
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/UsernameTestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/UsernameTestCase.java 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/UsernameTestCase.java 2015-01-21
21:03:21 UTC (rev 19411)
@@ -32,7 +32,14 @@
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
-import junit.framework.Test;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import org.apache.cxf.ws.security.SecurityConstants;
import org.jboss.shrinkwrap.api.asset.StringAsset;
@@ -48,13 +55,16 @@
* @author alessio.soldano(a)jboss.com
* @since 01-May-2009
*/
+(a)RunWith(Arquillian.class)
public final class UsernameTestCase extends JBossWSTest
{
- private final String serviceURL = "https://" + getServerHost() +
":8443/jaxws-samples-wssePolicy-username";
+ final int serverPort = getServerPort();
+ final int serverSecurePort = serverPort + 363; //8080 + 363 = 8443
+ private final String serviceURL = "https://" + getServerHost() +
":" + serverSecurePort + "/jaxws-samples-wssePolicy-username";
- public static BaseDeployment<?>[] createDeployments() {
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new
JBossWSTestHelper.WarDeployment("jaxws-samples-wssePolicy-username.war") { {
+ @Deployment(testable = false)
+ public static WebArchive createDeployments() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,
"jaxws-samples-wssePolicy-username.war");
archive
.setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ "Dependencies: org.apache.ws.security\n"))
@@ -67,19 +77,17 @@
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wssePolicy/username/WEB-INF/wsdl/SecurityService.wsdl"),
"wsdl/SecurityService.wsdl")
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wssePolicy/username/WEB-INF/wsdl/SecurityService_schema1.xsd"),
"wsdl/SecurityService_schema1.xsd")
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/wssePolicy/username/WEB-INF/web.xml"));
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
+ return archive;
}
-
+ /****
public static Test suite()
{
- /** System properties - currently set at testsuite start time
- System.setProperty("javax.net.ssl.trustStore",
"my.truststore");
- System.setProperty("javax.net.ssl.trustStorePassword",
"changeit");
- System.setProperty("javax.net.ssl.trustStoreType", "jks");
- System.setProperty("org.jboss.security.ignoreHttpsHost",
"true");
- */
+ // System properties - currently set at testsuite start time
+ //System.setProperty("javax.net.ssl.trustStore",
"my.truststore");
+ //System.setProperty("javax.net.ssl.trustStorePassword",
"changeit");
+ //System.setProperty("javax.net.ssl.trustStoreType", "jks");
+ //System.setProperty("org.jboss.security.ignoreHttpsHost",
"true");
+ //
JBossWSTestSetup setup = new JBossWSCXFTestSetup(UsernameTestCase.class,
JBossWSTestHelper.writeToFile(createDeployments()));
Map<String, String> sslOptions = new HashMap<String, String>();
sslOptions.put("server-identity.ssl.keystore-path",
System.getProperty("org.jboss.ws.testsuite.server.keystore"));
@@ -88,7 +96,9 @@
setup.setHttpsConnectorRequirement(sslOptions);
return setup;
}
-
+ *****/
+ @Test
+ @RunAsClient
public void test() throws Exception
{
QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy",
"SecurityService");
@@ -99,6 +109,8 @@
assertEquals("Secure Hello World!", proxy.sayHello());
}
+ @Test
+ @RunAsClient
public void testWrongPassword() throws Exception
{
QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy",
"SecurityService");
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms/META-INF/wsdl/HelloWorldService.wsdl
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms/META-INF/wsdl/HelloWorldService.wsdl 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms/META-INF/wsdl/HelloWorldService.wsdl 2015-01-21
21:03:21 UTC (rev 19411)
@@ -65,7 +65,7 @@
<wsdl:service name="HelloWorldService">
<soapjms:jndiConnectionFactoryName>java:jms/RemoteConnectionFactory</soapjms:jndiConnectionFactoryName>
<soapjms:jndiInitialContextFactory>org.jboss.naming.remote.client.InitialContextFactory</soapjms:jndiInitialContextFactory>
-
<soapjms:jndiURL>http-remoting://@jboss.bind.address@:8080</soapjms:jndiURL>
+
<soapjms:jndiURL>http-remoting://@jboss.bind.address@:@add_int(port-offset.spring-tests.jboss,8080)@</soapjms:jndiURL>
<wsdl:port binding="tns:HelloWorldServiceSoapBinding"
name="HelloWorldImplPort">
<soap:address location="jms:queue:testQueue"/>
</wsdl:port>
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl 2015-01-21
21:03:21 UTC (rev 19411)
@@ -65,12 +65,12 @@
<wsdl:service name="HelloWorldService">
<soapjms:jndiConnectionFactoryName>java:jms/RemoteConnectionFactory</soapjms:jndiConnectionFactoryName>
<soapjms:jndiInitialContextFactory>org.jboss.naming.remote.client.InitialContextFactory</soapjms:jndiInitialContextFactory>
-
<soapjms:jndiURL>http-remoting://@jboss.bind.address@:8080</soapjms:jndiURL>
+
<soapjms:jndiURL>http-remoting://@jboss.bind.address@:@add_int(port-offset.spring-tests.jboss,8080)@</soapjms:jndiURL>
<wsdl:port binding="tns:HelloWorldServiceSoapBinding"
name="HelloWorldImplPort">
<soap:address location="jms:queue:testQueue"/>
</wsdl:port>
<wsdl:port binding="tns:HttpHelloWorldServiceSoapBinding"
name="HttpHelloWorldImplPort">
- <soap:address
location="http://@jboss.bind.address@:8080/jaxws-cxf-jms-http-deployment"/>
+ <soap:address
location="http://@jboss.bind.address@:@add_int(port-offset.spring-tests.jboss,8080)@/jaxws-cxf-jms-http-deployment"/>
</wsdl:port>
</wsdl:service>
<wsdl:service name="HelloWorldServiceLocal">
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/webserviceref/WEB-INF/wsdl/Endpoint.wsdl
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/webserviceref/WEB-INF/wsdl/Endpoint.wsdl 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/webserviceref/WEB-INF/wsdl/Endpoint.wsdl 2015-01-21
21:03:21 UTC (rev 19411)
@@ -29,7 +29,7 @@
<service name='EndpointService'>
<port binding='tns:EndpointBinding' name='EndpointPort'>
- <soap:address
location='http://@jboss.bind.address@:8080/jaxws-cxf-webserviceref'/>
+ <soap:address
location='http://@jboss.bind.address@:@add_int(port-offset.spring-tests.jboss,8080)@/jaxws-cxf-webserviceref'/>
</port>
</service>
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/wsrm/basic-doc/wsrm-basic-doc.wsdl
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/wsrm/basic-doc/wsrm-basic-doc.wsdl 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/wsrm/basic-doc/wsrm-basic-doc.wsdl 2015-01-21
21:03:21 UTC (rev 19411)
@@ -61,7 +61,7 @@
<wsdl:service name="RMService">
<wsdl:port binding="tns:RMServiceSoapBinding"
name="RMEndpointPort">
- <soap:address
location="http://@jboss.bind.address@:8080/jaxws-cxf-wsrm-basic-doc"/>
+ <soap:address
location="http://@jboss.bind.address@:@add_int(port-offset.spring-tests.jboss,8080)@/jaxws-cxf-wsrm-basic-doc"/>
<wsp:PolicyReference URI="#RM"
xmlns:wsp="http://www.w3.org/2006/07/ws-policy"/>
</wsdl:port>
</wsdl:service>
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/wsrm/basic-rpc/wsrm-basic-rpc.wsdl
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/wsrm/basic-rpc/wsrm-basic-rpc.wsdl 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/wsrm/basic-rpc/wsrm-basic-rpc.wsdl 2015-01-21
21:03:21 UTC (rev 19411)
@@ -42,7 +42,7 @@
</wsdl:binding>
<wsdl:service name="RMService">
<wsdl:port binding="tns:RMServiceSoapBinding"
name="RMEndpointPort">
- <soap:address
location="http://@jboss.bind.address@:8080/jaxws-cxf-wsrm-basic-rpc"/>
+ <soap:address
location="http://@jboss.bind.address@:@add_int(port-offset.spring-tests.jboss,8080)@/jaxws-cxf-wsrm-basic-rpc"/>
<wsp:PolicyReference URI="#RM"
xmlns:wsp="http://www.w3.org/ns/ws-policy"/>
</wsdl:port>
</wsdl:service>
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsrm/WEB-INF/wsdl/SimpleService.wsdl
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsrm/WEB-INF/wsdl/SimpleService.wsdl 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsrm/WEB-INF/wsdl/SimpleService.wsdl 2015-01-21
21:03:21 UTC (rev 19411)
@@ -68,7 +68,7 @@
</wsdl:binding>
<wsdl:service name="SimpleService">
<wsdl:port name="SimpleServicePort"
binding="tns:SimpleServiceSoapBinding">
- <soap:address location="http://localhost:9090/hello"/>
+ <soap:address
location="http://@jboss.bind.address@:@add_int(port-offset.spring-tests.jboss,9090)@/hello"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsse/kerberos/WEB-INF/wsdl/DoubleItKerberos.wsdl
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsse/kerberos/WEB-INF/wsdl/DoubleItKerberos.wsdl 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsse/kerberos/WEB-INF/wsdl/DoubleItKerberos.wsdl 2015-01-21
21:03:21 UTC (rev 19411)
@@ -294,51 +294,51 @@
</wsdl:port>
<wsdl:port name="DoubleItKerberosSymmetricPort"
binding="tns:DoubleItKerberosSymmetricBinding">
- <soap:address
location="http://localhost:9001/DoubleItKerberosSymmetric" />
+ <soap:address
location="http://@jboss.bind.address@:@add_int(port-offset.spring-tests.jboss,9001)@/DoubleItKerberosSymmetric"
/>
</wsdl:port>
<wsdl:port name="DoubleItKerberosSymmetricSupportingPort"
binding="tns:DoubleItKerberosSymmetricSupportingBinding">
- <soap:address
location="http://localhost:9001/DoubleItKerberosSymmetricSupporting" />
+ <soap:address
location="http://@jboss.bind.address@:@add_int(port-offset.spring-tests.jboss,9001)@/DoubleItKerberosSymmetricSupporting"
/>
</wsdl:port>
<wsdl:port name="DoubleItKerberosSupportingPort"
binding="tns:DoubleItKerberosSupportingBinding">
- <soap:address
location="http://localhost:9001/DoubleItKerberosSupporting" />
+ <soap:address
location="http://@jboss.bind.address@:@add_int(port-offset.spring-tests.jboss,9001)@/DoubleItKerberosSupporting"
/>
</wsdl:port>
<wsdl:port name="DoubleItKerberosAsymmetricPort"
binding="tns:DoubleItKerberosAsymmetricBinding">
- <soap:address
location="http://localhost:9001/DoubleItKerberosAsymmetric" />
+ <soap:address
location="http://@jboss.bind.address@:@add_int(port-offset.spring-tests.jboss,9001)@/DoubleItKerberosAsymmetric"
/>
</wsdl:port>
<wsdl:port name="DoubleItKerberosTransportEndorsingPort"
binding="tns:DoubleItKerberosTransportEndorsingBinding">
- <soap:address
location="https://localhost:9009/DoubleItKerberosTransportEndorsing" />
+ <soap:address
location="https://@jboss.bind.address@:@add_int(port-offset.spring-tests.jboss,9009)@/DoubleItKerberosTransportEndorsing"
/>
</wsdl:port>
<wsdl:port name="DoubleItKerberosAsymmetricEndorsingPort"
binding="tns:DoubleItKerberosAsymmetricEndorsingBinding">
- <soap:address
location="http://localhost:9001/DoubleItKerberosAsymmetricEndorsing" />
+ <soap:address
location="http://@jboss.bind.address@:@add_int(port-offset.spring-tests.jboss,9001)@/DoubleItKerberosAsymmetricEndorsing"
/>
</wsdl:port>
<wsdl:port name="DoubleItKerberosSymmetricProtectionPort"
binding="tns:DoubleItKerberosSymmetricProtectionBinding">
- <soap:address
location="http://localhost:9001/DoubleItKerberosSymmetricProtection" />
+ <soap:address
location="http://@jboss.bind.address@:@add_int(port-offset.spring-tests.jboss,9001)@/DoubleItKerberosSymmetricProtection"
/>
</wsdl:port>
<wsdl:port name="DoubleItKerberosSymmetricDerivedProtectionPort"
binding="tns:DoubleItKerberosSymmetricDerivedProtectionBinding">
- <soap:address
location="http://localhost:9001/DoubleItKerberosSymmetricDerivedProtection"
/>
+ <soap:address
location="http://@jboss.bind.address@:@add_int(port-offset.spring-tests.jboss,9001)@/DoubleItKerberosSymmetricDerivedProtection"
/>
</wsdl:port>
<wsdl:port name="DoubleItKerberosAsymmetricSignedEndorsingPort"
binding="tns:DoubleItKerberosAsymmetricSignedEndorsingBinding">
- <soap:address
location="http://localhost:9001/DoubleItKerberosAsymmetricSignedEndorsing"
/>
+ <soap:address
location="http://@jboss.bind.address@:@add_int(port-offset.spring-tests.jboss,9001)@/DoubleItKerberosAsymmetricSignedEndorsing"
/>
</wsdl:port>
<wsdl:port name="DoubleItKerberosAsymmetricSignedEncryptedPort"
binding="tns:DoubleItKerberosAsymmetricSignedEncryptedBinding">
- <soap:address
location="http://localhost:9001/DoubleItKerberosAsymmetricSignedEncrypted"
/>
+ <soap:address
location="http://@jboss.bind.address@:@add_int(port-offset.spring-tests.jboss,9001)@/DoubleItKerberosAsymmetricSignedEncrypted"
/>
</wsdl:port>
<wsdl:port name="DoubleItKerberosSymmetricEndorsingEncryptedPort"
binding="tns:DoubleItKerberosSymmetricEndorsingEncryptedBinding">
- <soap:address
location="http://localhost:9001/DoubleItKerberosSymmetricEndorsingEncrypted"
/>
+ <soap:address
location="http://@jboss.bind.address@:@add_int(port-offset.spring-tests.jboss,9001)@/DoubleItKerberosSymmetricEndorsingEncrypted"
/>
</wsdl:port>
<wsdl:port
name="DoubleItKerberosSymmetricSignedEndorsingEncryptedPort"
binding="tns:DoubleItKerberosSymmetricSignedEndorsingEncryptedBinding">
- <soap:address
location="http://localhost:9001/DoubleItKerberosSymmetricSignedEndorsingEncrypted"
/>
+ <soap:address
location="http://@jboss.bind.address@:@add_int(port-offset.spring-tests.jboss,9001)@/DoubleItKerberosSymmetricSignedEndorsingEncrypted"
/>
</wsdl:port>
</wsdl:service>
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/wsdl/SecurityService.wsdl
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/wsdl/SecurityService.wsdl 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/wsdl/SecurityService.wsdl 2015-01-21
21:03:21 UTC (rev 19411)
@@ -35,7 +35,7 @@
</binding>
<service name="SecurityService">
<port name="SecurityServicePort"
binding="tns:SecurityServicePortBinding">
- <soap:address
location="http://@jboss.bind.address@:8080/jaxws-samples-wsse-sign-encrypt"/>
+ <soap:address
location="http://@jboss.bind.address@:@add_int(port-offset.spring-tests.jboss,8080)@/jaxws-samples-wsse-sign-encrypt"/>
</port>
</service>
</definitions>
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsse/username-authorize/WEB-INF/wsdl/SecurityService.wsdl
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsse/username-authorize/WEB-INF/wsdl/SecurityService.wsdl 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsse/username-authorize/WEB-INF/wsdl/SecurityService.wsdl 2015-01-21
21:03:21 UTC (rev 19411)
@@ -54,10 +54,10 @@
</binding>
<service name="SecurityService">
<port name="SecurityServicePort"
binding="tns:SecurityServicePortBinding">
- <soap:address
location="http://@jboss.bind.address@:8080/jaxws-samples-wsse-username-authorize/default-config"/>
+ <soap:address
location="http://@jboss.bind.address@:@add_int(port-offset.spring-tests.jboss,8080)@/jaxws-samples-wsse-username-authorize/default-config"/>
</port>
<port name="SecurityServicePort2"
binding="tns:SecurityServicePortBinding">
- <soap:address
location="http://@jboss.bind.address@:8080/jaxws-samples-wsse-username-authorize/custom-config"/>
+ <soap:address
location="http://@jboss.bind.address@:@add_int(port-offset.spring-tests.jboss,8080)@/jaxws-samples-wsse-username-authorize/custom-config"/>
</port>
</service>
</definitions>
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsse/username-digest/WEB-INF/wsdl/SecurityService.wsdl
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsse/username-digest/WEB-INF/wsdl/SecurityService.wsdl 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsse/username-digest/WEB-INF/wsdl/SecurityService.wsdl 2015-01-21
21:03:21 UTC (rev 19411)
@@ -54,7 +54,7 @@
</binding>
<service name="SecurityService">
<port name="SecurityServicePort"
binding="tns:SecurityServicePortBinding">
- <soap:address
location="http://@jboss.bind.address@:8080/jaxws-samples-wsse-username-digest"/>
+ <soap:address
location="http://@jboss.bind.address@:@add_int(port-offset.spring-tests.jboss,8080)@/jaxws-samples-wsse-username-digest"/>
</port>
</service>
</definitions>
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wssePolicy/sign-encrypt/WEB-INF/wsdl/SecurityService.wsdl
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wssePolicy/sign-encrypt/WEB-INF/wsdl/SecurityService.wsdl 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wssePolicy/sign-encrypt/WEB-INF/wsdl/SecurityService.wsdl 2015-01-21
21:03:21 UTC (rev 19411)
@@ -41,7 +41,7 @@
</binding>
<service name="SecurityService">
<port name="SecurityServicePort"
binding="tns:SecurityServicePortBinding">
- <soap:address
location="http://@jboss.bind.address@:8080/jaxws-samples-wssePolicy-sign-encrypt"/>
+ <soap:address
location="http://@jboss.bind.address@:@add_int(port-offset.spring-tests.jboss,8080)@/jaxws-samples-wssePolicy-sign-encrypt"/>
</port>
</service>
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wssePolicy/username/WEB-INF/wsdl/SecurityService.wsdl
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wssePolicy/username/WEB-INF/wsdl/SecurityService.wsdl 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wssePolicy/username/WEB-INF/wsdl/SecurityService.wsdl 2015-01-21
21:03:21 UTC (rev 19411)
@@ -41,7 +41,7 @@
</binding>
<service name="SecurityService">
<port name="SecurityServicePort"
binding="tns:SecurityServicePortBinding">
- <soap:address
location="https://@jboss.bind.address@:8443/jaxws-samples-wssePolicy-username"/>
+ <soap:address
location="https://@jboss.bind.address@:@add_int(port-offset.spring-tests.jboss,8443)@/jaxws-samples-wssePolicy-username"/>
</port>
</service>
Added:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/scripts/jbws-testsuite-spring-default-config-tests.groovy
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/scripts/jbws-testsuite-spring-default-config-tests.groovy
(rev 0)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/scripts/jbws-testsuite-spring-default-config-tests.groovy 2015-01-21
21:03:21 UTC (rev 19411)
@@ -0,0 +1,20 @@
+def root = new XmlParser().parse(project.properties['inputFile'])
+
+/**
+ * Fix logging: remove CONSOLE handler and set a specific log file
+ *
+ */
+def logHandlers = root.profile.subsystem.'root-logger'.handlers[0]
+def consoleHandler = logHandlers.find{it.@name == 'CONSOLE'}
+logHandlers.remove(consoleHandler)
+def file = root.profile.subsystem.'periodic-rotating-file-handler'.file[0]
+file.attributes()['path'] = project.properties['serverLog']
+
+/**
+ * Save the configuration to a new file
+ */
+def writer = new StringWriter()
+writer.println('<?xml version="1.0"
encoding="UTF-8"?>')
+new XmlNodePrinter(new PrintWriter(writer)).print(root)
+def f = new File(project.properties['outputFile'])
+f.write(writer.toString())
Added:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/scripts/jbws-testsuite-spring-default.groovy
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/scripts/jbws-testsuite-spring-default.groovy
(rev 0)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/scripts/jbws-testsuite-spring-default.groovy 2015-01-21
21:03:21 UTC (rev 19411)
@@ -0,0 +1,20 @@
+def root = new XmlParser().parse(project.properties['inputFile'])
+
+/**
+ * Fix logging: remove CONSOLE handler and set a specific log file
+ *
+ */
+def logHandlers = root.profile.subsystem.'root-logger'.handlers[0]
+def consoleHandler = logHandlers.find{it.@name == 'CONSOLE'}
+logHandlers.remove(consoleHandler)
+def file = root.profile.subsystem.'periodic-rotating-file-handler'.file[0]
+file.attributes()['path'] = project.properties['serverLog']
+
+/**
+ * Save the configuration to a new file
+ */
+def writer = new StringWriter()
+writer.println('<?xml version="1.0"
encoding="UTF-8"?>')
+new XmlNodePrinter(new PrintWriter(writer)).print(root)
+def f = new File(project.properties['outputFile'])
+f.write(writer.toString())
Modified:
stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/etc/container.properties
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/etc/container.properties 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/cxf-tests/src/test/etc/container.properties 2015-01-21
21:03:21 UTC (rev 19411)
@@ -4,4 +4,6 @@
port-offset.cxf-tests.ssl-mutual-auth=(a)port-offset.cxf-tests.ssl-mutual-auth@
port-offset.cxf-tests.default-config-tests=(a)port-offset.cxf-tests.default-config-tests@
port-offset.shared-tests.jboss=(a)port-offset.shared-tests.jboss@
-port-offset.shared-tests.default-config-tests=(a)port-offset.shared-tests.default-config-tests@
\ No newline at end of file
+port-offset.shared-tests.default-config-tests=(a)port-offset.shared-tests.default-config-tests@
+port-offset.spring-tests.jboss=(a)port-offset.spring-tests.jboss@
+port-offset.spring-tests.default-config-tests=(a)port-offset.spring-tests.default-config-tests@
\ No newline at end of file
Modified: stack/cxf/branches/arquillian/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/pom.xml 2015-01-21 17:07:53 UTC (rev
19410)
+++ stack/cxf/branches/arquillian/modules/testsuite/pom.xml 2015-01-21 21:03:21 UTC (rev
19411)
@@ -38,13 +38,15 @@
<port-offset.shared-tests.jboss>15000</port-offset.shared-tests.jboss>
<port-offset.shared-tests.default-config-tests>20000</port-offset.shared-tests.default-config-tests>
<port-offset.shared-tests.address-rewrite>25000</port-offset.shared-tests.address-rewrite>
+
<port-offset.spring-tests.default-config-tests>30000</port-offset.spring-tests.default-config-tests>
+ <port-offset.spring-tests.jboss>35000</port-offset.spring-tests.jboss>
</properties>
<!-- Modules -->
<modules>
<module>cxf-tests</module>
<module>shared-tests</module>
-
+ <module>cxf-spring-tests</module>
</modules>
<!-- Dependencies -->
@@ -544,9 +546,9 @@
-->
<profile>
<id>spring</id>
-<!-- <modules>
+ <modules>
<module>cxf-spring-tests</module>
- </modules>-->
+ </modules>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
Modified:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/etc/container.properties
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/etc/container.properties 2015-01-21
17:07:53 UTC (rev 19410)
+++
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/etc/container.properties 2015-01-21
21:03:21 UTC (rev 19411)
@@ -5,4 +5,6 @@
port-offset.cxf-tests.default-config-tests=(a)port-offset.cxf-tests.default-config-tests@
port-offset.shared-tests.jboss=(a)port-offset.shared-tests.jboss@
port-offset.shared-tests.default-config-tests=(a)port-offset.shared-tests.default-config-tests@
-port-offset.shared-tests.address-rewrite=(a)port-offset.shared-tests.address-rewrite@
\ No newline at end of file
+port-offset.shared-tests.address-rewrite=(a)port-offset.shared-tests.address-rewrite@
+port-offset.spring-tests.jboss=(a)port-offset.spring-tests.jboss@
+port-offset.spring-tests.default-config-tests=(a)port-offset.spring-tests.default-config-tests@
\ No newline at end of file