JBossWS SVN: r19415 - in stack/cxf/branches/arquillian/modules/testsuite: cxf-spring-tests and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-01-22 05:51:29 -0500 (Thu, 22 Jan 2015)
New Revision: 19415
Added:
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/scripts/jbws_testsuite_spring_default.groovy
Removed:
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/etc/arquillian.xml
stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/etc/container.properties
stack/cxf/branches/arquillian/modules/testsuite/pom.xml
Log:
Preliminary cleanup on top of Rebecca's changes in r19411:
- do not enable spring tests by default, the -Pspring profile is meant to be used
- remove jbws-testsuite-spring-default-config-tests configuration which is not used
- rename jbws-testsuite-spring-default configuration to please gmaven plugin
- fix few port number and configuration names here and there (cut & paste... ;-) )
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-22 08:08:45 UTC (rev 19414)
+++ stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/pom.xml 2015-01-22 10:51:29 UTC (rev 19415)
@@ -84,7 +84,7 @@
<goal>execute</goal>
</goals>
<configuration>
- <source>${basedir}/src/test/scripts/jbws-testsuite-spring-default.groovy</source>
+ <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>
@@ -98,21 +98,6 @@
</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>
@@ -166,16 +151,10 @@
<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>
+ <jvmArgs>-server -XX:+UseCompressedOops -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djboss.socket.binding.port-offset=${port-offset.spring-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 -->
+ <port>39990</port><!-- Keep in sync with the port-offset -->
</configuration>
</execution>
<execution>
@@ -185,41 +164,9 @@
<goal>shutdown</goal>
</goals>
<configuration>
- <port>34990</port>
- <!-- Keep in sync with the port-offset -->
+ <port>39990</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>
Modified: 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 2015-01-22 08:08:45 UTC (rev 19414)
+++ stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/etc/arquillian.xml 2015-01-22 10:51:29 UTC (rev 19415)
@@ -6,32 +6,15 @@
<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="javaVmArguments">-server -XX:+UseCompressedOops -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djboss.socket.binding.port-offset=${port-offset.spring-tests.jboss} -Djavax.wsdl.factory.WSDLFactory=com.ibm.wsdl.factory.WSDLFactoryImpl</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 -->
+ <property name="managementPort">${add_int(port-offset.spring-tests.jboss,9990)}</property>
<!-- 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="waitForPorts">${add_int(port-offset.spring-tests.jboss,8787)} ${add_int(port-offset.spring-tests.jboss,9990)}</property>
<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>
Modified: 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 2015-01-22 08:08:45 UTC (rev 19414)
+++ stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/etc/container.properties 2015-01-22 10:51:29 UTC (rev 19415)
@@ -6,4 +6,3 @@
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
Deleted: 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 2015-01-22 08:08:45 UTC (rev 19414)
+++ stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/scripts/jbws-testsuite-spring-default-config-tests.groovy 2015-01-22 10:51:29 UTC (rev 19415)
@@ -1,20 +0,0 @@
-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())
Deleted: 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 2015-01-22 08:08:45 UTC (rev 19414)
+++ stack/cxf/branches/arquillian/modules/testsuite/cxf-spring-tests/src/test/scripts/jbws-testsuite-spring-default.groovy 2015-01-22 10:51:29 UTC (rev 19415)
@@ -1,20 +0,0 @@
-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-22 10:51:29 UTC (rev 19415)
@@ -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/pom.xml
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/pom.xml 2015-01-22 08:08:45 UTC (rev 19414)
+++ stack/cxf/branches/arquillian/modules/testsuite/pom.xml 2015-01-22 10:51:29 UTC (rev 19415)
@@ -38,15 +38,13 @@
<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>
+ <port-offset.spring-tests.jboss>30000</port-offset.spring-tests.jboss>
</properties>
<!-- Modules -->
<modules>
<module>cxf-tests</module>
<module>shared-tests</module>
- <module>cxf-spring-tests</module>
</modules>
<!-- Dependencies -->
9 years, 11 months
JBossWS SVN: r19414 - in stack/cxf/branches/arquillian/modules: dist/src/main/scripts and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2015-01-22 03:08:45 -0500 (Thu, 22 Jan 2015)
New Revision: 19414
Modified:
stack/cxf/branches/arquillian/modules/dist/pom.xml
stack/cxf/branches/arquillian/modules/dist/src/main/scripts/assembly-test-server.xml
stack/cxf/branches/arquillian/modules/testsuite/pom.xml
Log:
Change to a meaningful classifier name
Modified: stack/cxf/branches/arquillian/modules/dist/pom.xml
===================================================================
--- stack/cxf/branches/arquillian/modules/dist/pom.xml 2015-01-22 07:09:13 UTC (rev 19413)
+++ stack/cxf/branches/arquillian/modules/dist/pom.xml 2015-01-22 08:08:45 UTC (rev 19414)
@@ -346,7 +346,7 @@
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
- <id>bdeploy</id>
+ <id>deploy</id>
<phase>prepare-package</phase>
<goals>
<goal>run</goal>
Modified: stack/cxf/branches/arquillian/modules/dist/src/main/scripts/assembly-test-server.xml
===================================================================
--- stack/cxf/branches/arquillian/modules/dist/src/main/scripts/assembly-test-server.xml 2015-01-22 07:09:13 UTC (rev 19413)
+++ stack/cxf/branches/arquillian/modules/dist/src/main/scripts/assembly-test-server.xml 2015-01-22 08:08:45 UTC (rev 19414)
@@ -1,7 +1,7 @@
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
- <id>test-server</id>
+ <id>${jbossws.integration.target}</id>
<formats>
<format>zip</format>
</formats>
@@ -14,4 +14,4 @@
</includes>
</fileSet>
</fileSets>
-</assembly>
\ No newline at end of file
+</assembly>
Modified: stack/cxf/branches/arquillian/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/pom.xml 2015-01-22 07:09:13 UTC (rev 19413)
+++ stack/cxf/branches/arquillian/modules/testsuite/pom.xml 2015-01-22 08:08:45 UTC (rev 19414)
@@ -418,7 +418,7 @@
<artifactItem>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-dist</artifactId>
- <classifier>test-server</classifier>
+ <classifier>${jbossws.integration.target}</classifier>
<version>${project.version}</version>
<type>zip</type>
<overWrite>false</overWrite>
9 years, 11 months
JBossWS SVN: r19413 - stack/cxf/branches/arquillian/modules/test-utils/src/main/java/org/jboss/wsf/test.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2015-01-22 02:09:13 -0500 (Thu, 22 Jan 2015)
New Revision: 19413
Modified:
stack/cxf/branches/arquillian/modules/test-utils/src/main/java/org/jboss/wsf/test/IgnoreContainer.java
Log:
Remove wrong base statement run
Modified: stack/cxf/branches/arquillian/modules/test-utils/src/main/java/org/jboss/wsf/test/IgnoreContainer.java
===================================================================
--- stack/cxf/branches/arquillian/modules/test-utils/src/main/java/org/jboss/wsf/test/IgnoreContainer.java 2015-01-22 05:34:46 UTC (rev 19412)
+++ stack/cxf/branches/arquillian/modules/test-utils/src/main/java/org/jboss/wsf/test/IgnoreContainer.java 2015-01-22 07:09:13 UTC (rev 19413)
@@ -62,7 +62,6 @@
@Override
public void evaluate() throws Throwable
{
- base.evaluate();
for (String container : ignoredContainers)
{
if (JBossWSTestHelper.getIntegrationTarget().startsWith(container))
9 years, 11 months
JBossWS SVN: r19412 - stack/cxf/branches/arquillian/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2015-01-22 00:34:46 -0500 (Thu, 22 Jan 2015)
New Revision: 19412
Modified:
stack/cxf/branches/arquillian/modules/testsuite/pom.xml
Log:
Redirect test output to file
Modified: stack/cxf/branches/arquillian/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/pom.xml 2015-01-21 21:03:21 UTC (rev 19411)
+++ stack/cxf/branches/arquillian/modules/testsuite/pom.xml 2015-01-22 05:34:46 UTC (rev 19412)
@@ -282,6 +282,7 @@
<skip>true</skip>
<failIfNoTests>false</failIfNoTests>
<runOrder>alphabetical</runOrder>
+ <redirectTestOutputToFile>true</redirectTestOutputToFile>
</configuration>
<executions>
<execution>
9 years, 11 months
JBossWS SVN: r19411 - in stack/cxf/branches/arquillian/modules/testsuite: cxf-spring-tests and 34 other directories.
by jbossws-commits@lists.jboss.org
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
9 years, 11 months
JBossWS SVN: r19410 - hudson/branches/arquillian/hudson-home/jobs/AS-8.2.0-SECMGR.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-01-21 12:07:53 -0500 (Wed, 21 Jan 2015)
New Revision: 19410
Modified:
hudson/branches/arquillian/hudson-home/jobs/AS-8.2.0-SECMGR/config.xml
Log:
Workaround [WFLY-4215] issue when building WildFly 8.2.0.Final
Modified: hudson/branches/arquillian/hudson-home/jobs/AS-8.2.0-SECMGR/config.xml
===================================================================
--- hudson/branches/arquillian/hudson-home/jobs/AS-8.2.0-SECMGR/config.xml 2015-01-21 15:47:34 UTC (rev 19409)
+++ hudson/branches/arquillian/hudson-home/jobs/AS-8.2.0-SECMGR/config.xml 2015-01-21 17:07:53 UTC (rev 19410)
@@ -61,6 +61,9 @@
<command>MAVEN_OPTS="-Xmx1024m -Xms512m -XX:MaxPermSize=128m"
export MAVEN_OPTS
export JAVA_HOME=(a)java.home.sun.jdk6@
+cd tools
+perl -pi -e 's/www/archive/g' download-maven.sh
+cd -
./build.sh clean install -Dskip-download-sources -DskipTests=true -Dsecurity.manager=yes -U -B</command>
</hudson.tasks.Shell>
</builders>
9 years, 11 months
JBossWS SVN: r19409 - in container/wildfly82/branches/jbossws-wildfly820: server-integration and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-01-21 10:47:34 -0500 (Wed, 21 Jan 2015)
New Revision: 19409
Modified:
container/wildfly82/branches/jbossws-wildfly820/
container/wildfly82/branches/jbossws-wildfly820/server-integration/
container/wildfly82/branches/jbossws-wildfly820/tests-integration/
Log:
Setting svn:ignore
Property changes on: container/wildfly82/branches/jbossws-wildfly820
___________________________________________________________________
Added: svn:ignore
+ target
.settings
.project
.classpath
Property changes on: container/wildfly82/branches/jbossws-wildfly820/server-integration
___________________________________________________________________
Added: svn:ignore
+ target
.project
.classpath
.settings
Property changes on: container/wildfly82/branches/jbossws-wildfly820/tests-integration
___________________________________________________________________
Added: svn:ignore
+ target
.project
.classpath
.settings
9 years, 11 months
JBossWS SVN: r19408 - in hudson/branches/arquillian: hudson-home and 7 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-01-21 10:39:41 -0500 (Wed, 21 Jan 2015)
New Revision: 19408
Added:
hudson/branches/arquillian/hudson-home/jobs/AS-8.2.0-SECMGR/
hudson/branches/arquillian/hudson-home/jobs/AS-8.2.0-SECMGR/config.xml
hudson/branches/arquillian/hudson-home/jobs/CXF-CORE-AS-8.2.0-SECMGR/
hudson/branches/arquillian/hudson-home/jobs/CXF-CORE-AS-8.2.0-SECMGR/config.xml
hudson/branches/arquillian/hudson-home/jobs/CXF-CORE-AS-8.2.0-SPRING/
hudson/branches/arquillian/hudson-home/jobs/CXF-CORE-AS-8.2.0-SPRING/config.xml
hudson/branches/arquillian/hudson-home/jobs/CXF-CORE-AS-8.2.0/
hudson/branches/arquillian/hudson-home/jobs/CXF-CORE-AS-8.2.0/config.xml
Modified:
hudson/branches/arquillian/ant.properties.example
hudson/branches/arquillian/hudson-home/config.xml
hudson/branches/arquillian/hudson-home/jobs/AS-ALL/config.xml
hudson/branches/arquillian/hudson-home/jobs/CXF-ALL/config.xml
Log:
[JBWS-3859] Adding Hudson jobs (to arquillian branch as this will soon replace the trunk)
Modified: hudson/branches/arquillian/ant.properties.example
===================================================================
--- hudson/branches/arquillian/ant.properties.example 2015-01-21 14:45:11 UTC (rev 19407)
+++ hudson/branches/arquillian/ant.properties.example 2015-01-21 15:39:41 UTC (rev 19408)
@@ -27,6 +27,10 @@
hudson.jboss810.build=wildfly-8.1.0.Final
hudson.jboss810.rev=8.1.0.Final
+hudson.jboss820.url=https://github.com/wildfly/wildfly
+hudson.jboss820.build=wildfly-8.2.0.Final
+hudson.jboss820.rev=8.2.0.Final
+
hudson.jboss900.url=https://github.com/wildfly/wildfly
hudson.jboss900.build=wildfly-9.0.0.Alpha2-SNAPSHOT
hudson.jboss900.rev=master
Modified: hudson/branches/arquillian/hudson-home/config.xml
===================================================================
--- hudson/branches/arquillian/hudson-home/config.xml 2015-01-21 14:45:11 UTC (rev 19407)
+++ hudson/branches/arquillian/hudson-home/config.xml 2015-01-21 15:39:41 UTC (rev 19408)
@@ -37,6 +37,7 @@
<tr><td colspan=2></td></tr>
<tr><th align=left>@hudson.jboss800.build@</th><td>-r(a)hudson.jboss800.rev@ @hudson.jboss800.url@</td></tr>
<tr><th align=left>@hudson.jboss810.build@</th><td>-r(a)hudson.jboss810.rev@ @hudson.jboss810.url@</td></tr>
+ <tr><th align=left>@hudson.jboss820.build@</th><td>-r(a)hudson.jboss820.rev@ @hudson.jboss820.url@</td></tr>
<tr><th align=left>@hudson.jboss900.build@</th><td>-r(a)hudson.jboss900.rev@ @hudson.jboss900.url@</td></tr>
<tr><td colspan=2></td></tr>
</table>
@@ -56,6 +57,7 @@
<string>AS-LIGHT</string>
<string>AS-8.0.0-SECMGR</string>
<string>AS-8.1.0-SECMGR</string>
+ <string>AS-8.2.0-SECMGR</string>
<string>AS-9.0.0</string>
<string>AS-9.0.0-SECMGR</string>
</jobNames>
@@ -73,15 +75,18 @@
<jobNames class="tree-set">
<no-comparator/>
<string>CXF-ALL</string>
- <string>CXF-CORE-AS-8.0.0-SUN-JDK-6</string>
+ <string>CXF-CORE-AS-8.0.0</string>
<string>CXF-CORE-AS-8.0.0-SECMGR</string>
- <string>CXF-CORE-AS-8.1.0-SUN-JDK-6</string>
+ <string>CXF-CORE-AS-8.1.0</string>
+ <string>CXF-CORE-AS-8.2.0</string>
<string>CXF-CORE-AS-8.1.0-SECMGR</string>
- <string>CXF-CORE-AS-9.0.0-SUN-JDK-6</string>
+ <string>CXF-CORE-AS-8.2.0-SECMGR</string>
+ <string>CXF-CORE-AS-9.0.0</string>
<string>CXF-CORE-AS-9.0.0-SECMGR</string>
- <string>CXF-CORE-AS-8.0.0-SPRING-SUN-JDK-6</string>
- <string>CXF-CORE-AS-8.1.0-SPRING-SUN-JDK-6</string>
- <string>CXF-CORE-AS-9.0.0-SPRING-SUN-JDK-6</string>
+ <string>CXF-CORE-AS-8.0.0-SPRING</string>
+ <string>CXF-CORE-AS-8.1.0-SPRING</string>
+ <string>CXF-CORE-AS-8.2.0-SPRING</string>
+ <string>CXF-CORE-AS-9.0.0-SPRING</string>
</jobNames>
<name>CXF Tests</name>
<description>
Added: hudson/branches/arquillian/hudson-home/jobs/AS-8.2.0-SECMGR/config.xml
===================================================================
--- hudson/branches/arquillian/hudson-home/jobs/AS-8.2.0-SECMGR/config.xml (rev 0)
+++ hudson/branches/arquillian/hudson-home/jobs/AS-8.2.0-SECMGR/config.xml 2015-01-21 15:39:41 UTC (rev 19408)
@@ -0,0 +1,75 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<project>
+ <actions/>
+ <description>Builds WildFly 8.2.0 with security manager enabled</description>
+ <logRotator>
+ <daysToKeep>-1</daysToKeep>
+ <numToKeep>20</numToKeep>
+ <artifactDaysToKeep>-1</artifactDaysToKeep>
+ <artifactNumToKeep>-1</artifactNumToKeep>
+ </logRotator>
+ <keepDependencies>false</keepDependencies>
+ <properties/>
+ <scm class="hudson.plugins.git.GitSCM">
+ <configVersion>1</configVersion>
+ <remoteRepositories>
+ <org.spearce.jgit.transport.RemoteConfig>
+ <string>origin</string>
+ <int>5</int>
+ <string>fetch</string>
+ <string>+refs/heads/*:refs/remotes/origin/*</string>
+ <string>receivepack</string>
+ <string>git-upload-pack</string>
+ <string>uploadpack</string>
+ <string>git-upload-pack</string>
+ <string>url</string>
+ <string>@hudson.jboss820.url@.git</string>
+ <string>tagopt</string>
+ <string></string>
+ </org.spearce.jgit.transport.RemoteConfig>
+ </remoteRepositories>
+ <branches>
+ <hudson.plugins.git.BranchSpec>
+ <name>@hudson.jboss820.rev@</name>
+ </hudson.plugins.git.BranchSpec>
+ </branches>
+ <localBranch></localBranch>
+ <mergeOptions/>
+ <recursiveSubmodules>false</recursiveSubmodules>
+ <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
+ <authorOrCommitter>false</authorOrCommitter>
+ <clean>false</clean>
+ <wipeOutWorkspace>false</wipeOutWorkspace>
+ <pruneBranches>false</pruneBranches>
+ <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
+ <gitTool>Default</gitTool>
+ <browser class="hudson.plugins.git.browser.GithubWeb">
+ <url>@hudson.jboss820.url@</url>
+ </browser>
+ <submoduleCfg class="list"/>
+ <relativeTargetDir></relativeTargetDir>
+ <excludedRegions></excludedRegions>
+ <excludedUsers></excludedUsers>
+ </scm>
+ <canRoam>true</canRoam>
+ <disabled>false</disabled>
+ <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
+ <triggers class="vector"/>
+ <concurrentBuild>false</concurrentBuild>
+ <builders>
+ <hudson.tasks.Shell>
+ <command>MAVEN_OPTS="-Xmx1024m -Xms512m -XX:MaxPermSize=128m"
+export MAVEN_OPTS
+export JAVA_HOME=(a)java.home.sun.jdk6@
+./build.sh clean install -Dskip-download-sources -DskipTests=true -Dsecurity.manager=yes -U -B</command>
+ </hudson.tasks.Shell>
+ </builders>
+ <publishers>
+ <hudson.tasks.Mailer>
+ <recipients></recipients>
+ <dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>
+ <sendToIndividuals>false</sendToIndividuals>
+ </hudson.tasks.Mailer>
+ </publishers>
+ <buildWrappers/>
+</project>
Property changes on: hudson/branches/arquillian/hudson-home/jobs/AS-8.2.0-SECMGR/config.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified: hudson/branches/arquillian/hudson-home/jobs/AS-ALL/config.xml
===================================================================
--- hudson/branches/arquillian/hudson-home/jobs/AS-ALL/config.xml 2015-01-21 14:45:11 UTC (rev 19407)
+++ hudson/branches/arquillian/hudson-home/jobs/AS-ALL/config.xml 2015-01-21 15:39:41 UTC (rev 19408)
@@ -3,7 +3,7 @@
<builders class="vector"/>
<publishers class="vector">
<hudson.tasks.BuildTrigger>
- <childProjects>AS-9.0.0, AS-8.0.0-SECMGR, AS-8.1.0-SECMGR, AS-9.0.0-SECMGR</childProjects>
+ <childProjects>AS-9.0.0, AS-8.0.0-SECMGR, AS-8.1.0-SECMGR, AS-8.2.0-SECMGR, AS-9.0.0-SECMGR</childProjects>
<threshold>
<name>UNSTABLE</name>
<ordinal>1</ordinal>
Modified: hudson/branches/arquillian/hudson-home/jobs/CXF-ALL/config.xml
===================================================================
--- hudson/branches/arquillian/hudson-home/jobs/CXF-ALL/config.xml 2015-01-21 14:45:11 UTC (rev 19407)
+++ hudson/branches/arquillian/hudson-home/jobs/CXF-ALL/config.xml 2015-01-21 15:39:41 UTC (rev 19408)
@@ -8,18 +8,24 @@
, CXF-CORE-AS-8.1.0
+, CXF-CORE-AS-8.2.0
+
, CXF-CORE-AS-9.0.0
, CXF-CORE-AS-8.0.0-SPRING
, CXF-CORE-AS-8.1.0-SPRING
+, CXF-CORE-AS-8.2.0-SPRING
+
, CXF-CORE-AS-9.0.0-SPRING
, CXF-CORE-AS-8.0.0-SECMGR
, CXF-CORE-AS-8.1.0-SECMGR
+, CXF-CORE-AS-8.2.0-SECMGR
+
, CXF-CORE-AS-9.0.0-SECMGR
</childProjects>
<threshold>
Added: hudson/branches/arquillian/hudson-home/jobs/CXF-CORE-AS-8.2.0/config.xml
===================================================================
--- hudson/branches/arquillian/hudson-home/jobs/CXF-CORE-AS-8.2.0/config.xml (rev 0)
+++ hudson/branches/arquillian/hudson-home/jobs/CXF-CORE-AS-8.2.0/config.xml 2015-01-21 15:39:41 UTC (rev 19408)
@@ -0,0 +1,72 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<project>
+ <builders class="vector">
+ <hudson.tasks.Shell>
+ <command>
+#
+# Module settings
+#
+MODULE=CXF-CORE-AS-8.2.0
+
+WORKSPACE=`pwd`
+STACK_ID=cxf
+JAVA_HOME=(a)java.home.sun.jdk6@
+SCRIPTS_DIR=$WORKSPACE/hudson-scripts
+STACK_DIR=$WORKSPACE/stack-cxf
+TEST_OPTS=
+JBOSS_TARGET=wildfly820
+
+#
+# load test functions
+#
+. $SCRIPTS_DIR/jbossws-qa.sh
+
+#
+# execute core tests
+#
+coreTest
+
+</command>
+ </hudson.tasks.Shell>
+ </builders>
+ <publishers class="vector">
+ <hudson.tasks.junit.JUnitResultArchiver>
+ <testResults>stack-cxf/**/target/surefire-reports/*.xml</testResults>
+ </hudson.tasks.junit.JUnitResultArchiver>
+ <hudson.tasks.Mailer>
+ <recipients>@hudson.mail.recipients@</recipients>
+ <dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>
+ <sendToIndividuals>true</sendToIndividuals>
+ </hudson.tasks.Mailer>
+ </publishers>
+ <buildWrappers class="vector"/>
+ <scm class="hudson.scm.SubversionSCM">
+ <locations>
+ <hudson.scm.SubversionSCM-ModuleLocation>
+ <remote>@jbossws.hudson.url@/scripts</remote>
+ <local>hudson-scripts</local>
+ </hudson.scm.SubversionSCM-ModuleLocation>
+ <hudson.scm.SubversionSCM-ModuleLocation>
+ <remote>@hudson.cxf.url@</remote>
+ <local>stack-cxf</local>
+ </hudson.scm.SubversionSCM-ModuleLocation>
+ </locations>
+ <useUpdate>true</useUpdate>
+ <browser class="hudson.scm.browsers.FishEyeSVN">
+ <url>http://fisheye.jboss.com/browse/JBossWS/</url>
+ <rootModule></rootModule>
+ </browser>
+ </scm>
+ <canRoam>true</canRoam>
+ <disabled>false</disabled>
+ <enableRemoteTrigger>false</enableRemoteTrigger>
+ <triggers class="vector"/>
+ <logRotator>
+ <daysToKeep>14</daysToKeep>
+ <numToKeep>-1</numToKeep>
+ </logRotator>
+ <keepDependencies>false</keepDependencies>
+ <properties/>
+ <description>Build and test jbossws-cxf-(a)version.id@ against @hudson.jboss820.build@</description>
+ <actions class="vector"/>
+</project>
Property changes on: hudson/branches/arquillian/hudson-home/jobs/CXF-CORE-AS-8.2.0/config.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: hudson/branches/arquillian/hudson-home/jobs/CXF-CORE-AS-8.2.0-SECMGR/config.xml
===================================================================
--- hudson/branches/arquillian/hudson-home/jobs/CXF-CORE-AS-8.2.0-SECMGR/config.xml (rev 0)
+++ hudson/branches/arquillian/hudson-home/jobs/CXF-CORE-AS-8.2.0-SECMGR/config.xml 2015-01-21 15:39:41 UTC (rev 19408)
@@ -0,0 +1,73 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<project>
+ <builders class="vector">
+ <hudson.tasks.Shell>
+ <command>
+#
+# Module settings
+#
+MODULE=CXF-CORE-AS-8.2.0-SECMGR
+
+WORKSPACE=`pwd`
+STACK_ID=cxf
+JAVA_HOME=(a)java.home.sun.jdk6@
+SCRIPTS_DIR=$WORKSPACE/hudson-scripts
+STACK_DIR=$WORKSPACE/stack-cxf
+TEST_OPTS=-Dsecmgr=true
+JBOSS_TARGET=wildfly820
+JBOSS_INSTANCE=@hudson.home@/jobs/AS-8.2.0-SECMGR/workspace/build/target/(a)hudson.jboss820.build@
+
+#
+# load test functions
+#
+. $SCRIPTS_DIR/jbossws-qa.sh
+
+#
+# execute core tests
+#
+coreTest
+
+</command>
+ </hudson.tasks.Shell>
+ </builders>
+ <publishers class="vector">
+ <hudson.tasks.junit.JUnitResultArchiver>
+ <testResults>stack-cxf/**/target/surefire-reports/*.xml</testResults>
+ </hudson.tasks.junit.JUnitResultArchiver>
+ <hudson.tasks.Mailer>
+ <recipients>@hudson.mail.recipients@</recipients>
+ <dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>
+ <sendToIndividuals>true</sendToIndividuals>
+ </hudson.tasks.Mailer>
+ </publishers>
+ <buildWrappers class="vector"/>
+ <scm class="hudson.scm.SubversionSCM">
+ <locations>
+ <hudson.scm.SubversionSCM-ModuleLocation>
+ <remote>@jbossws.hudson.url@/scripts</remote>
+ <local>hudson-scripts</local>
+ </hudson.scm.SubversionSCM-ModuleLocation>
+ <hudson.scm.SubversionSCM-ModuleLocation>
+ <remote>@hudson.cxf.url@</remote>
+ <local>stack-cxf</local>
+ </hudson.scm.SubversionSCM-ModuleLocation>
+ </locations>
+ <useUpdate>true</useUpdate>
+ <browser class="hudson.scm.browsers.FishEyeSVN">
+ <url>http://fisheye.jboss.com/browse/JBossWS/</url>
+ <rootModule></rootModule>
+ </browser>
+ </scm>
+ <canRoam>true</canRoam>
+ <disabled>false</disabled>
+ <enableRemoteTrigger>false</enableRemoteTrigger>
+ <triggers class="vector"/>
+ <logRotator>
+ <daysToKeep>14</daysToKeep>
+ <numToKeep>-1</numToKeep>
+ </logRotator>
+ <keepDependencies>false</keepDependencies>
+ <properties/>
+ <description>Build and test jbossws-cxf-(a)version.id@ against @hudson.jboss820.build@ (security manager enabled)</description>
+ <actions class="vector"/>
+</project>
Property changes on: hudson/branches/arquillian/hudson-home/jobs/CXF-CORE-AS-8.2.0-SECMGR/config.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: hudson/branches/arquillian/hudson-home/jobs/CXF-CORE-AS-8.2.0-SPRING/config.xml
===================================================================
--- hudson/branches/arquillian/hudson-home/jobs/CXF-CORE-AS-8.2.0-SPRING/config.xml (rev 0)
+++ hudson/branches/arquillian/hudson-home/jobs/CXF-CORE-AS-8.2.0-SPRING/config.xml 2015-01-21 15:39:41 UTC (rev 19408)
@@ -0,0 +1,72 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<project>
+ <builders class="vector">
+ <hudson.tasks.Shell>
+ <command>
+#
+# Module settings
+#
+MODULE=CXF-CORE-AS-8.2.0-SPRING
+
+WORKSPACE=`pwd`
+STACK_ID=cxf
+JAVA_HOME=(a)java.home.sun.jdk6@
+SCRIPTS_DIR=$WORKSPACE/hudson-scripts
+STACK_DIR=$WORKSPACE/stack-cxf
+TEST_OPTS=
+JBOSS_TARGET=wildfly820
+
+#
+# load test functions
+#
+. $SCRIPTS_DIR/jbossws-qa.sh
+
+#
+# execute core tests
+#
+coreTestWithSpring
+
+</command>
+ </hudson.tasks.Shell>
+ </builders>
+ <publishers class="vector">
+ <hudson.tasks.junit.JUnitResultArchiver>
+ <testResults>stack-cxf/**/target/surefire-reports/*.xml</testResults>
+ </hudson.tasks.junit.JUnitResultArchiver>
+ <hudson.tasks.Mailer>
+ <recipients>@hudson.mail.recipients@</recipients>
+ <dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>
+ <sendToIndividuals>true</sendToIndividuals>
+ </hudson.tasks.Mailer>
+ </publishers>
+ <buildWrappers class="vector"/>
+ <scm class="hudson.scm.SubversionSCM">
+ <locations>
+ <hudson.scm.SubversionSCM-ModuleLocation>
+ <remote>@jbossws.hudson.url@/scripts</remote>
+ <local>hudson-scripts</local>
+ </hudson.scm.SubversionSCM-ModuleLocation>
+ <hudson.scm.SubversionSCM-ModuleLocation>
+ <remote>@hudson.cxf.url@</remote>
+ <local>stack-cxf</local>
+ </hudson.scm.SubversionSCM-ModuleLocation>
+ </locations>
+ <useUpdate>true</useUpdate>
+ <browser class="hudson.scm.browsers.FishEyeSVN">
+ <url>http://fisheye.jboss.com/browse/JBossWS/</url>
+ <rootModule></rootModule>
+ </browser>
+ </scm>
+ <canRoam>true</canRoam>
+ <disabled>false</disabled>
+ <enableRemoteTrigger>false</enableRemoteTrigger>
+ <triggers class="vector"/>
+ <logRotator>
+ <daysToKeep>14</daysToKeep>
+ <numToKeep>-1</numToKeep>
+ </logRotator>
+ <keepDependencies>false</keepDependencies>
+ <properties/>
+ <description>Build and test jbossws-cxf-(a)version.id@ against @hudson.jboss820.build@ with SpringFramework libraires available</description>
+ <actions class="vector"/>
+</project>
Property changes on: hudson/branches/arquillian/hudson-home/jobs/CXF-CORE-AS-8.2.0-SPRING/config.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
9 years, 11 months
JBossWS SVN: r19407 - in stack/cxf/branches/arquillian: modules/dist and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-01-21 09:45:11 -0500 (Wed, 21 Jan 2015)
New Revision: 19407
Modified:
stack/cxf/branches/arquillian/build.xml
stack/cxf/branches/arquillian/modules/dist/pom.xml
stack/cxf/branches/arquillian/modules/dist/src/main/scripts/build-deploy.xml
stack/cxf/branches/arquillian/modules/resources/pom.xml
stack/cxf/branches/arquillian/modules/server/src/main/scripts/antrun-beans-config.xml
stack/cxf/branches/arquillian/modules/testsuite/pom.xml
stack/cxf/branches/arquillian/pom.xml
Log:
[JBWS-3859] Adding WildFly 8.2 ASIL
Modified: stack/cxf/branches/arquillian/build.xml
===================================================================
--- stack/cxf/branches/arquillian/build.xml 2015-01-21 14:05:16 UTC (rev 19406)
+++ stack/cxf/branches/arquillian/build.xml 2015-01-21 14:45:11 UTC (rev 19407)
@@ -74,12 +74,15 @@
<condition property="wildfly810.home" value="${profiles.profile.properties.wildfly810.home}">
<isset property="profiles.profile.properties.wildfly810.home"/>
</condition>
+ <condition property="wildfly820.home" value="${profiles.profile.properties.wildfly820.home}">
+ <isset property="profiles.profile.properties.wildfly820.home"/>
+ </condition>
<condition property="wildfly900.home" value="${profiles.profile.properties.wildfly900.home}">
<isset property="profiles.profile.properties.wildfly900.home"/>
</condition>
- <fail message="Application server home not set, wildfly800.home=value, wildfly810.home=value or wildfly900.home to set">
+ <fail message="Application server home not set, wildfly800.home=value, wildfly810.home=value, wildfly820.home=value or wildfly900.home to set">
<condition>
<and>
<not>
@@ -89,6 +92,9 @@
<isset property="wildfly810.home"/>
</not>
<not>
+ <isset property="wildfly820.home"/>
+ </not>
+ <not>
<isset property="wildfly900.home"/>
</not>
</and>
@@ -98,6 +104,7 @@
<echo/>
<echo message="wildfly800.home=${wildfly800.home}"/>
<echo message="wildfly810.home=${wildfly810.home}"/>
+ <echo message="wildfly820.home=${wildfly820.home}"/>
<echo message="wildfly900.home=${wildfly900.home}"/>
</target>
Modified: stack/cxf/branches/arquillian/modules/dist/pom.xml
===================================================================
--- stack/cxf/branches/arquillian/modules/dist/pom.xml 2015-01-21 14:05:16 UTC (rev 19406)
+++ stack/cxf/branches/arquillian/modules/dist/pom.xml 2015-01-21 14:45:11 UTC (rev 19407)
@@ -260,6 +260,27 @@
</profile>
<!--
+ Name: wildfly820
+ Descr: WildFly-8.2.0 specific dependencies
+ -->
+ <profile>
+ <id>wildfly820</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.ws.cxf</groupId>
+ <artifactId>jbossws-cxf-resources</artifactId>
+ <version>${project.version}</version>
+ <classifier>wildfly820</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.ws</groupId>
+ <artifactId>jbossws-wildfly820-server-integration</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+
+ <!--
Name: wildfly900
Descr: WildFly-9.0.0 specific dependencies
-->
Modified: stack/cxf/branches/arquillian/modules/dist/src/main/scripts/build-deploy.xml
===================================================================
--- stack/cxf/branches/arquillian/modules/dist/src/main/scripts/build-deploy.xml 2015-01-21 14:05:16 UTC (rev 19406)
+++ stack/cxf/branches/arquillian/modules/dist/src/main/scripts/build-deploy.xml 2015-01-21 14:45:11 UTC (rev 19407)
@@ -28,7 +28,7 @@
<property name="deploy.artifacts.dir" value="${basedir}/target/assembly/deploy-artifacts"/>
<property name="jbossws.default.modules.conf" value="${basedir}/target/assembly/deploy-artifacts/modules-deploy.conf"/>
- <target name="deploy" depends="prepare,deploy-wildfly800-if-available,deploy-wildfly810-if-available,deploy-wildfly900-if-available" description="Deploy jbossws to wildfly"/>
+ <target name="deploy" depends="prepare,deploy-wildfly800-if-available,deploy-wildfly810-if-available,deploy-wildfly820-if-available,deploy-wildfly900-if-available" description="Deploy jbossws to wildfly"/>
<target name="deploy-wildfly800-if-available" if="wildfly800.available">
<antcall target="deploy-wildfly800"/>
@@ -38,6 +38,10 @@
<antcall target="deploy-wildfly810"/>
</target>
+ <target name="deploy-wildfly820-if-available" if="wildfly820.available">
+ <antcall target="deploy-wildfly820"/>
+ </target>
+
<target name="deploy-wildfly900-if-available" if="wildfly900.available">
<antcall target="deploy-wildfly900"/>
</target>
@@ -49,14 +53,19 @@
<condition property="wildfly810.home" value="${jboss.home}">
<equals arg1="${jbossws.integration.target}" arg2="wildfly810"/>
</condition>
+ <condition property="wildfly820.home" value="${jboss.home}">
+ <equals arg1="${jbossws.integration.target}" arg2="wildfly820"/>
+ </condition>
<condition property="wildfly900.home" value="${jboss.home}">
<equals arg1="${jbossws.integration.target}" arg2="wildfly900"/>
</condition>
<property name="wildfly800.available.file" value="${wildfly800.home}/jboss-modules.jar"/>
<property name="wildfly810.available.file" value="${wildfly810.home}/jboss-modules.jar"/>
+ <property name="wildfly820.available.file" value="${wildfly820.home}/jboss-modules.jar"/>
<property name="wildfly900.available.file" value="${wildfly900.home}/jboss-modules.jar"/>
<available property="wildfly800.available" file="${wildfly800.available.file}"/>
<available property="wildfly810.available" file="${wildfly810.available.file}"/>
+ <available property="wildfly820.available" file="${wildfly820.available.file}"/>
<available property="wildfly900.available" file="${wildfly900.available.file}"/>
<tstamp>
<format property="build.id" pattern="yyyyMMddHHmm"/>
@@ -165,6 +174,35 @@
</target>
<!-- ================================================================== -->
+ <!-- Deployment wildfly820 -->
+ <!-- ================================================================== -->
+
+ <target name="target-wildfly820">
+ <property name="jbossws.integration.target" value="wildfly820"/>
+ <echo message="jbossws.integration.target=${jbossws.integration.target}"/>
+ </target>
+
+ <target name="deploy-wildfly820" depends="undeploy-wildfly820,deploy-structure-wildfly80x,check-spring,install-spring-module80x">
+ <fail message="Not available: ${wildfly820.available.file}" unless="wildfly820.available"/>
+ <copy todir="${wildfly820.home}" overwrite="true" verbose="true">
+ <fileset dir="${deploy.structure}">
+ <exclude name="**/jboss/as/webservices/**/module.xml"/>
+ </fileset>
+ </copy>
+ <!-- Install org/jboss/as/webservices module.xml separately since it needs to reference libs already on the AS -->
+ <installModules targetDir="${wildfly820.home}/modules/system/layers/base/">
+ <fileset dir="${deploy.structure}/modules/system/layers/base">
+ <include name="**/jboss/as/webservices/**/module.xml"/>
+ </fileset>
+ </installModules>
+ </target>
+
+ <target name="undeploy-wildfly820" depends="target-wildfly820,init">
+ <fail message="Not available: ${wildfly820.available.file}" unless="wildfly820.available"/>
+ <macro-undeploy-jbossws-modules targetdir="${wildfly820.home}/modules/system/layers/base" defaultmodulesconf="${jbossws.default.modules.conf}" modifyjbossintegration="true"/>
+ </target>
+
+ <!-- ================================================================== -->
<!-- Prepare Deployment Structure WildFly-9.0.x -->
<!-- ================================================================== -->
Modified: stack/cxf/branches/arquillian/modules/resources/pom.xml
===================================================================
--- stack/cxf/branches/arquillian/modules/resources/pom.xml 2015-01-21 14:05:16 UTC (rev 19406)
+++ stack/cxf/branches/arquillian/modules/resources/pom.xml 2015-01-21 14:45:11 UTC (rev 19407)
@@ -69,6 +69,15 @@
</configuration>
</execution>
<execution>
+ <id>wildfly820</id>
+ <goals><goal>jar</goal></goals>
+ <phase>package</phase>
+ <configuration>
+ <classifier>wildfly820</classifier>
+ <classesDirectory>${project.build.directory}/classes/resources/jbossws-wildfly820/jbossws.beans</classesDirectory>
+ </configuration>
+ </execution>
+ <execution>
<id>wildfly900</id>
<goals><goal>jar</goal></goals>
<phase>package</phase>
Modified: stack/cxf/branches/arquillian/modules/server/src/main/scripts/antrun-beans-config.xml
===================================================================
--- stack/cxf/branches/arquillian/modules/server/src/main/scripts/antrun-beans-config.xml 2015-01-21 14:05:16 UTC (rev 19406)
+++ stack/cxf/branches/arquillian/modules/server/src/main/scripts/antrun-beans-config.xml 2015-01-21 14:45:11 UTC (rev 19407)
@@ -40,6 +40,11 @@
/>
<copy
+ file="${src.dir}/jbossws-cxf-config-as8.xml"
+ tofile="${dest.dir}/jbossws-wildfly820/jbossws.beans/META-INF/stack-specific-deployment-aspects.xml"
+ />
+
+ <copy
file="${src.dir}/jbossws-cxf-config-as9.xml"
tofile="${dest.dir}/jbossws-wildfly900/jbossws.beans/META-INF/stack-specific-deployment-aspects.xml"
/>
Modified: stack/cxf/branches/arquillian/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/branches/arquillian/modules/testsuite/pom.xml 2015-01-21 14:05:16 UTC (rev 19406)
+++ stack/cxf/branches/arquillian/modules/testsuite/pom.xml 2015-01-21 14:45:11 UTC (rev 19407)
@@ -704,6 +704,68 @@
</profile>
<!--
+ Name: wildfly820
+ Descr: WildFly-8.2.0 specific options
+ -->
+ <profile>
+ <id>wildfly820</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.ws</groupId>
+ <artifactId>jbossws-wildfly820-tests-integration</artifactId>
+ </dependency>
+ <!-- Arquillian container integration -->
+ <dependency>
+ <groupId>org.wildfly.arquillian</groupId>
+ <artifactId>wildfly-arquillian-container-managed</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.arquillian.protocol</groupId>
+ <artifactId>arquillian-protocol-servlet</artifactId>
+ <version>${arquillian.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <!-- LittleProxy depencency declared in this profile as other profiles require different exclusions -->
+ <dependency>
+ <groupId>org.littleshoot</groupId>
+ <artifactId>littleproxy</artifactId>
+ <version>${org.littleshoot.littleproxy.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>net.sf.ehcache</groupId>
+ <artifactId>ehcache-core</artifactId>
+ </exclusion>
+ <!-- Let the container messaging subsystem control the Netty dependency version -->
+ <exclusion>
+ <groupId>io.netty</groupId>
+ <artifactId>netty-all</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <compilerArguments>
+ <endorseddirs>${project.build.directory}/endorsed</endorseddirs>
+ </compilerArguments>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!--
Descr: WildFly-9.0.0 specific options
-->
<profile>
Modified: stack/cxf/branches/arquillian/pom.xml
===================================================================
--- stack/cxf/branches/arquillian/pom.xml 2015-01-21 14:05:16 UTC (rev 19406)
+++ stack/cxf/branches/arquillian/pom.xml 2015-01-21 14:45:11 UTC (rev 19407)
@@ -67,8 +67,10 @@
<jbossws.common.tools.version>1.2.1.CR1</jbossws.common.tools.version>
<jbossws.wildfly800.version>5.0.0-SNAPSHOT</jbossws.wildfly800.version>
<jbossws.wildfly810.version>5.0.0-SNAPSHOT</jbossws.wildfly810.version>
+ <jbossws.wildfly820.version>5.0.0-SNAPSHOT</jbossws.wildfly820.version>
<wildfly800.version>8.0.0.Final</wildfly800.version>
<wildfly810.version>8.1.0.Final</wildfly810.version>
+ <wildfly820.version>8.2.0.Final</wildfly820.version>
<wildfly900.version>9.0.0.Alpha2-SNAPSHOT</wildfly900.version>
<ejb.api.version>1.0.2.Final</ejb.api.version>
<cxf.version>3.0.3</cxf.version>
@@ -159,6 +161,16 @@
<version>${jbossws.wildfly810.version}</version>
</dependency>
<dependency>
+ <groupId>org.jboss.ws</groupId>
+ <artifactId>jbossws-wildfly820-server-integration</artifactId>
+ <version>${jbossws.wildfly820.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.ws</groupId>
+ <artifactId>jbossws-wildfly820-tests-integration</artifactId>
+ <version>${jbossws.wildfly820.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-webservices-tests-integration</artifactId>
<version>${wildfly900.version}</version>
@@ -1410,6 +1422,24 @@
</profile>
<!--
+ Name: wildfly820
+ Descr: WildFly-8.2.0 specific options
+ -->
+ <profile>
+ <id>wildfly820</id>
+ <properties>
+ <jbossws.integration.target>wildfly820</jbossws.integration.target>
+ <jboss.home>${server.home}</jboss.home>
+ <jboss.version>${wildfly820.version}</jboss.version>
+ <additionalJvmArgs>-Djavax.wsdl.factory.WSDLFactory=com.ibm.wsdl.factory.WSDLFactoryImpl</additionalJvmArgs>
+ </properties>
+ <modules>
+ <module>modules/dist</module>
+ <module>modules/testsuite</module>
+ </modules>
+ </profile>
+
+ <!--
Name: wildfly900
Descr: WildFly-9.0.0 specific options
-->
9 years, 11 months
JBossWS SVN: r19406 - in container/wildfly82/branches/jbossws-wildfly820: server-integration/src/main/java/org/jboss/as/webservices/deployers and 16 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-01-21 09:05:16 -0500 (Wed, 21 Jan 2015)
New Revision: 19406
Added:
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/test/java/org/jboss/as/webservices/dmr/WebservicesSubsystemRuntimeTestCase.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/test/resources/org/jboss/as/webservices/dmr/ws-subsystem12-rt.xml
Modified:
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/WSLogger.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/WSMessages.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/AspectDeploymentProcessor.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/EndpointServiceDeploymentAspect.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSClassVerificationProcessor.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSComponentInstanceAssociationInterceptor.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSIntegrationProcessorJAXWS_EJB.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSIntegrationProcessorJAXWS_POJO.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WebContextAnnotationInfo.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WebContextAnnotationInformationFactory.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WebServiceAnnotationProcessor.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/deployment/AbstractDeploymentModelBuilder.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXWS_EJB.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXWS_JMS.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXWS_POJO.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/dmr/ClientConfigAdd.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/dmr/EndpointConfigAdd.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/dmr/HandlerChainAdd.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSDeploymentActivator.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/injection/InjectionDeploymentAspect.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandler.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderEJB.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderPOJO.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/metadata/MetaDataBuilderJAXWS_EJB.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/metadata/model/EJBEndpoint.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/publish/EndpointPublisherImpl.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointService.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/tomcat/AbstractSecurityMetaDataAccessorEJB.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/tomcat/SecurityMetaDataAccessorEJB.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/tomcat/ServletDelegateFactoryImpl.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/tomcat/WebMetaDataCreator.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/tomcat/WebMetaDataModifier.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/util/VirtualFileAdaptor.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefDDProcessor.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefUtils.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WebServiceReferences.java
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/resources/META-INF/stack-agnostic-deployment-aspects.xml
container/wildfly82/branches/jbossws-wildfly820/server-integration/src/test/java/org/jboss/as/webservices/parser/TestDA1.java
container/wildfly82/branches/jbossws-wildfly820/tests-integration/src/main/java/org/jboss/as/webservices/deployer/RemoteDeployer.java
Log:
------------------------------------------------------------------------
[JBWS-3793] Use latest jbossws-spi
------------------------------------------------------------------------
[JBWS-3779] WIP
------------------------------------------------------------------------
[JBWS-3793] More cleanup
------------------------------------------------------------------------
[JBWS-3733]:Add endpointMetrics in EndpointService
------------------------------------------------------------------------
[JBWS-3815] Add mechanism for setting system properties while running JBossWS tests
------------------------------------------------------------------------
[JBWS-3815] Support former log ids
------------------------------------------------------------------------
[JBWS-3514]:Back port fix to wildfly810 branch
------------------------------------------------------------------------
[JBWS-3809] integration of fix from wfly9
------------------------------------------------------------------------
Backporting [WFLY-3905] Only execute POJO processor on WAR deployments
------------------------------------------------------------------------
Backport [WFLY-3535] check
------------------------------------------------------------------------
[JBWS-3835] Add mechanism for restarting target container while running JBossWS tests
------------------------------------------------------------------------
[JBWS-3842] Fix regression
------------------------------------------------------------------------
[JBWS-3838] Sort UnifiedHandlerMetaData instances before adding to the chain
------------------------------------------------------------------------
[JBWS-2680]:Fix authentication realm name hard-coded as "EJBServiceEndpointServlet Realm"
------------------------------------------------------------------------
[JBWS-3854] EndpointConfigAdd does not set required PropertyService dependencies
------------------------------------------------------------------------
[JBWS-3855] Fix regression
------------------------------------------------------------------------
Backporting WFLY 9 additional test at https://github.com/asoldano/wildfly/commit/2141438ab18ceffc2f00f339114036... (modified for running with webservices 1.2 subsystem version as the ASIL does not upgrade the subsystem schema on purpose)
------------------------------------------------------------------------
[JBWS-3839]:excessive ERROR logging on webservices invocation if SoapFault
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/WSLogger.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/WSLogger.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/WSLogger.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -300,4 +300,11 @@
+ WS_SPEC_REF_5_3_2_4_2)
void finalizeMethodNotAllowed(Class<?> seiClass);
+ @LogMessage(level = WARN)
+ @Message(id = 15617, value = "Annotation '@%s' found on class '%s'. Perhaps you forgot to add a '%s' module dependency to your deployment?")
+ void missingModuleDependency(String annotation, String clazz, String module);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 15618, value = "Could not activate the webservices subsystem.")
+ void couldNotActivateSubsystem(@Cause Throwable cause);
}
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/WSMessages.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/WSMessages.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/WSMessages.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -148,8 +148,8 @@
@Message(id = 15590, value = "Config %s, %s handler chain %s: doesn't contain handler with name %s")
OperationFailedException missingHandler(String configName, String handlerChainType, String handlerChainId, String handlerName);
- @Message(id = 15594, value = "Method invocation failed with exception: %s")
- String methodInvocationFailed(String message);
+ //@Message(id = 15594, value = "Method invocation failed with exception: %s")
+ //String methodInvocationFailed(String message);
@Message(id = 15595, value = "Unable to get URL for: %s")
DeploymentUnitProcessingException cannotGetURLForDescriptor(@Cause Throwable cause, String resourcePath);
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/AspectDeploymentProcessor.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/AspectDeploymentProcessor.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/AspectDeploymentProcessor.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -66,17 +66,15 @@
if (isWebServiceDeployment(unit)) {
ensureAspectInitialized();
final Deployment dep = ASHelper.getRequiredAttachment(unit, WSAttachmentKeys.DEPLOYMENT_KEY);
- if (aspect.canHandle(dep)) {
- ROOT_LOGGER.aspectStart(aspect, unit.getName());
- ClassLoader origClassLoader = WildFlySecurityManager.getCurrentContextClassLoaderPrivileged();
- try {
- WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(aspect.getLoader());
- dep.addAttachment(ServiceTarget.class, phaseContext.getServiceTarget());
- aspect.start(dep);
- dep.removeAttachment(ServiceTarget.class);
- } finally {
- WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(origClassLoader);
- }
+ ROOT_LOGGER.aspectStart(aspect, unit.getName());
+ ClassLoader origClassLoader = WildFlySecurityManager.getCurrentContextClassLoaderPrivileged();
+ try {
+ WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(aspect.getLoader());
+ dep.addAttachment(ServiceTarget.class, phaseContext.getServiceTarget());
+ aspect.start(dep);
+ dep.removeAttachment(ServiceTarget.class);
+ } finally {
+ WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(origClassLoader);
}
}
}
@@ -85,15 +83,13 @@
public void undeploy(final DeploymentUnit unit) {
if (isWebServiceDeployment(unit)) {
final Deployment dep = ASHelper.getRequiredAttachment(unit, WSAttachmentKeys.DEPLOYMENT_KEY);
- if (aspect.canHandle(dep)) {
- ROOT_LOGGER.aspectStop(aspect, unit.getName());
- ClassLoader origClassLoader = WildFlySecurityManager.getCurrentContextClassLoaderPrivileged();
- try {
- WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(aspect.getLoader());
- aspect.stop(dep);
- } finally {
- WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(origClassLoader);
- }
+ ROOT_LOGGER.aspectStop(aspect, unit.getName());
+ ClassLoader origClassLoader = WildFlySecurityManager.getCurrentContextClassLoaderPrivileged();
+ try {
+ WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(aspect.getLoader());
+ aspect.stop(dep);
+ } finally {
+ WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(origClassLoader);
}
}
}
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/EndpointServiceDeploymentAspect.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/EndpointServiceDeploymentAspect.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/EndpointServiceDeploymentAspect.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -70,8 +70,6 @@
public Object clone() {
EndpointServiceDeploymentAspect clone = new EndpointServiceDeploymentAspect();
- clone.setForJaxRpc(isForJaxRpc());
- clone.setForJaxWs(isForJaxWs());
clone.setLast(isLast());
clone.setProvides(getProvides());
clone.setRelativeOrder(getRelativeOrder());
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSClassVerificationProcessor.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSClassVerificationProcessor.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSClassVerificationProcessor.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2013, Red Hat, Inc., and individual contributors
+ * Copyright 2014, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -25,6 +25,8 @@
import static org.jboss.as.webservices.WSLogger.ROOT_LOGGER;
import static org.jboss.as.webservices.WSMessages.MESSAGES;
import static org.jboss.as.webservices.util.WSAttachmentKeys.JAXWS_ENDPOINTS_KEY;
+import static org.jboss.as.webservices.util.DotNames.WEB_SERVICE_ANNOTATION;
+import static org.jboss.as.webservices.util.DotNames.WEB_SERVICE_PROVIDER_ANNOTATION;
import javax.jws.WebService;
@@ -33,14 +35,23 @@
import org.jboss.as.server.deployment.DeploymentUnit;
import org.jboss.as.server.deployment.DeploymentUnitProcessingException;
import org.jboss.as.server.deployment.DeploymentUnitProcessor;
+import org.jboss.as.server.deployment.annotation.CompositeIndex;
+import org.jboss.as.server.deployment.module.ModuleDependency;
+import org.jboss.as.server.deployment.module.ModuleSpecification;
import org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex;
+import org.jboss.as.webservices.WSLogger;
import org.jboss.as.webservices.metadata.model.AbstractEndpoint;
import org.jboss.as.webservices.metadata.model.JAXWSDeployment;
import org.jboss.as.webservices.verification.JwsWebServiceEndpointVerifier;
+import org.jboss.jandex.AnnotationInstance;
+import org.jboss.jandex.AnnotationTarget;
+import org.jboss.jandex.ClassInfo;
+import org.jboss.jandex.DotName;
import org.jboss.modules.Module;
/**
* @author sfcoy
+ * @autor <a href="mailto:alessio.soldano@jboss.com">Alessio Soldano</a>
*
*/
public class WSClassVerificationProcessor implements DeploymentUnitProcessor {
@@ -60,6 +71,7 @@
for (AbstractEndpoint ejbEndpoint : wsDeployment.getEjbEndpoints()) {
verifyEndpoint(ejbEndpoint, moduleClassLoader, deploymentReflectionIndex);
}
+ verifyApacheCXFModuleDependencyRequirement(unit);
}
}
@@ -94,7 +106,44 @@
throw MESSAGES.declaredEndpointInterfaceClassNotFound(endpointInterfaceClassName, endpointClass);
}
}
+
+ private void verifyApacheCXFModuleDependencyRequirement(DeploymentUnit unit) {
+ if (!hasCxfModuleDependency(unit)) {
+ // notify user if he clearly forgot the CXF module dependency
+ final CompositeIndex index = unit
+ .getAttachment(Attachments.COMPOSITE_ANNOTATION_INDEX);
+ final DotName[] dotNames = { WEB_SERVICE_ANNOTATION,
+ WEB_SERVICE_PROVIDER_ANNOTATION };
+ for (final DotName dotName : dotNames) {
+ for (AnnotationInstance ai : index.getAnnotations(dotName)) {
+ AnnotationTarget at = ai.target();
+ if (at instanceof ClassInfo) {
+ final ClassInfo clazz = (ClassInfo) ai.target();
+ for (DotName dn : clazz.annotations().keySet()) {
+ if (dn.toString().startsWith("org.apache.cxf")) {
+ WSLogger.ROOT_LOGGER.missingModuleDependency(
+ dn.toString(), clazz.name().toString(),
+ "org.apache.cxf");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ private static boolean hasCxfModuleDependency(DeploymentUnit unit) {
+ final ModuleSpecification moduleSpec = unit
+ .getAttachment(Attachments.MODULE_SPECIFICATION);
+ for (ModuleDependency dep : moduleSpec.getUserDependencies()) {
+ final String id = dep.getIdentifier().getName();
+ if ("org.apache.cxf".equals(id) || "org.apache.cxf.impl".equals(id)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
@Override
public void undeploy(DeploymentUnit context) {
}
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSComponentInstanceAssociationInterceptor.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSComponentInstanceAssociationInterceptor.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSComponentInstanceAssociationInterceptor.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -24,6 +24,7 @@
import org.jboss.as.ee.component.BasicComponentInstance;
import org.jboss.as.ee.component.Component;
import org.jboss.as.ee.component.ComponentInstance;
+import org.jboss.as.naming.ManagedReference;
import org.jboss.as.webservices.injection.WSComponent;
import org.jboss.invocation.ImmediateInterceptorFactory;
import org.jboss.invocation.Interceptor;
@@ -44,7 +45,13 @@
@Override
public Object processInvocation(final InterceptorContext interceptorContext) throws Exception {
final WSComponent wsComponent = (WSComponent)interceptorContext.getPrivateData(Component.class);
- final BasicComponentInstance pojoComponentInstance = wsComponent.getComponentInstance();
+ BasicComponentInstance pojoComponentInstance = null;
+ if (interceptorContext.getPrivateData(ManagedReference.class) != null) {
+ ManagedReference reference = interceptorContext.getPrivateData(ManagedReference.class);
+ pojoComponentInstance = (BasicComponentInstance)wsComponent.createInstance(reference.getInstance());
+ } else {
+ pojoComponentInstance = wsComponent.getComponentInstance();
+ }
interceptorContext.putPrivateData(ComponentInstance.class, pojoComponentInstance);
return interceptorContext.proceed();
}
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSIntegrationProcessorJAXWS_EJB.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSIntegrationProcessorJAXWS_EJB.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSIntegrationProcessorJAXWS_EJB.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -105,12 +105,12 @@
final String authMethod = webCtx.getAuthMethod();
final boolean isSecureWsdlAccess = webCtx.isSecureWsdlAccess();
final String transportGuarantee = webCtx.getTransportGuarantee();
-
+ final String realmName = webCtx.getRealmName();
for (final SessionBeanComponentDescription sessionBean : sessionBeans) {
if (sessionBean.isStateless() || sessionBean.isSingleton()) {
final EJBViewDescription ejbViewDescription = sessionBean.addWebserviceEndpointView();
final ServiceName ejbViewName = ejbViewDescription.getServiceName();
- jaxwsDeployment.addEndpoint(new EJBEndpoint(sessionBean, ejbViewName, securityRoles, authMethod, isSecureWsdlAccess, transportGuarantee));
+ jaxwsDeployment.addEndpoint(new EJBEndpoint(sessionBean, ejbViewName, securityRoles, authMethod, realmName, isSecureWsdlAccess, transportGuarantee));
}
}
}
@@ -192,10 +192,11 @@
private final String authMethod;
private final String transportGuarantee;
private final boolean secureWsdlAccess;
-
+ private final String realmName;
WebContextAnnotationWrapper(final AnnotationInstance annotation) {
authMethod = stringValueOrNull(annotation, "authMethod");
transportGuarantee = stringValueOrNull(annotation, "transportGuarantee");
+ realmName = stringValueOrNull(annotation, "realmName");
secureWsdlAccess = booleanValue(annotation, "secureWSDLAccess");
}
@@ -211,6 +212,10 @@
return secureWsdlAccess;
}
+ String getRealmName() {
+ return realmName;
+ }
+
private String stringValueOrNull(final AnnotationInstance annotation, final String attribute) {
if (annotation == null) return null;
final AnnotationValue value = annotation.value(attribute);
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSIntegrationProcessorJAXWS_POJO.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSIntegrationProcessorJAXWS_POJO.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSIntegrationProcessorJAXWS_POJO.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -77,7 +77,10 @@
// @Override
protected void processAnnotation(final DeploymentUnit unit, final EEModuleDescription moduleDescription)
throws DeploymentUnitProcessingException {
- final Map<String, EEModuleClassDescription> classDescriptionMap = new HashMap<String, org.jboss.as.ee.component.EEModuleClassDescription>();
+ if (!DeploymentTypeMarker.isType(DeploymentType.WAR, unit)) {
+ return;
+ }
+ final Map<String, EEModuleClassDescription> classDescriptionMap = new HashMap<String, EEModuleClassDescription>();
final CompositeIndex index = unit.getAttachment(Attachments.COMPOSITE_ANNOTATION_INDEX);
for (EEModuleClassDescription classDescritpion : moduleDescription.getClassDescriptions()) {
if (isJaxwsEndpoint(classDescritpion, index) && !exclude(unit, classDescritpion)) {
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WebContextAnnotationInfo.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WebContextAnnotationInfo.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WebContextAnnotationInfo.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.as.webservices.deployers;
/**
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WebContextAnnotationInformationFactory.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WebContextAnnotationInformationFactory.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WebContextAnnotationInformationFactory.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -1,9 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2014, Red Hat Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.as.webservices.deployers;
+import org.jboss.ws.api.annotation.WebContext;
+
import org.jboss.as.ee.metadata.ClassAnnotationInformationFactory;
import org.jboss.jandex.AnnotationInstance;
import org.jboss.jandex.AnnotationValue;
-import org.jboss.ws.api.annotation.WebContext;
+import org.jboss.metadata.property.PropertyReplacer;
/**
* User: rsearls
@@ -28,7 +51,6 @@
secureWSDLAccessValue, transportGuaranteeValue, urlPatternValue, virtualHostValue);
}
-
private String asString(final AnnotationInstance annotation, String property) {
AnnotationValue value = annotation.value(property);
return value == null ? "" : value.asString();
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WebServiceAnnotationProcessor.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WebServiceAnnotationProcessor.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/WebServiceAnnotationProcessor.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -36,6 +36,8 @@
import org.jboss.as.server.deployment.DeploymentUnitProcessingException;
import org.jboss.as.server.deployment.DeploymentUnitProcessor;
import org.jboss.as.server.deployment.annotation.CompositeIndex;
+import org.jboss.metadata.property.PropertyReplacers;
+
/**
* @author <a href="mailto:ema@redhat.com">Jim Ma</a>
*/
@@ -57,12 +59,13 @@
final EEModuleDescription eeModuleDescription = deploymentUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION);
final CompositeIndex index = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.COMPOSITE_ANNOTATION_INDEX);
+ final Boolean replacement = deploymentUnit.getAttachment(org.jboss.as.ee.structure.Attachments.ANNOTATION_PROPERTY_REPLACEMENT);
if (index == null || eeModuleDescription == null) {
return;
}
for (final ClassAnnotationInformationFactory factory : factories) {
- final Map<String, ClassAnnotationInformation<?, ?>> data = factory.createAnnotationInformation(index, false);
+ final Map<String, ClassAnnotationInformation<?, ?>> data = factory.createAnnotationInformation(index, replacement);
for (Map.Entry<String, ClassAnnotationInformation<?, ?>> entry : data.entrySet()) {
EEModuleClassDescription clazz = eeModuleDescription.addOrGetLocalClassDescription(entry.getKey());
clazz.addAnnotationInformation(entry.getValue());
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/deployment/AbstractDeploymentModelBuilder.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/deployment/AbstractDeploymentModelBuilder.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/deployment/AbstractDeploymentModelBuilder.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -48,9 +48,9 @@
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
-import org.jboss.wsf.spi.deployment.DeploymentType;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.EndpointType;
+import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
@@ -65,21 +65,17 @@
/** Deployment model factory. */
private final DeploymentModelFactory deploymentModelFactory;
- /** Deployment type this builder creates. */
- private final DeploymentType deploymentType;
-
/** Endpoint type this builder creates. */
private final EndpointType endpointType;
/**
* Constructor.
*/
- protected AbstractDeploymentModelBuilder(final DeploymentType deploymentType, final EndpointType endpointType) {
+ protected AbstractDeploymentModelBuilder(final EndpointType endpointType) {
// deployment factory
final ClassLoader cl = AbstractDeploymentModelBuilder.class.getClassLoader();
final SPIProvider spiProvider = SPIProviderResolver.getInstance(cl).getProvider();
this.deploymentModelFactory = spiProvider.getSPI(DeploymentModelFactory.class, cl);
- this.deploymentType = deploymentType;
this.endpointType = endpointType;
}
@@ -189,28 +185,20 @@
} else {
classLoader = module.getClassLoader();
}
- final ArchiveDeployment dep = this.newDeployment(unit.getName(), classLoader);
-
+
+ ArchiveDeployment parentDep = null;
if (unit.getParent() != null) {
- final String parentDeploymentName = unit.getParent().getName();
final Module parentModule = unit.getParent().getAttachment(Attachments.MODULE);
if (parentModule == null) {
throw MESSAGES.classLoaderResolutionFailed(deploymentRoot);
}
- final ClassLoader parentClassLoader = parentModule.getClassLoader();
-
ROOT_LOGGER.creatingUnifiedWebservicesDeploymentModel(unit.getParent());
- final ArchiveDeployment parentDep = this.newDeployment(parentDeploymentName, parentClassLoader);
- dep.setParent(parentDep);
+ parentDep = this.newDeployment(null, unit.getParent().getName(), parentModule.getClassLoader(), null);
}
+
+ final UnifiedVirtualFile uvf = root != null ? new VirtualFileAdaptor(root) : new ResourceLoaderAdapter(classLoader);
+ final ArchiveDeployment dep = this.newDeployment(parentDep, unit.getName(), classLoader, uvf);
- if (root != null) {
- dep.setRootFile(new VirtualFileAdaptor(root));
- } else {
- dep.setRootFile(new ResourceLoaderAdapter(classLoader));
- }
- dep.setRuntimeClassLoader(classLoader);
- dep.setType(deploymentType);
//add an AnnotationInfo attachment that uses composite jandex index
dep.addAttachment(AnnotationsInfo.class, new JandexAnnotationsInfo(unit));
@@ -224,7 +212,11 @@
* @param loader deployment loader
* @return new archive deployment
*/
- private ArchiveDeployment newDeployment(final String name, final ClassLoader loader) {
- return (ArchiveDeployment) this.deploymentModelFactory.newDeployment(name, loader);
+ private ArchiveDeployment newDeployment(final ArchiveDeployment parent, final String name, final ClassLoader loader, final UnifiedVirtualFile rootFile) {
+ if (parent != null) {
+ return (ArchiveDeployment) this.deploymentModelFactory.newDeployment(parent, name, loader, rootFile);
+ } else {
+ return (ArchiveDeployment) this.deploymentModelFactory.newDeployment(name, loader, rootFile);
+ }
}
}
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXWS_EJB.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXWS_EJB.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXWS_EJB.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -24,7 +24,6 @@
import static org.jboss.as.webservices.WSLogger.ROOT_LOGGER;
import static org.jboss.as.webservices.metadata.model.AbstractEndpoint.COMPONENT_VIEW_NAME;
import static org.jboss.as.webservices.util.ASHelper.getJaxwsEjbs;
-import static org.jboss.wsf.spi.deployment.DeploymentType.JAXWS;
import static org.jboss.wsf.spi.deployment.EndpointType.JAXWS_EJB3;
import org.jboss.as.server.deployment.DeploymentUnit;
@@ -41,7 +40,7 @@
final class DeploymentModelBuilderJAXWS_EJB extends AbstractDeploymentModelBuilder {
DeploymentModelBuilderJAXWS_EJB() {
- super(JAXWS, JAXWS_EJB3);
+ super(JAXWS_EJB3);
}
@Override
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXWS_JMS.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXWS_JMS.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXWS_JMS.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -24,7 +24,6 @@
import static org.jboss.as.webservices.WSLogger.ROOT_LOGGER;
import static org.jboss.as.webservices.util.ASHelper.getOptionalAttachment;
import static org.jboss.as.webservices.util.WSAttachmentKeys.JMS_ENDPOINT_METADATA_KEY;
-import static org.jboss.wsf.spi.deployment.DeploymentType.JAXWS;
import static org.jboss.wsf.spi.deployment.EndpointType.JAXWS_JSE;
import org.jboss.as.server.deployment.DeploymentUnit;
@@ -40,7 +39,7 @@
final class DeploymentModelBuilderJAXWS_JMS extends AbstractDeploymentModelBuilder {
DeploymentModelBuilderJAXWS_JMS() {
- super(JAXWS, JAXWS_JSE);
+ super(JAXWS_JSE);
}
@Override
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXWS_POJO.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXWS_POJO.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXWS_POJO.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -24,7 +24,6 @@
import static org.jboss.as.webservices.WSLogger.ROOT_LOGGER;
import static org.jboss.as.webservices.metadata.model.AbstractEndpoint.COMPONENT_VIEW_NAME;
import static org.jboss.as.webservices.util.ASHelper.getJaxwsPojos;
-import static org.jboss.wsf.spi.deployment.DeploymentType.JAXWS;
import static org.jboss.wsf.spi.deployment.EndpointType.JAXWS_JSE;
import org.jboss.as.server.deployment.DeploymentUnit;
@@ -41,7 +40,7 @@
final class DeploymentModelBuilderJAXWS_POJO extends AbstractDeploymentModelBuilder {
DeploymentModelBuilderJAXWS_POJO() {
- super(JAXWS, JAXWS_JSE);
+ super(JAXWS_JSE);
}
@Override
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/dmr/ClientConfigAdd.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/dmr/ClientConfigAdd.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/dmr/ClientConfigAdd.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -36,7 +36,6 @@
import org.jboss.as.webservices.util.ASHelper;
import org.jboss.as.webservices.util.WSServices;
import org.jboss.dmr.ModelNode;
-import org.jboss.msc.inject.Injector;
import org.jboss.msc.service.ServiceBuilder;
import org.jboss.msc.service.ServiceController;
import org.jboss.msc.service.ServiceName;
@@ -80,10 +79,15 @@
final ConfigService clientConfigService = new ConfigService(serverConfig, name, true);
final ServiceTarget target = context.getServiceTarget();
final ServiceBuilder<?> clientServiceBuilder = target.addService(serviceName, clientConfigService);
- setDependency(context, clientServiceBuilder, clientConfigService.getPropertiesInjector(), PropertyService.class, serviceName, address, Constants.PROPERTY);
- setDependency(context, clientServiceBuilder, clientConfigService.getPreHandlerChainsInjector(), UnifiedHandlerChainMetaData.class, serviceName, address, Constants.PRE_HANDLER_CHAIN);
- final Injector<UnifiedHandlerChainMetaData> postInjector = clientConfigService.getPostHandlerChainsInjector();
- setDependency(context, clientServiceBuilder, postInjector, UnifiedHandlerChainMetaData.class, serviceName, address, Constants.POST_HANDLER_CHAIN);
+ for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, Constants.PROPERTY)) {
+ clientServiceBuilder.addDependency(sn, PropertyService.class, clientConfigService.getPropertiesInjector()); //get a new injector instance each time
+ }
+ for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, Constants.PRE_HANDLER_CHAIN)) {
+ clientServiceBuilder.addDependency(sn, UnifiedHandlerChainMetaData.class, clientConfigService.getPreHandlerChainsInjector()); //get a new injector instance each time
+ }
+ for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, Constants.POST_HANDLER_CHAIN)) {
+ clientServiceBuilder.addDependency(sn, UnifiedHandlerChainMetaData.class, clientConfigService.getPostHandlerChainsInjector()); //get a new injector instance each time
+ }
ServiceController<?> controller = clientServiceBuilder.setInitialMode(ServiceController.Mode.ACTIVE).install();
if (newControllers != null) {
newControllers.add(controller);
@@ -92,11 +96,4 @@
context.reloadRequired();
}
}
-
- private <T> void setDependency(final OperationContext context, final ServiceBuilder<?> builder, final Injector<T> injector,
- final Class<T> injectedClass, final ServiceName serviceName, final PathAddress address, final String handlerChainType) {
- for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, handlerChainType)) {
- builder.addDependency(sn, injectedClass, injector);
- }
- }
}
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/dmr/EndpointConfigAdd.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/dmr/EndpointConfigAdd.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/dmr/EndpointConfigAdd.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -32,10 +32,10 @@
import org.jboss.as.controller.PathAddress;
import org.jboss.as.controller.ServiceVerificationHandler;
import org.jboss.as.webservices.service.ConfigService;
+import org.jboss.as.webservices.service.PropertyService;
import org.jboss.as.webservices.util.ASHelper;
import org.jboss.as.webservices.util.WSServices;
import org.jboss.dmr.ModelNode;
-import org.jboss.msc.inject.Injector;
import org.jboss.msc.service.ServiceBuilder;
import org.jboss.msc.service.ServiceController;
import org.jboss.msc.service.ServiceName;
@@ -82,10 +82,17 @@
final ConfigService endpointConfigService = new ConfigService(serverConfig, name, false);
final ServiceTarget target = context.getServiceTarget();
- final ServiceBuilder<?> clientServiceBuilder = target.addService(serviceName, endpointConfigService);
- setDependency(context, clientServiceBuilder, endpointConfigService.getPreHandlerChainsInjector(), serviceName, address, Constants.PRE_HANDLER_CHAIN);
- setDependency(context, clientServiceBuilder, endpointConfigService.getPostHandlerChainsInjector(), serviceName, address, Constants.POST_HANDLER_CHAIN);
- ServiceController<?> controller = clientServiceBuilder.setInitialMode(ServiceController.Mode.ACTIVE).install();
+ final ServiceBuilder<?> serviceBuilder = target.addService(serviceName, endpointConfigService);
+ for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, Constants.PROPERTY)) {
+ serviceBuilder.addDependency(sn, PropertyService.class, endpointConfigService.getPropertiesInjector()); //get a new injector instance each time
+ }
+ for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, Constants.PRE_HANDLER_CHAIN)) {
+ serviceBuilder.addDependency(sn, UnifiedHandlerChainMetaData.class, endpointConfigService.getPreHandlerChainsInjector()); //get a new injector instance each time
+ }
+ for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, Constants.POST_HANDLER_CHAIN)) {
+ serviceBuilder.addDependency(sn, UnifiedHandlerChainMetaData.class, endpointConfigService.getPostHandlerChainsInjector()); //get a new injector instance each time
+ }
+ ServiceController<?> controller = serviceBuilder.setInitialMode(ServiceController.Mode.ACTIVE).install();
if (newControllers != null) {
newControllers.add(controller);
}
@@ -93,11 +100,4 @@
context.reloadRequired();
}
}
-
- private void setDependency(final OperationContext context, final ServiceBuilder<?> builder, final Injector<UnifiedHandlerChainMetaData> injector,
- final ServiceName serviceName, final PathAddress address, final String handlerChainType) {
- for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, handlerChainType)) {
- builder.addDependency(sn, UnifiedHandlerChainMetaData.class, injector);
- }
- }
}
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/dmr/HandlerChainAdd.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/dmr/HandlerChainAdd.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/dmr/HandlerChainAdd.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -86,7 +86,7 @@
final ServiceTarget target = context.getServiceTarget();
final ServiceBuilder<?> handlerChainServiceBuilder = target.addService(handlerChainServiceName, service);
for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, handlerChainServiceName, address, HANDLER)) {
- handlerChainServiceBuilder.addDependency(sn, UnifiedHandlerMetaData.class, service.getHandlersInjector());
+ handlerChainServiceBuilder.addDependency(sn, UnifiedHandlerMetaData.class, service.getHandlersInjector()); //get a new injector instance each time
}
ServiceController<?> controller = handlerChainServiceBuilder.setInitialMode(ServiceController.Mode.ACTIVE).install();
if (newControllers != null) {
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSDeploymentActivator.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSDeploymentActivator.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSDeploymentActivator.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
+ * Copyright 2014, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -44,6 +44,7 @@
import org.jboss.as.webservices.deployers.WebservicesDescriptorDeploymentProcessor;
import org.jboss.as.webservices.deployers.deployment.DeploymentAspectsProvider;
import org.jboss.as.webservices.injection.WSHandlerChainAnnotationProcessor;
+import org.jboss.as.webservices.util.ModuleClassLoaderProvider;
import org.jboss.as.webservices.webserviceref.WSRefAnnotationProcessor;
import org.jboss.as.webservices.webserviceref.WSRefDDProcessor;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
@@ -55,6 +56,9 @@
final class WSDeploymentActivator {
static void activate(final DeploymentProcessorTarget processorTarget, final boolean appclient) {
+ if (!isModularEnvironment()) {
+ return;
+ }
processorTarget.addDeploymentProcessor(WSExtension.SUBSYSTEM_NAME, Phase.POST_MODULE, Phase.POST_MODULE_WS_REF_DESCRIPTOR, new WSRefDDProcessor());
processorTarget.addDeploymentProcessor(WSExtension.SUBSYSTEM_NAME, Phase.POST_MODULE, Phase.POST_MODULE_WS_REF_ANNOTATION, new WSRefAnnotationProcessor());
if (!appclient) {
@@ -85,4 +89,13 @@
}
}
+ private static boolean isModularEnvironment() {
+ try {
+ ModuleClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
+ return true;
+ } catch (Exception e) {
+ ROOT_LOGGER.couldNotActivateSubsystem(e);
+ return false;
+ }
+ }
}
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/injection/InjectionDeploymentAspect.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/injection/InjectionDeploymentAspect.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/injection/InjectionDeploymentAspect.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
+ * Copyright 2014, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -19,7 +19,6 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-
package org.jboss.as.webservices.injection;
import java.security.AccessController;
@@ -35,7 +34,6 @@
import org.jboss.msc.service.ServiceName;
import org.jboss.ws.common.deployment.ReferenceFactory;
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
-import org.jboss.ws.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.InstanceProvider;
@@ -48,8 +46,6 @@
@Override
public void start(final Deployment dep) {
- if (WSHelper.isJaxrpcDeployment(dep)) return;
-
for (final Endpoint ep : dep.getService().getEndpoints()) {
setInjectionAwareInstanceProvider(ep);
}
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandler.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandler.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandler.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -36,6 +36,7 @@
import org.jboss.as.ee.component.Component;
import org.jboss.as.ee.component.ComponentView;
import org.jboss.as.naming.ManagedReference;
+import org.jboss.as.webservices.WSLogger;
import org.jboss.as.webservices.injection.WSComponent;
import org.jboss.invocation.InterceptorContext;
import org.jboss.msc.service.ServiceName;
@@ -76,7 +77,7 @@
if (componentView == null) {
componentView = getMSCService(componentViewName, ComponentView.class);
if (componentView == null) {
- throw MESSAGES.cannotFindComponentView(componentViewName);
+ throw MESSAGES.cannotFindComponentView(componentViewName);
}
if (reference == null) {
try {
@@ -102,22 +103,24 @@
try {
// prepare for invocation
onBeforeInvocation(wsInvocation);
- //for spring integration we don't need to go into ee's interceptors
- if(wsInvocation.getInvocationContext().getTargetBean() != null && endpoint.getProperty("SpringBus") != null) {
- this.reference = new ManagedReference() {
- public void release() {
- }
-
- public Object getInstance() {
- return wsInvocation.getInvocationContext().getTargetBean();
- }
- };
- }
// prepare invocation data
final ComponentView componentView = getComponentView();
Component component = componentView.getComponent();
- if (component instanceof WSComponent && endpoint.getProperty("SpringBus") != null) {
- ((WSComponent)component).setReference(reference);
+ //for spring integration and @FactoryType is annotated we don't need to go into ee's interceptors
+ if(wsInvocation.getInvocationContext().getTargetBean() != null
+ && (endpoint.getProperty("SpringBus") != null)
+ || wsInvocation.getInvocationContext().getProperty("forceTargetBean") != null) {
+ this.reference = new ManagedReference() {
+ public void release() {
+ }
+
+ public Object getInstance() {
+ return wsInvocation.getInvocationContext().getTargetBean();
+ }
+ };
+ if (component instanceof WSComponent) {
+ ((WSComponent) component).setReference(reference);
+ }
}
final Method method = getComponentViewMethod(wsInvocation.getJavaMethod(), componentView.getViewMethods());
final InterceptorContext context = new InterceptorContext();
@@ -126,13 +129,15 @@
context.setParameters(wsInvocation.getArgs());
context.putPrivateData(Component.class, component);
context.putPrivateData(ComponentView.class, componentView);
+ if(wsInvocation.getInvocationContext().getProperty("forceTargetBean") != null) {
+ context.putPrivateData(ManagedReference.class, reference);
+ }
// invoke method
final Object retObj = componentView.invoke(context);
// set return value
wsInvocation.setReturnValue(retObj);
}
catch (Throwable t) {
- log.error(MESSAGES.methodInvocationFailed(t.getLocalizedMessage()), t);
handleInvocationException(t);
}
finally {
@@ -209,5 +214,4 @@
return true;
}
-}
-
+}
\ No newline at end of file
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderEJB.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderEJB.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderEJB.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -51,12 +51,12 @@
*/
final EJBArchiveMetaData create(final Deployment dep) {
ROOT_LOGGER.creatingEjbDeployment(dep.getSimpleName());
- final EJBArchiveMetaData ejbArchiveMD = new EJBArchiveMetaData();
+ final EJBArchiveMetaData.Builder ejbArchiveMDBuilder = new EJBArchiveMetaData.Builder();
- this.buildEnterpriseBeansMetaData(dep, ejbArchiveMD);
- this.buildWebservicesMetaData(dep, ejbArchiveMD);
+ this.buildEnterpriseBeansMetaData(dep, ejbArchiveMDBuilder);
+ this.buildWebservicesMetaData(dep, ejbArchiveMDBuilder);
- return ejbArchiveMD;
+ return ejbArchiveMDBuilder.build();
}
/**
@@ -67,7 +67,7 @@
* @param ejbMetaData
* universal EJB meta data model
*/
- protected abstract void buildEnterpriseBeansMetaData(Deployment dep, EJBArchiveMetaData ejbMetaData);
+ protected abstract void buildEnterpriseBeansMetaData(Deployment dep, EJBArchiveMetaData.Builder ejbMetaDataBuilder);
/**
* Builds webservices meta data. This methods sets:
@@ -81,7 +81,7 @@
* @param dep webservice deployment
* @param ejbArchiveMD universal EJB meta data model
*/
- private void buildWebservicesMetaData(final Deployment dep, final EJBArchiveMetaData ejbArchiveMD)
+ private void buildWebservicesMetaData(final Deployment dep, final EJBArchiveMetaData.Builder ejbArchiveMDBuilder)
{
final JBossWebservicesMetaData webservicesMD = WSHelper.getOptionalAttachment(dep, JBossWebservicesMetaData.class);
@@ -89,23 +89,23 @@
// set context root
final String contextRoot = webservicesMD.getContextRoot();
- ejbArchiveMD.setWebServiceContextRoot(contextRoot);
+ ejbArchiveMDBuilder.setWebServiceContextRoot(contextRoot);
ROOT_LOGGER.settingContextRoot(contextRoot);
// set config name
final String configName = webservicesMD.getConfigName();
- ejbArchiveMD.setConfigName(configName);
+ ejbArchiveMDBuilder.setConfigName(configName);
ROOT_LOGGER.settingConfigName(configName);
// set config file
final String configFile = webservicesMD.getConfigFile();
- ejbArchiveMD.setConfigFile(configFile);
+ ejbArchiveMDBuilder.setConfigFile(configFile);
ROOT_LOGGER.settingConfigFile(configFile);
// set wsdl location resolver
final JBossWebserviceDescriptionMetaData[] wsDescriptionsMD = webservicesMD.getWebserviceDescriptions();
final PublishLocationAdapter resolver = new PublishLocationAdapterImpl(wsDescriptionsMD);
- ejbArchiveMD.setPublishLocationAdapter(resolver);
+ ejbArchiveMDBuilder.setPublishLocationAdapter(resolver);
}
protected JBossPortComponentMetaData getPortComponent(final String ejbName, final JBossWebservicesMetaData jbossWebservicesMD) {
@@ -125,37 +125,30 @@
* jboss agnostic EJBs meta data
*/
protected void buildEnterpriseBeanMetaData(final List<EJBMetaData> wsEjbsMD, final EJBEndpoint ejbEndpoint, final JBossWebservicesMetaData jbossWebservicesMD) {
- final EJBMetaData wsEjbMD = new SLSBMetaData();
+ final SLSBMetaData.Builder wsEjbMDBuilder = new SLSBMetaData.Builder();
// set EJB name and class
- wsEjbMD.setEjbName(ejbEndpoint.getName());
- wsEjbMD.setEjbClass(ejbEndpoint.getClassName());
+ wsEjbMDBuilder.setEjbName(ejbEndpoint.getName());
+ wsEjbMDBuilder.setEjbClass(ejbEndpoint.getClassName());
final JBossPortComponentMetaData portComponentMD = getPortComponent(ejbEndpoint.getName(), jbossWebservicesMD);
if (portComponentMD != null) {
// set port component meta data
- wsEjbMD.setPortComponentName(portComponentMD.getPortComponentName());
- wsEjbMD.setPortComponentURI(portComponentMD.getPortComponentURI());
+ wsEjbMDBuilder.setPortComponentName(portComponentMD.getPortComponentName());
+ wsEjbMDBuilder.setPortComponentURI(portComponentMD.getPortComponentURI());
}
// set security meta data
- buildSecurityMetaData(wsEjbMD, ejbEndpoint, portComponentMD);
-
- wsEjbsMD.add(wsEjbMD);
- }
-
- private static void buildSecurityMetaData(final EJBMetaData wsEjbMD, final EJBEndpoint ejbEndpoint, final JBossPortComponentMetaData portComponentMD) {
- final EJBSecurityMetaData smd = new EJBSecurityMetaData();
// auth method
final String authMethod = getAuthMethod(ejbEndpoint, portComponentMD);
- smd.setAuthMethod(authMethod);
// transport guarantee
final String transportGuarantee = getTransportGuarantee(ejbEndpoint, portComponentMD);
- smd.setTransportGuarantee(transportGuarantee);
// secure wsdl access
final boolean secureWsdlAccess = isSecureWsdlAccess(ejbEndpoint, portComponentMD);
- smd.setSecureWSDLAccess(secureWsdlAccess);
+ final String realmName = getRealmName(ejbEndpoint, portComponentMD);
// propagate
- wsEjbMD.setSecurityMetaData(smd);
+ wsEjbMDBuilder.setSecurityMetaData(new EJBSecurityMetaData(authMethod, realmName, transportGuarantee, secureWsdlAccess));
+
+ wsEjbsMD.add(wsEjbMDBuilder.build());
}
private static String getAuthMethod(final EJBEndpoint ejbEndpoint, final JBossPortComponentMetaData portComponentMD) {
@@ -173,4 +166,9 @@
return (portComponentMD != null && portComponentMD.getSecureWSDLAccess() != null) ? portComponentMD.getSecureWSDLAccess() : false;
}
+ private static String getRealmName(final EJBEndpoint ejbEndpoint, final JBossPortComponentMetaData portComponentMD) {
+ if (ejbEndpoint.getRealmName() != null) return ejbEndpoint.getRealmName();
+ return portComponentMD != null ? portComponentMD.getRealmName() : null;
+ }
+
}
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderPOJO.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderPOJO.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderPOJO.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -38,13 +38,11 @@
import org.jboss.metadata.web.spec.SecurityConstraintMetaData;
import org.jboss.metadata.web.spec.ServletMappingMetaData;
import org.jboss.metadata.web.spec.WebResourceCollectionMetaData;
-import org.jboss.metadata.web.spec.WebResourceCollectionsMetaData;
import org.jboss.ws.common.integration.WSConstants;
import org.jboss.ws.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData.JSEResourceCollection;
import org.jboss.wsf.spi.metadata.j2ee.PublishLocationAdapter;
import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
@@ -72,40 +70,40 @@
final JBossWebMetaData jbossWebMD = WSHelper.getRequiredAttachment(dep, JBossWebMetaData.class);
final DeploymentUnit unit = WSHelper.getRequiredAttachment(dep, DeploymentUnit.class);
final List<POJOEndpoint> pojoEndpoints = getPojoEndpoints(unit);
- final JSEArchiveMetaData jseArchiveMD = new JSEArchiveMetaData();
+ final JSEArchiveMetaData.Builder jseArchiveMDBuilder = new JSEArchiveMetaData.Builder();
// set context root
final String contextRoot = getContextRoot(dep, jbossWebMD);
- jseArchiveMD.setContextRoot(contextRoot);
+ jseArchiveMDBuilder.setContextRoot(contextRoot);
ROOT_LOGGER.settingContextRoot(contextRoot);
// set servlet url patterns mappings
final Map<String, String> servletMappings = getServletUrlPatternsMappings(jbossWebMD, pojoEndpoints);
- jseArchiveMD.setServletMappings(servletMappings);
+ jseArchiveMDBuilder.setServletMappings(servletMappings);
// set servlet class names mappings
final Map<String, String> servletClassNamesMappings = getServletClassMappings(jbossWebMD, pojoEndpoints);
- jseArchiveMD.setServletClassNames(servletClassNamesMappings);
+ jseArchiveMDBuilder.setServletClassNames(servletClassNamesMappings);
// set security domain
final String securityDomain = jbossWebMD.getSecurityDomain();
- jseArchiveMD.setSecurityDomain(securityDomain);
+ jseArchiveMDBuilder.setSecurityDomain(securityDomain);
// set wsdl location resolver
final JBossWebservicesMetaData jbossWebservicesMD = WSHelper.getOptionalAttachment(dep, JBossWebservicesMetaData.class);
if (jbossWebservicesMD != null) {
final PublishLocationAdapter resolver = new PublishLocationAdapterImpl(jbossWebservicesMD.getWebserviceDescriptions());
- jseArchiveMD.setPublishLocationAdapter(resolver);
+ jseArchiveMDBuilder.setPublishLocationAdapter(resolver);
}
// set security meta data
final List<JSESecurityMetaData> jseSecurityMDs = getSecurityMetaData(jbossWebMD.getSecurityConstraints());
- jseArchiveMD.setSecurityMetaData(jseSecurityMDs);
+ jseArchiveMDBuilder.setSecurityMetaData(jseSecurityMDs);
// set config name and file
- setConfigNameAndFile(jseArchiveMD, jbossWebMD, jbossWebservicesMD);
+ setConfigNameAndFile(jseArchiveMDBuilder, jbossWebMD, jbossWebservicesMD);
- return jseArchiveMD;
+ return jseArchiveMDBuilder.build();
}
protected abstract List<POJOEndpoint> getPojoEndpoints(final DeploymentUnit unit);
@@ -116,14 +114,14 @@
* @param jseArchiveMD universal JSE meta data model
* @param jbossWebMD jboss web meta data
*/
- private void setConfigNameAndFile(final JSEArchiveMetaData jseArchiveMD, final JBossWebMetaData jbossWebMD, final JBossWebservicesMetaData jbossWebservicesMD) {
+ private void setConfigNameAndFile(final JSEArchiveMetaData.Builder jseArchiveMDBuilder, final JBossWebMetaData jbossWebMD, final JBossWebservicesMetaData jbossWebservicesMD) {
if (jbossWebservicesMD != null) {
if (jbossWebservicesMD.getConfigName() != null) {
final String configName = jbossWebservicesMD.getConfigName();
- jseArchiveMD.setConfigName(configName);
+ jseArchiveMDBuilder.setConfigName(configName);
ROOT_LOGGER.settingConfigName(configName);
final String configFile = jbossWebservicesMD.getConfigFile();
- jseArchiveMD.setConfigFile(configFile);
+ jseArchiveMDBuilder.setConfigFile(configFile);
ROOT_LOGGER.settingConfigFile(configFile);
// ensure higher priority against web.xml context parameters
@@ -136,12 +134,12 @@
for (final ParamValueMetaData contextParam : contextParams) {
if (WSConstants.JBOSSWS_CONFIG_NAME.equals(contextParam.getParamName())) {
final String configName = contextParam.getParamValue();
- jseArchiveMD.setConfigName(configName);
+ jseArchiveMDBuilder.setConfigName(configName);
ROOT_LOGGER.settingConfigName(configName);
}
if (WSConstants.JBOSSWS_CONFIG_FILE.equals(contextParam.getParamName())) {
final String configFile = contextParam.getParamValue();
- jseArchiveMD.setConfigFile(configFile);
+ jseArchiveMDBuilder.setConfigFile(configFile);
ROOT_LOGGER.settingConfigFile(configFile);
}
}
@@ -159,15 +157,17 @@
if (securityConstraintsMD != null) {
for (final SecurityConstraintMetaData securityConstraintMD : securityConstraintsMD) {
- final JSESecurityMetaData jseSecurityMD = new JSESecurityMetaData();
+ final JSESecurityMetaData.Builder jseSecurityMDBuilder = new JSESecurityMetaData.Builder();
// transport guarantee
- jseSecurityMD.setTransportGuarantee(securityConstraintMD.getTransportGuarantee().name());
-
+ jseSecurityMDBuilder.setTransportGuarantee(securityConstraintMD.getTransportGuarantee().name());
+
// web resources
- this.setWebResources(jseSecurityMD, securityConstraintMD);
+ for (final WebResourceCollectionMetaData webResourceMD : securityConstraintMD.getResourceCollections()) {
+ jseSecurityMDBuilder.addWebResource(webResourceMD.getName(), webResourceMD.getUrlPatterns());
+ }
- jseSecurityMDs.add(jseSecurityMD);
+ jseSecurityMDs.add(jseSecurityMDBuilder.build());
}
}
@@ -175,24 +175,6 @@
}
/**
- * Sets web resources in universal meta data model.
- *
- * @param jseSecurityMD universal JSE security meta data model
- * @param securityConstraintMD security constraint meta data
- */
- private void setWebResources(final JSESecurityMetaData jseSecurityMD, final SecurityConstraintMetaData securityConstraintMD) {
- final WebResourceCollectionsMetaData webResources = securityConstraintMD.getResourceCollections();
-
- for (final WebResourceCollectionMetaData webResourceMD : webResources) {
- final JSEResourceCollection jseResource = jseSecurityMD.addWebResource(webResourceMD.getName());
-
- for (final String webResourceUrlPatterns : webResourceMD.getUrlPatterns()) {
- jseResource.addPattern(webResourceUrlPatterns);
- }
- }
- }
-
- /**
* Returns servlet name to url pattern mappings.
*
* @param jbossWebMD jboss web meta data
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/metadata/MetaDataBuilderJAXWS_EJB.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/metadata/MetaDataBuilderJAXWS_EJB.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/metadata/MetaDataBuilderJAXWS_EJB.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -42,14 +42,14 @@
final class MetaDataBuilderJAXWS_EJB extends AbstractMetaDataBuilderEJB {
@Override
- protected void buildEnterpriseBeansMetaData(final Deployment dep, final EJBArchiveMetaData ejbArchiveMD) {
+ protected void buildEnterpriseBeansMetaData(final Deployment dep, final EJBArchiveMetaData.Builder ejbArchiveMDBuilder) {
if (!WSHelper.isJaxwsJseDeployment(dep)) { // [AS7-1605] support
final JBossWebMetaData jbossWebMD = WSHelper.getOptionalAttachment(dep, JBossWebMetaData.class);
final String contextRoot = getContextRoot(dep, jbossWebMD);
if (contextRoot != null) {
- final JSEArchiveMetaData jseArchiveMD = new JSEArchiveMetaData();
- jseArchiveMD.setContextRoot(contextRoot);
- dep.addAttachment(JSEArchiveMetaData.class, jseArchiveMD);
+ final JSEArchiveMetaData.Builder jseArchiveMDBuilder = new JSEArchiveMetaData.Builder();
+ jseArchiveMDBuilder.setContextRoot(contextRoot);
+ dep.addAttachment(JSEArchiveMetaData.class, jseArchiveMDBuilder.build());
}
}
@@ -61,7 +61,7 @@
buildEnterpriseBeanMetaData(wsEjbsMD, jbossEjbMD, jbossWebservicesMD);
}
- ejbArchiveMD.setEnterpriseBeans(wsEjbsMD);
+ ejbArchiveMDBuilder.setEnterpriseBeans(wsEjbsMD);
}
}
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/metadata/model/EJBEndpoint.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/metadata/model/EJBEndpoint.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/metadata/model/EJBEndpoint.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -38,12 +38,14 @@
private final String authMethod;
private final boolean secureWsdlAccess;
private final String transportGuarantee;
-
- public EJBEndpoint(final SessionBeanComponentDescription ejbMD, final ServiceName viewName, final Set<String> declaredSecurityRoles, final String authMethod, final boolean secureWsdlAccess, final String transportGuarantee) {
+ private final String realmName;
+
+ public EJBEndpoint(final SessionBeanComponentDescription ejbMD, final ServiceName viewName, final Set<String> declaredSecurityRoles, final String authMethod, final String realmName, final boolean secureWsdlAccess, final String transportGuarantee) {
super(ejbMD.getComponentName(), ejbMD.getComponentClassName(), viewName);
this.ejbMD = ejbMD;
this.declaredSecurityRoles = declaredSecurityRoles;
this.authMethod = authMethod;
+ this.realmName = realmName;
this.secureWsdlAccess = secureWsdlAccess;
this.transportGuarantee = transportGuarantee;
}
@@ -76,6 +78,9 @@
return transportGuarantee;
}
+ public String getRealmName() {
+ return realmName;
+ }
public ServiceName getEJBViewMethodSecurityAttributesService() {
return EJBViewMethodSecurityAttributesService.getServiceName(ejbMD.getApplicationName(), ejbMD.getModuleName(), ejbMD.getEJBName(), getClassName());
}
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/publish/EndpointPublisherImpl.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/publish/EndpointPublisherImpl.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/publish/EndpointPublisherImpl.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2012, Red Hat, Inc., and individual contributors
+ * Copyright 2014, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -324,7 +324,6 @@
depAspects.add(aspect);
//add another aspect to set InvocationHandlerJAXWS to each endpoint
ForceJAXWSInvocationHandlerDeploymentAspect handlerAspect = new ForceJAXWSInvocationHandlerDeploymentAspect();
- handlerAspect.setForJaxRpc(false);
depAspects.add(handlerAspect);
} else {
depAspects.add(aspect);
@@ -349,7 +348,6 @@
publisherDepAspects.add(aspect);
//add another aspect to set InvocationHandlerJAXWS to each endpoint
ForceJAXWSInvocationHandlerDeploymentAspect handlerAspect = new ForceJAXWSInvocationHandlerDeploymentAspect();
- handlerAspect.setForJaxRpc(false);
publisherDepAspects.add(handlerAspect);
} else {
publisherDepAspects.add(aspect);
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointService.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointService.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointService.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -63,9 +63,11 @@
import org.jboss.ws.common.management.AbstractServerConfig;
import org.jboss.ws.common.management.ManagedEndpoint;
import org.jboss.ws.common.monitoring.ManagedRecordProcessor;
+import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.EndpointType;
+import org.jboss.wsf.spi.management.EndpointMetricsFactory;
import org.jboss.wsf.spi.security.EJBMethodSecurityAttributeProvider;
/**
@@ -114,6 +116,8 @@
for (final RecordProcessor processor : processors) {
registerRecordProcessor(processor, endpoint);
}
+ final EndpointMetricsFactory factory = SPIProvider.getInstance().getSPI(EndpointMetricsFactory.class);
+ endpoint.setEndpointMetrics(factory.newEndpointMetrics());
registerEndpoint(endpoint);
endpoint.getLifecycleHandler().start(endpoint);
}
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/tomcat/AbstractSecurityMetaDataAccessorEJB.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/tomcat/AbstractSecurityMetaDataAccessorEJB.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/tomcat/AbstractSecurityMetaDataAccessorEJB.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -140,6 +140,11 @@
return hasEjbSecurityMD ? ejbSecurityMD.getTransportGuarantee() : null;
}
+ public String getRealmName(final Endpoint endpoint) {
+ final EJBSecurityMetaData ejbSecurityMD = this.getEjbSecurityMetaData(endpoint);
+ final boolean hasEjbSecurityMD = ejbSecurityMD != null;
+ return hasEjbSecurityMD ? ejbSecurityMD.getRealmName() : null;
+ }
/**
* Gets EJB security meta data if associated with EJB endpoint.
*
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/tomcat/SecurityMetaDataAccessorEJB.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/tomcat/SecurityMetaDataAccessorEJB.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/tomcat/SecurityMetaDataAccessorEJB.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -71,4 +71,11 @@
* @return transport guarantee or null if not specified
*/
String getTransportGuarantee(Endpoint endpoint);
+ /**
+ * Gets realm name for protect resource
+ *
+ * @param endpoint webservice EJB endpoint
+ * @return realm name or null if not specified
+ */
+ String getRealmName(Endpoint endpoint);
}
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/tomcat/ServletDelegateFactoryImpl.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/tomcat/ServletDelegateFactoryImpl.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/tomcat/ServletDelegateFactoryImpl.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -28,7 +28,7 @@
import org.jboss.wsf.spi.deployment.ServletDelegateFactory;
/**
- * AS7 implementation of {@link org.jboss.wsf.spi.deployment.ServletDelegateFactory}
+ * WildFly implementation of {@link org.jboss.wsf.spi.deployment.ServletDelegateFactory}
* that uses modular classloading for creating the delegate instance.
*
* @author alessio.soldano(a)jboss.com
@@ -38,11 +38,10 @@
public final class ServletDelegateFactoryImpl implements ServletDelegateFactory {
@Override
- public ServletDelegate newServletDelegate(final String servletClassName, final boolean isJaxWs) {
+ public ServletDelegate newServletDelegate(final String servletClassName) {
final ClassLoaderProvider provider = ClassLoaderProvider.getDefaultProvider();
- final ClassLoader classLoader = isJaxWs ? provider.getServerIntegrationClassLoader() : provider.getServerJAXRPCIntegrationClassLoader();
try {
- final Class<?> clazz = classLoader.loadClass(servletClassName);
+ final Class<?> clazz = provider.getServerIntegrationClassLoader().loadClass(servletClassName);
return (ServletDelegate) clazz.newInstance();
} catch (final Exception e) {
throw MESSAGES.cannotInstantiateServletDelegate(e, servletClassName);
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/tomcat/WebMetaDataCreator.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/tomcat/WebMetaDataCreator.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/tomcat/WebMetaDataCreator.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -267,11 +267,15 @@
private void createLoginConfig(final Deployment dep, final JBossWebMetaData jbossWebMD) {
final String authMethod = getAuthMethod(dep);
final boolean hasAuthMethod = authMethod != null;
-
+ final String realmName = getRealmName(dep);
if (hasAuthMethod) {
ROOT_LOGGER.creatingLoginConfig(EJB_WEBSERVICE_REALM, authMethod);
final LoginConfigMetaData loginConfig = WebMetaDataHelper.getLoginConfig(jbossWebMD);
- loginConfig.setRealmName(WebMetaDataCreator.EJB_WEBSERVICE_REALM);
+ if (realmName != null) {
+ loginConfig.setRealmName(realmName);
+ } else {
+ loginConfig.setRealmName(WebMetaDataCreator.EJB_WEBSERVICE_REALM);
+ }
loginConfig.setAuthMethod(authMethod);
}
}
@@ -344,4 +348,14 @@
return null;
}
+ private String getRealmName(final Deployment dep) {
+ for (final Endpoint ejbEndpoint : dep.getService().getEndpoints()) {
+ final String realmName = ejb3SecurityAccessor.getRealmName(ejbEndpoint);
+ final boolean hasRealmName = realmName != null;
+ if (hasRealmName) {
+ return realmName;
+ }
+ }
+ return null;
+ }
}
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/tomcat/WebMetaDataModifier.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/tomcat/WebMetaDataModifier.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/tomcat/WebMetaDataModifier.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -94,8 +94,6 @@
final List<ParamValueMetaData> initParams = WebMetaDataHelper.getServletInitParams(servletMD);
// configure transport class name
WebMetaDataHelper.newParamValue(WSFServlet.STACK_SERVLET_DELEGATE_CLASS, transportClassName, initParams);
- // configure the integration classloader to be used (JAXRPC or JAXWS)
- WebMetaDataHelper.newParamValue(WSFServlet.INTEGRATION_CLASSLOADER, dep.getType().toString(), initParams);
// configure webservice endpoint
WebMetaDataHelper.newParamValue(Endpoint.SEPID_DOMAIN_ENDPOINT, endpointClassName, initParams);
}
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/util/VirtualFileAdaptor.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/util/VirtualFileAdaptor.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/util/VirtualFileAdaptor.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -43,7 +43,7 @@
private static final long serialVersionUID = -4509594124653184349L;
- private transient VirtualFile file;
+ private final transient VirtualFile file;
public VirtualFileAdaptor(VirtualFile file) {
this.file = file;
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefDDProcessor.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefDDProcessor.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefDDProcessor.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -89,8 +89,8 @@
throw MESSAGES.jaxRpcNotSupported();
}
// construct service ref
- final UnifiedServiceRefMetaData serviceRefUMDM = new UnifiedServiceRefMetaData(getUnifiedVirtualFile(unit));
- translate(serviceRefMD, serviceRefUMDM);
+ final UnifiedServiceRefMetaData serviceRefUMDM = translate(serviceRefMD);
+ serviceRefUMDM.setVfsRoot(getUnifiedVirtualFile(unit));
processWSFeatures(unit, serviceRefMD.getInjectionTargets(), serviceRefUMDM);
final WSRefRegistry wsRefRegistry = ASHelper.getWSRefRegistry(unit);
wsRefRegistry.add(getCacheKey(componentDescription, serviceRefUMDM), serviceRefUMDM);
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefUtils.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefUtils.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefUtils.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
+ * Copyright 2014, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -53,14 +53,18 @@
import org.jboss.metadata.javaee.spec.ServiceReferenceHandlerChainsMetaData;
import org.jboss.metadata.javaee.spec.ServiceReferenceHandlerMetaData;
import org.jboss.metadata.javaee.spec.ServiceReferenceMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.AddressingMetadata;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.MTOMMetadata;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.RespectBindingMetadata;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaDataBuilder;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaDataBuilder;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedStubPropertyMetaData;
-import org.jboss.wsf.spi.serviceref.ServiceRefType;
/**
* Translates WS Refs from JBossAS MD to JBossWS UMDM format.
@@ -74,22 +78,22 @@
private WSRefUtils() {
}
- static UnifiedServiceRefMetaData translate(final ServiceReferenceMetaData serviceRefMD, final UnifiedServiceRefMetaData serviceRefUMDM) {
- serviceRefUMDM.setServiceRefName(serviceRefMD.getName());
- serviceRefUMDM.setServiceRefType(serviceRefMD.getServiceRefType());
- serviceRefUMDM.setServiceInterface(serviceRefMD.getServiceInterface());
- serviceRefUMDM.setWsdlFile(serviceRefMD.getWsdlFile());
- serviceRefUMDM.setMappingFile(serviceRefMD.getJaxrpcMappingFile());
- serviceRefUMDM.setServiceQName(serviceRefMD.getServiceQname());
+ static UnifiedServiceRefMetaData translate(final ServiceReferenceMetaData serviceRefMD) {
+ UnifiedServiceRefMetaDataBuilder builder = new UnifiedServiceRefMetaDataBuilder();
+ builder.setServiceRefName(serviceRefMD.getName());
+ builder.setServiceRefType(serviceRefMD.getServiceRefType());
+ builder.setServiceInterface(serviceRefMD.getServiceInterface());
+ builder.setWsdlFile(serviceRefMD.getWsdlFile());
+ builder.setMappingFile(serviceRefMD.getJaxrpcMappingFile());
+ builder.setServiceQName(serviceRefMD.getServiceQname());
// propagate port components
final Collection<? extends PortComponentRef> portComponentsMD = serviceRefMD.getPortComponentRef();
if (portComponentsMD != null) {
for (final PortComponentRef portComponentMD : portComponentsMD) {
- final UnifiedPortComponentRefMetaData portComponentUMDM = getUnifiedPortComponentRefMetaData(serviceRefUMDM,
- portComponentMD);
+ final UnifiedPortComponentRefMetaData portComponentUMDM = getUnifiedPortComponentRefMetaData(portComponentMD);
if (portComponentUMDM.getServiceEndpointInterface() != null || portComponentUMDM.getPortQName() != null) {
- serviceRefUMDM.addPortComponentRef(portComponentUMDM);
+ builder.addPortComponentRef(portComponentUMDM);
} else {
ROOT_LOGGER.ignoringPortComponentRef(portComponentUMDM);
}
@@ -101,7 +105,7 @@
if (handlersMD != null) {
for (final ServiceReferenceHandlerMetaData handlerMD : handlersMD) {
final UnifiedHandlerMetaData handlerUMDM = getUnifiedHandlerMetaData(handlerMD);
- serviceRefUMDM.addHandler(handlerUMDM);
+ builder.addHandler(handlerUMDM);
}
}
@@ -109,81 +113,71 @@
ServiceReferenceHandlerChainsMetaData handlerChainsMD = serviceRefMD.getHandlerChains();
if (handlerChainsMD != null) {
final UnifiedHandlerChainsMetaData handlerChainsUMDM = getUnifiedHandlerChainsMetaData(handlerChainsMD);
- serviceRefUMDM.setHandlerChains(handlerChainsUMDM);
+ builder.setHandlerChains(handlerChainsUMDM);
}
// propagate jboss specific MD
if (serviceRefMD instanceof JBossServiceReferenceMetaData) {
- processUnifiedJBossServiceRefMetaData(serviceRefUMDM, serviceRefMD);
+ final JBossServiceReferenceMetaData jbossServiceRefMD = (JBossServiceReferenceMetaData) serviceRefMD;
+ builder.setServiceImplClass(jbossServiceRefMD.getServiceClass());
+ builder.setConfigName(jbossServiceRefMD.getConfigName());
+ builder.setConfigFile(jbossServiceRefMD.getConfigFile());
+ builder.setWsdlOverride(jbossServiceRefMD.getWsdlOverride());
+ builder.setHandlerChain(jbossServiceRefMD.getHandlerChain());
}
- serviceRefUMDM.setType(ServiceRefType.JAXWS);
-
- return serviceRefUMDM;
+ return builder.build();
}
- private static void processUnifiedJBossServiceRefMetaData(final UnifiedServiceRefMetaData serviceRefUMDM, final ServiceReferenceMetaData serviceRefMD) {
- final JBossServiceReferenceMetaData jbossServiceRefMD = (JBossServiceReferenceMetaData) serviceRefMD;
- serviceRefUMDM.setServiceImplClass(jbossServiceRefMD.getServiceClass());
- serviceRefUMDM.setConfigName(jbossServiceRefMD.getConfigName());
- serviceRefUMDM.setConfigFile(jbossServiceRefMD.getConfigFile());
- serviceRefUMDM.setWsdlOverride(jbossServiceRefMD.getWsdlOverride());
- serviceRefUMDM.setHandlerChain(jbossServiceRefMD.getHandlerChain());
- }
+ private static UnifiedPortComponentRefMetaData getUnifiedPortComponentRefMetaData(final PortComponentRef portComponentMD) {
+ final UnifiedPortComponentRefMetaDataBuilder builder = new UnifiedPortComponentRefMetaDataBuilder();
- private static UnifiedPortComponentRefMetaData getUnifiedPortComponentRefMetaData(final UnifiedServiceRefMetaData serviceRefUMDM, final PortComponentRef portComponentMD) {
- final UnifiedPortComponentRefMetaData portComponentUMDM = new UnifiedPortComponentRefMetaData(serviceRefUMDM);
-
// propagate service endpoint interface
- portComponentUMDM.setServiceEndpointInterface(portComponentMD.getServiceEndpointInterface());
+ builder.setServiceEndpointInterface(portComponentMD.getServiceEndpointInterface());
// propagate MTOM properties
- portComponentUMDM.setMtomEnabled(portComponentMD.isEnableMtom());
- portComponentUMDM.setMtomThreshold(portComponentMD.getMtomThreshold());
+ builder.setMtomEnabled(portComponentMD.isEnableMtom());
+ builder.setMtomThreshold(portComponentMD.getMtomThreshold());
// propagate addressing properties
final Addressing addressingMD = portComponentMD.getAddressing();
if (addressingMD != null) {
- portComponentUMDM.setAddressingAnnotationSpecified(true);
- portComponentUMDM.setAddressingEnabled(addressingMD.isEnabled());
- portComponentUMDM.setAddressingRequired(addressingMD.isRequired());
- portComponentUMDM.setAddressingResponses(addressingMD.getResponses());
+ builder.setAddressingAnnotationSpecified(true);
+ builder.setAddressingEnabled(addressingMD.isEnabled());
+ builder.setAddressingRequired(addressingMD.isRequired());
+ builder.setAddressingResponses(addressingMD.getResponses());
}
// propagate respect binding properties
if (portComponentMD.getRespectBinding() != null) {
- portComponentUMDM.setRespectBindingAnnotationSpecified(true);
- portComponentUMDM.setRespectBindingEnabled(true);
+ builder.setRespectBindingAnnotationSpecified(true);
+ builder.setRespectBindingEnabled(true);
}
// propagate link
- portComponentUMDM.setPortComponentLink(portComponentMD.getPortComponentLink());
+ builder.setPortComponentLink(portComponentMD.getPortComponentLink());
// propagate jboss specific MD
if (portComponentMD instanceof JBossPortComponentRef) {
- processUnifiedJBossPortComponentRefMetaData(portComponentUMDM, portComponentMD);
- }
+ final JBossPortComponentRef jbossPortComponentMD = (JBossPortComponentRef) portComponentMD;
- return portComponentUMDM;
- }
+ // propagate port QName
+ builder.setPortQName(jbossPortComponentMD.getPortQname());
- private static void processUnifiedJBossPortComponentRefMetaData(final UnifiedPortComponentRefMetaData portComponentUMDM, final PortComponentRef portComponentMD) {
- final JBossPortComponentRef jbossPortComponentMD = (JBossPortComponentRef) portComponentMD;
+ // propagate configuration properties
+ builder.setConfigName(jbossPortComponentMD.getConfigName());
+ builder.setConfigFile(jbossPortComponentMD.getConfigFile());
- // propagate port QName
- portComponentUMDM.setPortQName(jbossPortComponentMD.getPortQname());
-
- // propagate configuration properties
- portComponentUMDM.setConfigName(jbossPortComponentMD.getConfigName());
- portComponentUMDM.setConfigFile(jbossPortComponentMD.getConfigFile());
-
- // propagate stub properties
- final List<StubPropertyMetaData> stubPropertiesMD = jbossPortComponentMD.getStubProperties();
- if (stubPropertiesMD != null) {
- for (final StubPropertyMetaData stubPropertyMD : stubPropertiesMD) {
- portComponentUMDM.addStubProperty(new UnifiedStubPropertyMetaData(stubPropertyMD.getPropName(), stubPropertyMD.getPropValue()));
+ // propagate stub properties
+ final List<StubPropertyMetaData> stubPropertiesMD = jbossPortComponentMD.getStubProperties();
+ if (stubPropertiesMD != null) {
+ for (final StubPropertyMetaData stubPropertyMD : stubPropertiesMD) {
+ builder.addStubProperty(new UnifiedStubPropertyMetaData(stubPropertyMD.getPropName(), stubPropertyMD.getPropValue()));
+ }
}
}
+
+ return builder.build();
}
private static UnifiedHandlerMetaData getUnifiedHandlerMetaData(ServiceReferenceHandlerMetaData srhmd) {
@@ -230,10 +224,10 @@
final javax.xml.ws.soap.Addressing addressingAnnotation = getAnnotation(anElement, javax.xml.ws.soap.Addressing.class);
if (addressingAnnotation != null) {
- serviceRefUMDM.setAddressingAnnotationSpecified(true);
- serviceRefUMDM.setAddressingEnabled(addressingAnnotation.enabled());
- serviceRefUMDM.setAddressingRequired(addressingAnnotation.required());
- serviceRefUMDM.setAddressingResponses(addressingAnnotation.responses().toString());
+ serviceRefUMDM.setAddressingMedadata(new AddressingMetadata(true,
+ addressingAnnotation.enabled(),
+ addressingAnnotation.required(),
+ addressingAnnotation.responses().toString()));
}
}
@@ -241,9 +235,7 @@
final MTOM mtomAnnotation = getAnnotation(anElement, MTOM.class);
if (mtomAnnotation != null) {
- serviceRefUMDM.setMtomAnnotationSpecified(true);
- serviceRefUMDM.setMtomEnabled(mtomAnnotation.enabled());
- serviceRefUMDM.setMtomThreshold(mtomAnnotation.threshold());
+ serviceRefUMDM.setMTOMMetadata(new MTOMMetadata(true, mtomAnnotation.enabled(), mtomAnnotation.threshold()));
}
}
@@ -251,8 +243,7 @@
final javax.xml.ws.RespectBinding respectBindingAnnotation = getAnnotation(anElement, javax.xml.ws.RespectBinding.class);
if (respectBindingAnnotation != null) {
- serviceRefUMDM.setRespectBindingAnnotationSpecified(true);
- serviceRefUMDM.setRespectBindingEnabled(respectBindingAnnotation.enabled());
+ serviceRefUMDM.setRespectBindingMetadata(new RespectBindingMetadata(true, respectBindingAnnotation.enabled()));
}
}
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WebServiceReferences.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WebServiceReferences.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WebServiceReferences.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -1,5 +1,7 @@
package org.jboss.as.webservices.webserviceref;
+import static org.jboss.as.webservices.webserviceref.WSRefUtils.processAnnotatedElement;
+
import java.lang.reflect.AnnotatedElement;
import javax.xml.ws.Service;
@@ -14,11 +16,8 @@
import org.jboss.modules.Module;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-import org.jboss.wsf.spi.serviceref.ServiceRefType;
import org.wildfly.security.manager.WildFlySecurityManager;
-import static org.jboss.as.webservices.webserviceref.WSRefUtils.processAnnotatedElement;
-
/**
* Utility class that encapsulates the creation of web service ref factories.
* <p/>
@@ -45,8 +44,7 @@
final WSRefRegistry wsRefRegistry = ASHelper.getWSRefRegistry(unit);
UnifiedServiceRefMetaData serviceRefUMDM = wsRefRegistry.get(refKey);
if (serviceRefUMDM == null) {
- serviceRefUMDM = new UnifiedServiceRefMetaData(getUnifiedVirtualFile(unit));
- serviceRefUMDM.setServiceRefName(bindingName);
+ serviceRefUMDM = new UnifiedServiceRefMetaData(getUnifiedVirtualFile(unit), bindingName);
wsRefRegistry.add(refKey, serviceRefUMDM);
}
initServiceRef(unit, serviceRefUMDM, type, annotation);
@@ -75,8 +73,6 @@
} else {
serviceRefUMDM.setServiceInterface(Service.class.getName());
}
- // ref type
- serviceRefUMDM.setType(ServiceRefType.JAXWS);
return serviceRefUMDM;
}
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/resources/META-INF/stack-agnostic-deployment-aspects.xml
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/resources/META-INF/stack-agnostic-deployment-aspects.xml 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/main/resources/META-INF/stack-agnostic-deployment-aspects.xml 2015-01-21 14:05:16 UTC (rev 19406)
@@ -48,10 +48,6 @@
<property name="last" class="boolean">true</property>
</deploymentAspect>
- <deploymentAspect class="org.jboss.ws.common.deployment.EndpointMetricsDeploymentAspect">
- <property name="provides" class="java.lang.String">EndpointMetrics</property>
- </deploymentAspect>
-
<deploymentAspect class="org.jboss.ws.common.deployment.EndpointNameDeploymentAspect">
<property name="requires" class="java.lang.String">URLPattern</property>
<property name="provides" class="java.lang.String">EndpointName</property>
Copied: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/test/java/org/jboss/as/webservices/dmr/WebservicesSubsystemRuntimeTestCase.java (from rev 19161, container/wildfly81/branches/jbossws-wildfly810/server-integration/src/test/java/org/jboss/as/webservices/dmr/WebservicesSubsystemRuntimeTestCase.java)
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/test/java/org/jboss/as/webservices/dmr/WebservicesSubsystemRuntimeTestCase.java (rev 0)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/test/java/org/jboss/as/webservices/dmr/WebservicesSubsystemRuntimeTestCase.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -0,0 +1,156 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.as.webservices.dmr;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.as.controller.RunningMode;
+import org.jboss.as.server.Services;
+import org.jboss.as.server.moduleservice.ServiceModuleLoader;
+import org.jboss.as.subsystem.test.AbstractSubsystemBaseTest;
+import org.jboss.as.subsystem.test.AdditionalInitialization;
+import org.jboss.as.subsystem.test.KernelServices;
+import org.jboss.as.subsystem.test.KernelServicesBuilder;
+import org.jboss.as.webservices.util.WSServices;
+import org.jboss.msc.service.ServiceContainer;
+import org.jboss.msc.service.ServiceController;
+import org.jboss.msc.service.ServiceName;
+import org.jboss.msc.service.ServiceTarget;
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.metadata.config.ClientConfig;
+import org.jboss.wsf.spi.metadata.config.EndpointConfig;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * A test for checking the services that are created by the subsystem after boot.
+ *
+ * @author <a href="mailto:alessio.soldano@jboss.com>Alessio Soldano</a>
+ */
+public class WebservicesSubsystemRuntimeTestCase extends AbstractSubsystemBaseTest {
+
+ public WebservicesSubsystemRuntimeTestCase() {
+ super(WSExtension.SUBSYSTEM_NAME, new WSExtension());
+ }
+
+ @Override
+ protected String getSubsystemXml() throws IOException {
+ return readResource("ws-subsystem12-rt.xml");
+ }
+
+ protected AdditionalInitialization createAdditionalInitialization() {
+ return new AdditionalInitialization() {
+ @Override
+ protected RunningMode getRunningMode() {
+ return RunningMode.NORMAL;
+ }
+
+ @Override
+ protected void addExtraServices(ServiceTarget target) {
+ super.addExtraServices(target);
+ target.addService(Services.JBOSS_SERVICE_MODULE_LOADER, new ServiceModuleLoader(null)).install();
+ }
+ };
+ }
+
+ @Test
+ public void testSubsystem() throws Exception {
+ KernelServicesBuilder builder = createKernelServicesBuilder(createAdditionalInitialization()).setSubsystemXml(getSubsystemXml());
+ KernelServices mainServices = builder.build();
+ if (!mainServices.isSuccessfulBoot()) {
+ Assert.fail(mainServices.getBootError().toString());
+ }
+
+ //WSDL soap:address rewrite engine options test
+ ServerConfig serverConfig = getMSCService(mainServices.getContainer(), WSServices.CONFIG_SERVICE, ServerConfig.class);
+ Assert.assertTrue(serverConfig.isModifySOAPAddress());
+ Assert.assertEquals("localhost", serverConfig.getWebServiceHost());
+ Assert.assertEquals(9895, serverConfig.getWebServicePort());
+ Assert.assertEquals(9944, serverConfig.getWebServiceSecurePort());
+
+ //Client & Endpoint predefined configuration tests
+ //HACK: we need to manually reload the client/endpoint configs as the ServerConfigService is actually not starting in this test;
+ //the reason is that it requires services which are not installed here and even if those were available it would fail to start
+ //because we're not running in a modular environment and hence it won't be able to detect the proper ws stack implementation.
+ //Even if we made the subsystem work with a flat classloader (which would not make sense except for the tests here), we'd have
+ //to deal a hell of ws specific maven dependencies here... so really not worth the effort.
+ serverConfig.reloadClientConfigs();
+ ClientConfig clCfg = serverConfig.getClientConfig("My-Client-Config");
+ Assert.assertNotNull(clCfg);
+ Assert.assertEquals(1, clCfg.getProperties().size());
+ Assert.assertEquals("bar3", clCfg.getProperties().get("foo3"));
+ Assert.assertEquals(2, clCfg.getPreHandlerChains().size());
+ Map<String, UnifiedHandlerChainMetaData> map = new HashMap<String, UnifiedHandlerChainMetaData>();
+ for (UnifiedHandlerChainMetaData uhc : clCfg.getPreHandlerChains()) {
+ map.put(uhc.getId(), uhc);
+ }
+ Assert.assertTrue(map.get("my-handlers").getHandlers().isEmpty());
+ Assert.assertEquals("##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM", map.get("my-handlers").getProtocolBindings());
+ Assert.assertEquals(1, map.get("my-handlers2").getHandlers().size());
+ Assert.assertEquals("MyHandler", map.get("my-handlers2").getHandlers().get(0).getHandlerName());
+ Assert.assertEquals("org.jboss.ws.common.invocation.MyHandler", map.get("my-handlers2").getHandlers().get(0).getHandlerClass());
+ Assert.assertEquals("##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM", map.get("my-handlers").getProtocolBindings());
+ Assert.assertEquals(1, clCfg.getPostHandlerChains().size());
+ Assert.assertEquals("my-handlers2", clCfg.getPostHandlerChains().get(0).getId());
+ Assert.assertEquals(1, clCfg.getPostHandlerChains().get(0).getHandlers().size());
+ Assert.assertEquals("MyHandler2", clCfg.getPostHandlerChains().get(0).getHandlers().get(0).getHandlerName());
+ Assert.assertEquals("org.jboss.ws.common.invocation.MyHandler2", clCfg.getPostHandlerChains().get(0).getHandlers().get(0).getHandlerClass());
+ Assert.assertEquals("##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM", clCfg.getPostHandlerChains().get(0).getProtocolBindings());
+
+ serverConfig.reloadEndpointConfigs();
+ EndpointConfig epCfg = serverConfig.getEndpointConfig("Standard-Endpoint-Config");
+ Assert.assertNotNull(epCfg);
+ Assert.assertTrue(epCfg.getProperties().isEmpty());
+ Assert.assertTrue(epCfg.getPreHandlerChains().isEmpty());
+ Assert.assertTrue(epCfg.getPostHandlerChains().isEmpty());
+ epCfg = serverConfig.getEndpointConfig("Recording-Endpoint-Config");
+ Assert.assertNotNull(epCfg);
+ Assert.assertEquals(2, epCfg.getProperties().size());
+ Assert.assertEquals("bar", epCfg.getProperties().get("foo"));
+ Assert.assertEquals("bar2", epCfg.getProperties().get("foo2"));
+ Assert.assertEquals(1, epCfg.getPreHandlerChains().size());
+ Assert.assertEquals("recording-handlers", epCfg.getPreHandlerChains().get(0).getId());
+ Assert.assertEquals(2, epCfg.getPreHandlerChains().get(0).getHandlers().size());
+ Assert.assertEquals("RecordingHandler", epCfg.getPreHandlerChains().get(0).getHandlers().get(0).getHandlerName());
+ Assert.assertEquals("org.jboss.ws.common.invocation.RecordingServerHandler", epCfg.getPreHandlerChains().get(0).getHandlers().get(0).getHandlerClass());
+ Assert.assertEquals("AnotherRecordingHandler", epCfg.getPreHandlerChains().get(0).getHandlers().get(1).getHandlerName());
+ Assert.assertEquals("org.jboss.ws.common.invocation.RecordingServerHandler", epCfg.getPreHandlerChains().get(0).getHandlers().get(1).getHandlerClass());
+ Assert.assertEquals("##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM", epCfg.getPreHandlerChains().get(0).getProtocolBindings());
+ Assert.assertEquals(1, epCfg.getPostHandlerChains().size());
+ Assert.assertEquals("recording-handlers2", epCfg.getPostHandlerChains().get(0).getId());
+ Assert.assertEquals(2, epCfg.getPostHandlerChains().get(0).getHandlers().size());
+ Assert.assertEquals("RecordingHandler2", epCfg.getPostHandlerChains().get(0).getHandlers().get(0).getHandlerName());
+ Assert.assertEquals("org.jboss.ws.common.invocation.RecordingServerHandler", epCfg.getPostHandlerChains().get(0).getHandlers().get(0).getHandlerClass());
+ Assert.assertEquals("AnotherRecordingHandler2", epCfg.getPostHandlerChains().get(0).getHandlers().get(1).getHandlerName());
+ Assert.assertEquals("org.jboss.ws.common.invocation.RecordingServerHandler", epCfg.getPostHandlerChains().get(0).getHandlers().get(1).getHandlerClass());
+ Assert.assertEquals("##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM", epCfg.getPostHandlerChains().get(0).getProtocolBindings());
+ }
+
+ @SuppressWarnings("unchecked")
+ public static <T> T getMSCService(final ServiceContainer container, final ServiceName serviceName, final Class<T> clazz) {
+ ServiceController<T> service = (ServiceController<T>) container.getService(serviceName);
+ return service != null ? service.getValue() : null;
+ }
+}
Modified: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/test/java/org/jboss/as/webservices/parser/TestDA1.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/test/java/org/jboss/as/webservices/parser/TestDA1.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/test/java/org/jboss/as/webservices/parser/TestDA1.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -89,31 +89,6 @@
}
@Override
- public boolean canHandle(Deployment dep) {
- return false;
- }
-
- @Override
- public boolean isForJaxWs() {
- return false;
- }
-
- @Override
- public void setForJaxWs(boolean isForJaxWs) {
-
- }
-
- @Override
- public boolean isForJaxRpc() {
- return false;
- }
-
- @Override
- public void setForJaxRpc(boolean isForJaxRpc) {
-
- }
-
- @Override
public ClassLoader getLoader() {
return null;
}
Copied: container/wildfly82/branches/jbossws-wildfly820/server-integration/src/test/resources/org/jboss/as/webservices/dmr/ws-subsystem12-rt.xml (from rev 19161, container/wildfly81/branches/jbossws-wildfly810/server-integration/src/test/resources/org/jboss/as/webservices/dmr/ws-subsystem12-rt.xml)
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/server-integration/src/test/resources/org/jboss/as/webservices/dmr/ws-subsystem12-rt.xml (rev 0)
+++ container/wildfly82/branches/jbossws-wildfly820/server-integration/src/test/resources/org/jboss/as/webservices/dmr/ws-subsystem12-rt.xml 2015-01-21 14:05:16 UTC (rev 19406)
@@ -0,0 +1,29 @@
+<subsystem xmlns="urn:jboss:domain:webservices:1.2">
+ <modify-wsdl-address>true</modify-wsdl-address>
+ <wsdl-host>localhost</wsdl-host>
+ <wsdl-port>9895</wsdl-port>
+ <wsdl-secure-port>9944</wsdl-secure-port>
+ <endpoint-config name="Standard-Endpoint-Config"/>
+ <endpoint-config name="Recording-Endpoint-Config">
+ <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
+ <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
+ <handler name="AnotherRecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
+ </pre-handler-chain>
+ <post-handler-chain name="recording-handlers2" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
+ <handler name="RecordingHandler2" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
+ <handler name="AnotherRecordingHandler2" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
+ </post-handler-chain>
+ <property name="foo" value="bar"/>
+ <property name="foo2" value="bar2"/>
+ </endpoint-config>
+ <client-config name="My-Client-Config">
+ <pre-handler-chain name="my-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM" />
+ <pre-handler-chain name="my-handlers2" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
+ <handler name="MyHandler" class="org.jboss.ws.common.invocation.MyHandler"/>
+ </pre-handler-chain>
+ <post-handler-chain name="my-handlers2" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
+ <handler name="MyHandler2" class="org.jboss.ws.common.invocation.MyHandler2"/>
+ </post-handler-chain>
+ <property name="foo3" value="bar3"/>
+ </client-config>
+</subsystem>
Modified: container/wildfly82/branches/jbossws-wildfly820/tests-integration/src/main/java/org/jboss/as/webservices/deployer/RemoteDeployer.java
===================================================================
--- container/wildfly82/branches/jbossws-wildfly820/tests-integration/src/main/java/org/jboss/as/webservices/deployer/RemoteDeployer.java 2015-01-21 10:54:58 UTC (rev 19405)
+++ container/wildfly82/branches/jbossws-wildfly820/tests-integration/src/main/java/org/jboss/as/webservices/deployer/RemoteDeployer.java 2015-01-21 14:05:16 UTC (rev 19406)
@@ -67,12 +67,15 @@
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OP_ADDR;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OUTCOME;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.READ_ATTRIBUTE_OPERATION;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.READ_RESOURCE_OPERATION;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.RELEASE_VERSION;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REMOVE;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REQUIRED;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.RESTART;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.RESULT;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ROLLBACK_ON_RUNTIME_FAILURE;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.SERVER_IDENTITY;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.SHUTDOWN;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.SSL;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.STEPS;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.SUBSYSTEM;
@@ -415,6 +418,43 @@
}
}
+ @Override
+ public void restart() throws Exception {
+ ModelNode op = new ModelNode();
+ op.get("operation").set(SHUTDOWN);
+ op.get(RESTART).set("true");
+ applyUpdate(op);
+ waitForServerToRestart(TIMEOUT);
+ }
+
+ @Override
+ public String setSystemProperty(String propName, String propValue) throws Exception {
+ if (propName == null || propName.trim().length() == 0) {
+ throw new IllegalArgumentException("Empty system property name specified!");
+ }
+ ModelNode op = createOpNode("system-property=" + propName, READ_RESOURCE_OPERATION);
+ String previousValue = null;
+ try {
+ ModelNode response = applyUpdate(op);
+ String rawResult = response.get(RESULT).asString();
+ previousValue = rawResult.substring(13, rawResult.length() - 2); //{"value" => "xyz"}
+ } catch (Exception e) {
+ if (!e.getMessage().contains("WFLYCTL0216") && !e.getMessage().contains("JBAS014807")) {
+ throw e;
+ }
+ }
+ if (previousValue != null) {
+ op = createOpNode("system-property=" + propName, REMOVE);
+ applyUpdate(op);
+ }
+ if (propValue != null) {
+ op = createOpNode("system-property=" + propName, ADD);
+ op.get("value").set(propValue);
+ applyUpdate(op);
+ }
+ return previousValue;
+ }
+
private static void applyUpdates(final List<ModelNode> updates) throws Exception {
for (final ModelNode update : updates) {
applyUpdate(update);
@@ -491,6 +531,36 @@
return op;
}
+ private void waitForServerToRestart(int timeout) throws Exception {
+ Thread.sleep(1000);
+ long start = System.currentTimeMillis();
+ long now;
+ do {
+ final ModelControllerClient client = newModelControllerClient(timeout / 10);
+ ModelNode operation = new ModelNode();
+ operation.get(OP_ADDR).setEmptyList();
+ operation.get(OP).set(READ_ATTRIBUTE_OPERATION);
+ operation.get(NAME).set("server-state");
+ try {
+ ModelNode result = client.execute(operation);
+ boolean normal = "running".equals(result.get(RESULT).asString());
+ if (normal) {
+ return;
+ }
+ } catch (Exception e) {
+ //NOOP
+ } finally {
+ client.close();
+ }
+ try {
+ Thread.sleep(500);
+ } catch (InterruptedException e) {
+ }
+ now = System.currentTimeMillis();
+ } while (now - start < timeout);
+ throw new Exception("Server did not restart!");
+ }
+
private static String getSystemProperty(final String name, final String defaultValue) {
PrivilegedAction<String> action = new PrivilegedAction<String>() {
public String run() {
@@ -501,9 +571,13 @@
}
private static ModelControllerClient newModelControllerClient() throws Exception {
- return ModelControllerClient.Factory.create(protocol, address.getHostAddress(), port, callbackHandler, null, TIMEOUT);
+ return newModelControllerClient(TIMEOUT);
}
+ private static ModelControllerClient newModelControllerClient(int timeout) throws Exception {
+ return ModelControllerClient.Factory.create(protocol, address.getHostAddress(), port, callbackHandler, null, timeout);
+ }
+
private static ServerDeploymentManager newDeploymentManager(ModelControllerClient client) throws Exception {
return ServerDeploymentManager.Factory.create(client);
}
9 years, 11 months