JBossWS SVN: r18794 - stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly900/org/apache/cxf/main.
by jbossws-commits@lists.jboss.org
Author: rsearls
Date: 2014-07-10 15:26:21 -0400 (Thu, 10 Jul 2014)
New Revision: 18794
Modified:
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly900/org/apache/cxf/main/module.xml
Log:
[JBWS-3810] added module ref to org.apache.xml-resolver
Modified: stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly900/org/apache/cxf/main/module.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/…
[View More]resources/modules/wildfly900/org/apache/cxf/main/module.xml 2014-07-08 21:06:17 UTC (rev 18793)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly900/org/apache/cxf/main/module.xml 2014-07-10 19:26:21 UTC (rev 18794)
@@ -51,6 +51,7 @@
<module name="org.apache.neethi" />
<module name="org.apache.ws.xmlschema" />
<module name="org.codehaus.woodstox" />
+ <module name="org.apache.xml-resolver" />
<module name="org.springframework.spring" optional="true">
<imports>
<include path="META-INF"/>
[View Less]
10 years, 8 months
JBossWS SVN: r18793 - in stack/cxf/trunk/modules/testsuite/cxf-spring-tests: src/test/java/org/jboss/test/ws/jaxws/cxf/aegis and 16 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-07-08 17:06:17 -0400 (Tue, 08 Jul 2014)
New Revision: 18793
Added:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/DeploymentArchives.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameDeploymentArchives.java
Removed:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/pom.…
[View More]xml
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisAnnotationTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/JBossWSCXFConfigurerTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/DescriptorJSETestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/in_container_client/ServletTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3497/JBWS3497TestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3670/JBWS3670TestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointAPITestCaseForked.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointOnlyDeploymentTestCaseForked.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCaseForked.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/mixtype/MixedTypeTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/webserviceref/WebServiceRefServletTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/SimpleServiceTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameServletTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/KerberosTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseDigest/UsernameDigestTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseEJB/WsseEjbTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/SignEncryptTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/SignTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/UsernameTestCase.java
Log:
[JBWS-3711] Converted cxf-spring tests to ShrinkWrap
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/pom.xml 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/pom.xml 2014-07-08 21:06:17 UTC (rev 18793)
@@ -72,26 +72,6 @@
</activation>
<build>
<plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>build-jars</id>
- <phase>test-compile</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <property name="tests.output.dir" value="${project.build.directory}"/>
- <property name="tests.resources.dir" value="${basedir}/src/test/resources"/>
- <ant antfile="scripts/cxf-jars-jaxws.xml" target="build-jars-jaxws"/>
- <ant antfile="scripts/cxf-samples-jaxws.xml" target="build-samples-jaxws"/>
- </target>
- </configuration>
- </execution>
- </executions>
- </plugin>
<plugin> <!-- This copies jbossws-cxf-factories jar to endorsed dir before the integration-tests are run -->
<artifactId>maven-resources-plugin</artifactId>
<executions>
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisAnnotationTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisAnnotationTestCase.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisAnnotationTestCase.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -21,22 +21,41 @@
*/
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.shrinkwrap.api.asset.StringAsset;
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;
public class AegisAnnotationTestCase extends JBossWSTest
{
- private String endpointURL = "http://" + getServerHost() + ":8080/jaxws-aegis-annotation";
+ public static BaseDeployment<?>[] createDeployments() {
+ List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
+ list.add(new JBossWSTestHelper.WarDeployment("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
+ .addClass(org.jboss.test.ws.jaxws.cxf.aegis.AegisAnnotationGroupQuery.class)
+ .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()]);
+ }
public static Test suite()
{
- return new JBossWSCXFTestSetup(AegisAnnotationTestCase.class, "jaxws-aegis-annotation.war");
+ return new JBossWSCXFTestSetup(AegisAnnotationTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
}
public void testAccessAnnotation() throws Exception
@@ -44,11 +63,12 @@
ClientProxyFactoryBean proxyFactory = new ClientProxyFactoryBean();
proxyFactory.setDataBinding(new AegisDatabinding());
proxyFactory.setServiceClass(AegisGroupQuery.class);
- proxyFactory.setAddress(endpointURL);
+ proxyFactory.setAddress("http://" + getServerHost() + ":8080/jaxws-aegis-annotation");
AegisGroupQuery query = (AegisGroupQuery)proxyFactory.create();
+ @SuppressWarnings("unchecked")
Map<Integer, String> members = query.getMembers();
- this.assertEquals(2, members.size());
- this.assertEquals(true, members.containsKey(2));
+ assertEquals(2, members.size());
+ assertEquals(true, members.containsKey(2));
}
}
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisTestCase.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisTestCase.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -21,22 +21,42 @@
*/
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.shrinkwrap.api.asset.StringAsset;
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;
public class AegisTestCase extends JBossWSTest
{
- private String endpointURL = "http://" + getServerHost() + ":8080/jaxws-aegis";
+ public static BaseDeployment<?>[] createDeployments() {
+ List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
+ list.add(new JBossWSTestHelper.WarDeployment("jaxws-aegis.war") { {
+ archive
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.apache.cxf\n"))
+ .addClass(org.jboss.test.ws.jaxws.cxf.aegis.AegisGroupQuery.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.aegis.AegisGroupQueryImpl.class)
+ .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()]);
+ }
public static Test suite()
{
- return new JBossWSCXFTestSetup(AegisTestCase.class, "jaxws-aegis.war");
+ return new JBossWSCXFTestSetup(AegisTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
}
public void testAccess() throws Exception
@@ -44,7 +64,7 @@
ClientProxyFactoryBean proxyFactory = new ClientProxyFactoryBean();
proxyFactory.setDataBinding(new AegisDatabinding());
proxyFactory.setServiceClass(AegisGroupQuery.class);
- proxyFactory.setAddress(endpointURL);
+ proxyFactory.setAddress("http://" + getServerHost() + ":8080/jaxws-aegis");
AegisGroupQuery query = (AegisGroupQuery)proxyFactory.create();
@SuppressWarnings("unchecked")
Map<Integer, String> members = query.getMembers();
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/JBossWSCXFConfigurerTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/JBossWSCXFConfigurerTestCase.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/JBossWSCXFConfigurerTestCase.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -21,15 +21,21 @@
*/
package org.jboss.test.ws.jaxws.cxf.configuration;
+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.shrinkwrap.api.asset.StringAsset;
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;
/**
* To test configure bean by name auto wire
@@ -38,19 +44,32 @@
*/
public class JBossWSCXFConfigurerTestCase extends JBossWSTest
{
- private String endpointURL = "http://" + getServerHost() + ":8080/jaxws-cxf-configuration";
- private String targetNS = "http://org.jboss.ws/jbws3033";
+ 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()]);
+ }
public static Test suite()
{
- return new JBossWSCXFTestSetup(JBossWSCXFConfigurerTestCase.class, "jaxws-cxf-configuration.war");
+ return new JBossWSCXFTestSetup(JBossWSCXFConfigurerTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
}
//JBWS-3033
public void testConfiguration() throws Exception
{
- URL wsdlURL = new URL(endpointURL + "?wsdl");
- QName serviceName = new QName(targetNS, "EndpointService");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-cxf-configuration?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/jbws3033", "EndpointService");
Service service = Service.create(wsdlURL, serviceName);
Endpoint port = (Endpoint)service.getPort(Endpoint.class);
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/DescriptorJSETestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/DescriptorJSETestCase.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/DescriptorJSETestCase.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -21,15 +21,21 @@
*/
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.shrinkwrap.api.asset.StringAsset;
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 a CXF endpoint with provided jbossws-cxf.xml
@@ -42,9 +48,25 @@
private String endpointURL = "http://" + getServerHost() + ":8080/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") { {
+ archive
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.apache.cxf.impl\n")) //cxf impl required due to custom interceptor in deployment
+ .addAsResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/cxf/descriptor/cxf.xml"), "cxf.xml")
+ .addClass(org.jboss.test.ws.jaxws.cxf.descriptor.DescriptorEndpointImpl.class)
+ .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()]);
+ }
+
public static Test suite()
{
- return new JBossWSCXFTestSetup(DescriptorJSETestCase.class, "jaxws-cxf-descriptor.war");
+ return new JBossWSCXFTestSetup(DescriptorJSETestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
}
public void testLegalAccess() throws Exception
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/in_container_client/ServletTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/in_container_client/ServletTestCase.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/in_container_client/ServletTestCase.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -21,13 +21,18 @@
*/
package org.jboss.test.ws.jaxws.cxf.in_container_client;
+import java.io.File;
import java.net.URL;
+import java.util.LinkedList;
+import java.util.List;
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;
/**
* A testcase for verifying a cxf.xml Spring descriptor based Bus can
@@ -39,9 +44,32 @@
*/
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()]);
+ }
+
public static Test suite()
{
- return new JBossWSCXFTestSetup(ServletTestCase.class, "jaxws-cxf-in_container_client.war, jaxws-cxf-in_container_client-client.war");
+ return new JBossWSCXFTestSetup(ServletTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
}
public void test() throws Exception
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3497/JBWS3497TestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3497/JBWS3497TestCase.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3497/JBWS3497TestCase.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -21,9 +21,11 @@
*/
package org.jboss.test.ws.jaxws.cxf.jbws3497;
+import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
+import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
@@ -35,8 +37,11 @@
import junit.framework.Test;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
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;
/**
* [JBWS-3497] Add ability to configure the queue depth on the asynchronous (@Oneway) work queue.
@@ -47,17 +52,29 @@
*/
public class JBWS3497TestCase extends JBossWSTest
{
- private String endpointOneURL = "http://" + getServerHost() + ":8080/jaxws-cxf-jbws3497/ServiceOne/EndpointOne";
- private String targetNS = "http://org.jboss.ws.jaxws.cxf/jbws3497";
-
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") { {
+ archive
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.apache.cxf,org.jboss.ws.cxf.jbossws-cxf-server\n"))
+ .addClass(org.jboss.test.ws.jaxws.cxf.jbws3497.EndpointOne.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.jbws3497.EndpointOneImpl.class)
+ .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()]);
+ }
public static Test suite()
{
- return new JBossWSCXFTestSetup(JBWS3497TestCase.class, "jaxws-cxf-jbws3497.war");
+ return new JBossWSCXFTestSetup(JBWS3497TestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
}
public void testAccess() throws Exception
@@ -101,8 +118,8 @@
private void initPorts() throws MalformedURLException
{
- URL wsdlOneURL = new URL(endpointOneURL + "?wsdl");
- QName serviceOneName = new QName(targetNS, "ServiceOne");
+ URL wsdlOneURL = new URL("http://" + getServerHost() + ":8080/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/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3670/JBWS3670TestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3670/JBWS3670TestCase.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3670/JBWS3670TestCase.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -21,7 +21,10 @@
*/
package org.jboss.test.ws.jaxws.cxf.jbws3670;
+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;
@@ -30,20 +33,35 @@
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;
public class JBWS3670TestCase extends JBossWSTest
{
- private String endpointURL = "http://" + getServerHost() + ":8080/jaxws-cxf-jbws3670/helloworld";
- private String targetNS = "http://jbossws.jboss.org/helloworld";
+ 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()]);
+ }
+
public static Test suite()
{
- return new JBossWSCXFTestSetup(JBWS3670TestCase.class, "jaxws-cxf-jbws3670.war");
+ return new JBossWSCXFTestSetup(JBWS3670TestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
}
public void testAccess() throws Exception
{
- URL wsdlURL = new URL(endpointURL + "?wsdl");
- QName serviceName = new QName(targetNS, "HelloWorldService");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/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/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointAPITestCaseForked.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointAPITestCaseForked.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointAPITestCaseForked.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -21,13 +21,19 @@
*/
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.shrinkwrap.api.asset.StringAsset;
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 case for publishing a JMS (SOAP-over-JMS 1.0) endpoint through API
@@ -37,9 +43,24 @@
*/
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") { {
+ 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.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()]);
+ }
+
public static Test suite()
{
- return new JBossWSCXFTestSetup(JMSEndpointAPITestCaseForked.class, "jaxws-cxf-jms-api.war");
+ return new JBossWSCXFTestSetup(JMSEndpointAPITestCaseForked.class, JBossWSTestHelper.writeToFile(createDeployments()));
}
public void testServerSide() throws Exception
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointOnlyDeploymentTestCaseForked.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointOnlyDeploymentTestCaseForked.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointOnlyDeploymentTestCaseForked.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -21,7 +21,10 @@
*/
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;
@@ -44,11 +47,13 @@
import org.apache.cxf.frontend.ClientProxy;
import org.apache.cxf.transport.jms.JMSConduit;
import org.apache.cxf.transport.jms.JMSConfiguration;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
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;
/**
* Test case for deploying an archive with a JMS (SOAP-over-JMS 1.0) endpoint only
@@ -58,11 +63,34 @@
*/
public class JMSEndpointOnlyDeploymentTestCaseForked extends JBossWSTest
{
- private static boolean waitForResponse;
+ 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") { {
+ 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") { {
+ 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()]);
+ }
+
public static Test suite()
{
- return new JBossWSCXFTestSetup(JMSEndpointOnlyDeploymentTestCaseForked.class, "jaxws-cxf-jms-only-deployment-test-servlet.war, jaxws-cxf-jms-only-deployment.jar");
+ return new JBossWSCXFTestSetup(JMSEndpointOnlyDeploymentTestCaseForked.class, JBossWSTestHelper.writeToFile(createDeployments()));
}
public void testJMSEndpointServerSide() throws Exception
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCaseForked.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCaseForked.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCaseForked.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -21,7 +21,10 @@
*/
package org.jboss.test.ws.jaxws.cxf.jms_http;
+import java.io.File;
import java.net.URL;
+import java.util.LinkedList;
+import java.util.List;
import java.util.Properties;
import javax.naming.Context;
@@ -33,11 +36,13 @@
import org.apache.cxf.frontend.ClientProxy;
import org.apache.cxf.transport.jms.JMSConduit;
import org.apache.cxf.transport.jms.JMSConfiguration;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.test.ws.jaxws.cxf.jms.HelloWorld;
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 case for deploying an archive with a JMS (SOAP-over-JMS 1.0) and a HTTP endpoints
@@ -47,9 +52,34 @@
*/
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()]);
+ }
+
public static Test suite()
{
- return new JBossWSCXFTestSetup(JMSHTTPEndpointDeploymentTestCaseForked.class, "jaxws-cxf-jms-http-deployment-test-servlet.war, jaxws-cxf-jms-http-deployment.war");
+ return new JBossWSCXFTestSetup(JMSHTTPEndpointDeploymentTestCaseForked.class, JBossWSTestHelper.writeToFile(createDeployments()));
}
public void testJMSEndpointServerSide() throws Exception
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/mixtype/MixedTypeTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/mixtype/MixedTypeTestCase.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/mixtype/MixedTypeTestCase.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -21,7 +21,10 @@
*/
package org.jboss.test.ws.jaxws.cxf.mixtype;
+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;
@@ -30,22 +33,37 @@
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;
public class MixedTypeTestCase extends JBossWSTest
{
- private final String endpointURL = "http://" + getServerHost() + ":8080/mixtype/jaxws-cxf-mixtype";
- private final String ejbEndpointURL = "http://" + getServerHost() + ":8080/mixtype/EJBServiceOne/EJBEndpointOne";
+ 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") { {
+ archive
+ .addManifest()
+ .addClass(org.jboss.test.ws.jaxws.cxf.mixtype.EndpointOne.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.mixtype.EndpointOneEJB3Impl.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.mixtype.EndpointOneImpl.class)
+ .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()]);
+ }
- private String targetNS = "http://org.jboss.ws.jaxws.cxf/mixtype";
-
public static Test suite()
{
- return new JBossWSCXFTestSetup(MixedTypeTestCase.class, "jaxws-cxf-mixtype.war");
+ return new JBossWSCXFTestSetup(MixedTypeTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
}
public void testEndpoint() throws Exception
{
- URL wsdlOneURL = new URL(endpointURL + "?wsdl");
+ URL wsdlOneURL = new URL("http://" + getServerHost() + ":8080/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);
@@ -55,7 +73,7 @@
public void testEJBEndpoint() throws Exception
{
- URL wsdlOneURL = new URL(ejbEndpointURL + "?wsdl");
+ URL wsdlOneURL = new URL("http://" + getServerHost() + ":8080/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/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/webserviceref/WebServiceRefServletTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/webserviceref/WebServiceRefServletTestCase.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/webserviceref/WebServiceRefServletTestCase.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -21,6 +21,7 @@
*/
package org.jboss.test.ws.jaxws.cxf.webserviceref;
+import java.io.File;
import java.net.URL;
import javax.xml.namespace.QName;
@@ -31,6 +32,8 @@
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
@@ -43,9 +46,34 @@
{
public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-cxf-webserviceref";
+ public static BaseDeployment<?> createClientDeployment() {
+ return new JBossWSTestHelper.WarDeployment("jaxws-cxf-webserviceref-servlet-client.war") { {
+ archive
+ .addManifest()
+ .addClass(org.jboss.test.ws.jaxws.cxf.webserviceref.Endpoint.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.webserviceref.EndpointService.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.webserviceref.Handler.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.webserviceref.ServletClient.class)
+ .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"));
+ }
+ };
+ }
+
+ public static BaseDeployment<?> createServerDeployment() {
+ return new JBossWSTestHelper.WarDeployment("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"));
+ }
+ };
+ }
+
public static Test suite()
{
- return new JBossWSCXFTestSetup(WebServiceRefServletTestCase.class, "jaxws-cxf-webserviceref.war");
+ return new JBossWSCXFTestSetup(WebServiceRefServletTestCase.class, JBossWSTestHelper.writeToFile(createServerDeployment()));
}
public void testDynamicProxy() throws Exception
@@ -62,7 +90,8 @@
public void testServletClient() throws Exception
{
- deploy("jaxws-cxf-webserviceref-servlet-client.war");
+ final String clientDepName = JBossWSTestHelper.writeToFile(createClientDeployment());
+ deploy(clientDepName);
try
{
URL url = new URL(TARGET_ENDPOINT_ADDRESS + "-servlet-client?echo=HelloWorld");
@@ -70,7 +99,7 @@
}
finally
{
- undeploy("jaxws-cxf-webserviceref-servlet-client.war");
+ undeploy(clientDepName);
}
}
}
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocTestCase.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocTestCase.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, 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,17 +42,14 @@
*/
public class BasicDocTestCase extends JBossWSTest
{
- private String endpointURL = "http://" + getServerHost() + ":8080/jaxws-cxf-wsrm-basic-doc";
- private String targetNS = "http://org.jboss.ws.jaxws.cxf/wsrm";
-
public static Test suite()
{
- return new JBossWSCXFTestSetup(BasicDocTestCase.class, "jaxws-cxf-wsrm-basic-doc.war,jaxws-cxf-wsrm-basic-client.jar");
+ return new JBossWSCXFTestSetup(BasicDocTestCase.class, DeploymentArchives.DOC_SERVER + " " + DeploymentArchives.CLIENT);
}
public void testWSDLAccess() throws Exception
{
- URL wsdlURL = new URL(endpointURL + "?wsdl");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-cxf-wsrm-basic-doc?wsdl");
Element wsdl = DOMUtils.parse(wsdlURL.openStream());
assertNotNull(wsdl);
}
@@ -60,7 +57,7 @@
public void testClient() throws Exception
{
URL wsdlURL = getResourceURL("jaxws/cxf/wsrm/basic-doc/wsrm-basic-doc.wsdl");
- QName serviceName = new QName(targetNS, "RMService");
+ QName serviceName = new QName("http://org.jboss.ws.jaxws.cxf/wsrm", "RMService");
Service service = Service.create(wsdlURL, serviceName);
BasicDocEndpoint port = (BasicDocEndpoint)service.getPort(BasicDocEndpoint.class);
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCTestCase.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCTestCase.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -42,17 +42,14 @@
*/
public class BasicRPCTestCase extends JBossWSTest
{
- private String endpointURL = "http://" + getServerHost() + ":8080/jaxws-cxf-wsrm-basic-rpc";
- private String targetNS = "http://org.jboss.ws.jaxws.cxf/wsrm";
-
public static Test suite()
{
- return new JBossWSCXFTestSetup(BasicRPCTestCase.class, "jaxws-cxf-wsrm-basic-rpc.war,jaxws-cxf-wsrm-basic-client.jar");
+ return new JBossWSCXFTestSetup(BasicRPCTestCase.class, DeploymentArchives.RPC_SERVER + " " + DeploymentArchives.CLIENT);
}
public void testWSDLAccess() throws Exception
{
- URL wsdlURL = new URL(endpointURL + "?wsdl");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-cxf-wsrm-basic-rpc?wsdl");
Element wsdl = DOMUtils.parse(wsdlURL.openStream());
assertNotNull(wsdl);
}
@@ -60,7 +57,7 @@
public void testClient() throws Exception
{
URL wsdlURL = getResourceURL("jaxws/cxf/wsrm/basic-rpc/wsrm-basic-rpc.wsdl");
- QName serviceName = new QName(targetNS, "RMService");
+ QName serviceName = new QName("http://org.jboss.ws.jaxws.cxf/wsrm", "RMService");
Service service = Service.create(wsdlURL, serviceName);
BasicRPCEndpoint port = (BasicRPCEndpoint)service.getPort(BasicRPCEndpoint.class);
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/DeploymentArchives.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/DeploymentArchives.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/DeploymentArchives.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * 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.
+ *
+ * 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.test.ws.jaxws.cxf.wsrm;
+
+import java.io.File;
+
+import org.jboss.wsf.test.JBossWSTestHelper;
+
+public final class DeploymentArchives
+{
+ 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)
+ .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"));
+ }
+ });
+
+ public static final String DOC_SERVER = JBossWSTestHelper.writeToFile(new JBossWSTestHelper.WarDeployment("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"));
+ }
+ });
+
+ public static final String CLIENT = JBossWSTestHelper.writeToFile(new JBossWSTestHelper.JarDeployment("jaxws-cxf-wsrm-basic-client.jar") { {
+ archive
+ .addManifest()
+ .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/cxf/wsrm/cxf.xml"), "cxf.xml");
+ }
+ });
+
+ public DeploymentArchives() {
+ //NOOP
+ }
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/DeploymentArchives.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/SimpleServiceTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/SimpleServiceTestCase.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/SimpleServiceTestCase.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -21,7 +21,10 @@
*/
package org.jboss.test.ws.jaxws.samples.wsrm.client;
+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;
@@ -32,6 +35,8 @@
import org.jboss.test.ws.jaxws.samples.wsrm.generated.SimpleService;
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;
/**
* Client invoking web service using WS-RM
@@ -43,9 +48,31 @@
private final String serviceURL = "http://" + getServerHost() + ":8080/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()]);
+ }
+
public static Test suite()
{
- return new JBossWSCXFTestSetup(SimpleServiceTestCase.class, "jaxws-samples-wsrm.war,jaxws-samples-wsrm-client.jar");
+ return new JBossWSCXFTestSetup(SimpleServiceTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
}
@Override
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -21,8 +21,11 @@
*/
package org.jboss.test.ws.jaxws.samples.wsse;
+import java.io.File;
import java.net.URL;
import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
import java.util.Map;
import javax.xml.namespace.QName;
@@ -38,8 +41,11 @@
import org.apache.cxf.frontend.ClientProxy;
import org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor;
import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
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;
/**
* WS-Security sign & encrypt test case
@@ -51,9 +57,40 @@
{
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") { {
+ 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)
+ .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)
+ .addAsResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/sign-encrypt/WEB-INF/bob.jks"), "bob.jks")
+ .addAsResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/sign-encrypt/WEB-INF/bob.properties"), "bob.properties")
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/sign-encrypt/WEB-INF/jbossws-cxf.xml"), "jbossws-cxf.xml")
+ .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") { {
+ 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()]);
+ }
+
public static Test suite()
{
- return new JBossWSCXFTestSetup(SignEncryptTestCase.class, "jaxws-samples-wsse-sign-encrypt-client.jar jaxws-samples-wsse-sign-encrypt.war");
+ return new JBossWSCXFTestSetup(SignEncryptTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
}
public void test() throws Exception
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignTestCase.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignTestCase.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -21,8 +21,11 @@
*/
package org.jboss.test.ws.jaxws.samples.wsse;
+import java.io.File;
import java.net.URL;
import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
import java.util.Map;
import javax.xml.namespace.QName;
@@ -37,8 +40,11 @@
import org.apache.cxf.frontend.ClientProxy;
import org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor;
import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
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;
/**
* WS-Security sign test case
@@ -50,9 +56,40 @@
{
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") { {
+ 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)
+ .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)
+ .addAsResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/sign/WEB-INF/bob.jks"), "bob.jks")
+ .addAsResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/sign/WEB-INF/bob.properties"), "bob.properties")
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/sign/WEB-INF/jbossws-cxf.xml"), "jbossws-cxf.xml")
+ .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()]);
+ }
+
public static Test suite()
{
- return new JBossWSCXFTestSetup(SignTestCase.class,"jaxws-samples-wsse-sign-client.jar jaxws-samples-wsse-sign.war");
+ return new JBossWSCXFTestSetup(SignTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
}
public void test() throws Exception
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationTestCase.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationTestCase.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -21,8 +21,11 @@
*/
package org.jboss.test.ws.jaxws.samples.wsse;
+import java.io.File;
import java.net.URL;
import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
import java.util.Map;
import javax.xml.namespace.QName;
@@ -37,6 +40,8 @@
import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
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;
/**
* WS-Security username authorization test case
@@ -50,9 +55,30 @@
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, "jaxws-samples-wsse-username-authorize.war", true);
+ return new JBossWSCXFTestSetup(UsernameAuthorizationTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()), true);
}
public void testAuthorized() throws Exception
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameDeploymentArchives.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameDeploymentArchives.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameDeploymentArchives.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * 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.
+ *
+ * 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.test.ws.jaxws.samples.wsse;
+
+import java.io.File;
+
+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);
+ }
+ });
+
+ private UsernameDeploymentArchives() {
+ //NOOP
+ }
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameDeploymentArchives.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameServletTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameServletTestCase.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameServletTestCase.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -39,7 +39,7 @@
{
public static Test suite()
{
- return new JBossWSCXFTestSetup(UsernameServletTestCase.class,"jaxws-samples-wsse-username.war, jaxws-samples-wsse-username-client.war");
+ return new JBossWSCXFTestSetup(UsernameServletTestCase.class, UsernameDeploymentArchives.SERVER_WAR + " " + UsernameDeploymentArchives.CLIENT_WAR);
}
public void test() throws Exception
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameTestCase.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameTestCase.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -50,7 +50,7 @@
public static Test suite()
{
- return new JBossWSCXFTestSetup(UsernameTestCase.class,"jaxws-samples-wsse-username.war");
+ return new JBossWSCXFTestSetup(UsernameTestCase.class, UsernameDeploymentArchives.SERVER_WAR);
}
public void test() throws Exception
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/KerberosTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/KerberosTestCase.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/KerberosTestCase.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -21,8 +21,11 @@
*/
package org.jboss.test.ws.jaxws.samples.wsse.kerberos;
+import java.io.File;
import java.net.URL;
import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
import java.util.Map;
import javax.xml.namespace.QName;
@@ -36,9 +39,12 @@
import org.apache.cxf.frontend.ClientProxy;
import org.apache.cxf.ws.policy.WSPolicyFeature;
import org.apache.cxf.ws.security.kerberos.KerberosClient;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.test.ws.jaxws.samples.wsse.kerberos.contract.DoubleItPortType;
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;
/**
* This test is excluded. Please modify modules/testsuite/pom.xml to enable this test.
@@ -87,10 +93,46 @@
{
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") { {
+ archive
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.apache.ws.security\n"))
+ .addAsResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/kerberos/cxf.xml"), "cxf.xml")
+ .addClass(org.jboss.test.ws.jaxws.samples.wsse.kerberos.DoubleItPortTypeImpl.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsse.kerberos.KeystorePasswordCallback.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsse.kerberos.contract.DoubleItFault.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsse.kerberos.contract.DoubleItPortType.class)
+ .addPackage("org.jboss.test.ws.jaxws.samples.wsse.kerberos.schema")
+ .addAsResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/kerberos/WEB-INF/alice.jks"), "alice.jks")
+ .addAsResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/kerberos/WEB-INF/alice.properties"), "alice.properties")
+ .addAsResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/kerberos/WEB-INF/bob.jks"), "bob.jks")
+ .addAsResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/kerberos/WEB-INF/bob.properties"), "bob.properties")
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/kerberos/WEB-INF/jbossws-cxf.xml"), "jbossws-cxf.xml")
+ .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") { {
+ archive
+ .addManifest()
+ .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/kerberos//cxf.xml"), "cxf.xml")
+ .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/kerberos/META-INF/alice.jks"), "alice.jks")
+ .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()]);
+ }
+
public static Test suite()
{
JBossWSCXFTestSetup testSetup;
- testSetup = new JBossWSCXFTestSetup(KerberosTestCase.class, "jaxws-samples-wsse-kerberos-client.jar jaxws-samples-wsse-kerberos.war");
+ testSetup = new JBossWSCXFTestSetup(KerberosTestCase.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"));
sslOptions.put("server-identity.ssl.keystore-password", "changeit");
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseDigest/UsernameDigestTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseDigest/UsernameDigestTestCase.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseDigest/UsernameDigestTestCase.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -21,8 +21,11 @@
*/
package org.jboss.test.ws.jaxws.samples.wsseDigest;
+import java.io.File;
import java.net.URL;
import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
import java.util.Map;
import javax.xml.namespace.QName;
@@ -35,9 +38,12 @@
import org.apache.cxf.endpoint.Endpoint;
import org.apache.cxf.frontend.ClientProxy;
import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.wsf.stack.cxf.security.authentication.callback.UsernameTokenCallback;
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;
/**
* WS-Security username authorization test case
@@ -51,10 +57,33 @@
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") { {
+ archive
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-server\n"))
+ .addClass(org.jboss.test.ws.jaxws.samples.wsseDigest.MemoryNonceStore.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsseDigest.ServiceIface.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsseDigest.ServiceImpl.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsseDigest.jaxws.GreetMe.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsseDigest.jaxws.GreetMeResponse.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsseDigest.jaxws.SayHello.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsseDigest.jaxws.SayHelloResponse.class)
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/username-digest/WEB-INF/jboss-web.xml"), "jboss-web.xml")
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsse/username-digest/WEB-INF/jbossws-cxf.xml"), "jbossws-cxf.xml")
+ .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()]);
+ }
+
public static Test suite()
{
JBossWSCXFTestSetup testSetup;
- testSetup = new JBossWSCXFTestSetup(UsernameDigestTestCase.class, "jaxws-samples-wsse-username-digest.war");
+ testSetup = new JBossWSCXFTestSetup(UsernameDigestTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
Map<String, String> authenticationOptions = new HashMap<String, String>();
authenticationOptions.put("usersProperties",
getResourceFile("jaxws/samples/wsse/username-digest/WEB-INF/jbossws-users.properties").getAbsolutePath());
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseEJB/WsseEjbTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseEJB/WsseEjbTestCase.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseEJB/WsseEjbTestCase.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -21,8 +21,11 @@
*/
package org.jboss.test.ws.jaxws.samples.wsseEJB;
+import java.io.File;
import java.net.URL;
import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
import java.util.Map;
import javax.xml.namespace.QName;
@@ -37,6 +40,8 @@
import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
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;
/**
* Secure EJB endpoint test
@@ -47,9 +52,28 @@
{
public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-samples-wsseEJB/EjbEndpointService/EjbEndpoint";
+ public static BaseDeployment<?>[] createDeployments() {
+ List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
+ list.add(new JBossWSTestHelper.JarDeployment("jaxws-samples-wsseEJB.jar") { {
+ archive
+ .addManifest()
+ .addClass(org.jboss.test.ws.jaxws.samples.wsseEJB.EjbEndpoint.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsseEJB.EjbEndpointImpl.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsseEJB.GreetMe.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsseEJB.GreetMeResponse.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsseEJB.SayHello.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wsseEJB.SayHelloResponse.class)
+ .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()]);
+ }
+
public static Test suite()
{
- return new JBossWSCXFTestSetup(WsseEjbTestCase.class, "jaxws-samples-wsseEJB.jar", true);
+ return new JBossWSCXFTestSetup(WsseEjbTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()), true);
}
private EjbEndpoint getPort() throws Exception
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/SignEncryptTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/SignEncryptTestCase.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/SignEncryptTestCase.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -21,7 +21,10 @@
*/
package org.jboss.test.ws.jaxws.samples.wssePolicy;
+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.BindingProvider;
@@ -31,8 +34,11 @@
import junit.framework.Test;
import org.apache.cxf.ws.security.SecurityConstants;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
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;
/**
* WS-Security Policy sign & encrypt test case
@@ -42,17 +48,44 @@
*/
public final class SignEncryptTestCase extends JBossWSTest
{
- private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wssePolicy-sign-encrypt";
-
+ public static BaseDeployment<?>[] createDeployments() {
+ List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
+ list.add(new JBossWSTestHelper.WarDeployment("jaxws-samples-wssePolicy-sign-encrypt.war") { {
+ archive
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.apache.ws.security\n"))
+ .addClass(org.jboss.test.ws.jaxws.samples.wssePolicy.KeystorePasswordCallback.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wssePolicy.ServiceIface.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wssePolicy.ServiceImpl.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wssePolicy.jaxws.SayHello.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wssePolicy.jaxws.SayHelloResponse.class)
+ .addAsResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wssePolicy/sign-encrypt/WEB-INF/bob.jks"), "bob.jks")
+ .addAsResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wssePolicy/sign-encrypt/WEB-INF/bob.properties"), "bob.properties")
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wssePolicy/sign-encrypt/WEB-INF/jbossws-cxf.xml"), "jbossws-cxf.xml")
+ .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") { {
+ 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()]);
+ }
+
public static Test suite()
{
- return new JBossWSCXFTestSetup(SignEncryptTestCase.class, "jaxws-samples-wssePolicy-sign-encrypt-client.jar jaxws-samples-wssePolicy-sign-encrypt.war");
+ return new JBossWSCXFTestSetup(SignEncryptTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
}
public void test() throws Exception
{
QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy", "SecurityService");
- URL wsdlURL = new URL(serviceURL + "?wsdl");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-wssePolicy-sign-encrypt?wsdl");
Service service = Service.create(wsdlURL, serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
setupWsse(proxy);
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/SignTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/SignTestCase.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/SignTestCase.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -21,7 +21,10 @@
*/
package org.jboss.test.ws.jaxws.samples.wssePolicy;
+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.BindingProvider;
@@ -30,8 +33,11 @@
import junit.framework.Test;
import org.apache.cxf.ws.security.SecurityConstants;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
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;
/**
* WS-Security Policy sign test case
@@ -43,9 +49,38 @@
{
private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wssePolicy-sign";
+ public static BaseDeployment<?>[] createDeployments() {
+ List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
+ list.add(new JBossWSTestHelper.WarDeployment("jaxws-samples-wssePolicy-sign.war") { {
+ archive
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.apache.ws.security\n"))
+ .addClass(org.jboss.test.ws.jaxws.samples.wssePolicy.KeystorePasswordCallback.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wssePolicy.ServiceIface.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wssePolicy.ServiceImpl.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wssePolicy.jaxws.SayHello.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wssePolicy.jaxws.SayHelloResponse.class)
+ .addAsResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wssePolicy/sign/WEB-INF/bob.jks"), "bob.jks")
+ .addAsResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wssePolicy/sign/WEB-INF/bob.properties"), "bob.properties")
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wssePolicy/sign/WEB-INF/jbossws-cxf.xml"), "jbossws-cxf.xml")
+ .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") { {
+ 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()]);
+ }
+
public static Test suite()
{
- return new JBossWSCXFTestSetup(SignTestCase.class, "jaxws-samples-wssePolicy-sign-client.jar jaxws-samples-wssePolicy-sign.war");
+ return new JBossWSCXFTestSetup(SignTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
}
public void test() throws Exception
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/UsernameTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/UsernameTestCase.java 2014-07-08 07:28:10 UTC (rev 18792)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/UsernameTestCase.java 2014-07-08 21:06:17 UTC (rev 18793)
@@ -21,8 +21,11 @@
*/
package org.jboss.test.ws.jaxws.samples.wssePolicy;
+import java.io.File;
import java.net.URL;
import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
import java.util.Map;
import javax.xml.namespace.QName;
@@ -32,8 +35,11 @@
import junit.framework.Test;
import org.apache.cxf.ws.security.SecurityConstants;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
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.jboss.wsf.test.JBossWSTestSetup;
/**
@@ -46,6 +52,26 @@
{
private final String serviceURL = "https://" + getServerHost() + ":8443/jaxws-samples-wssePolicy-username";
+ public static BaseDeployment<?>[] createDeployments() {
+ List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
+ list.add(new JBossWSTestHelper.WarDeployment("jaxws-samples-wssePolicy-username.war") { {
+ archive
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.apache.ws.security\n"))
+ .addClass(org.jboss.test.ws.jaxws.samples.wssePolicy.ServerUsernamePasswordCallback.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wssePolicy.ServiceIface.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wssePolicy.ServiceImpl.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wssePolicy.jaxws.SayHello.class)
+ .addClass(org.jboss.test.ws.jaxws.samples.wssePolicy.jaxws.SayHelloResponse.class)
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wssePolicy/username/WEB-INF/jbossws-cxf.xml"), "jbossws-cxf.xml")
+ .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()]);
+ }
+
public static Test suite()
{
/** System properties - currently set at testsuite start time
@@ -54,7 +80,7 @@
System.setProperty("javax.net.ssl.trustStoreType", "jks");
System.setProperty("org.jboss.security.ignoreHttpsHost", "true");
*/
- JBossWSTestSetup setup = new JBossWSCXFTestSetup(UsernameTestCase.class, "jaxws-samples-wssePolicy-username.war");
+ 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"));
sslOptions.put("server-identity.ssl.keystore-password", "changeit");
[View Less]
10 years, 8 months
JBossWS SVN: r18792 - stack/cxf/trunk.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2014-07-08 03:28:10 -0400 (Tue, 08 Jul 2014)
New Revision: 18792
Modified:
stack/cxf/trunk/pom.xml
Log:
Set maven-help-plugin version to work with maven 3.2.2
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2014-07-07 16:23:56 UTC (rev 18791)
+++ stack/cxf/trunk/pom.xml 2014-07-08 07:28:10 UTC (rev 18792)
@@ -1243,6 +1243,10 @@
</dependencies>
</plugin>
…
[View More] <plugin>
+ <artifactId>maven-help-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+ <plugin>
<groupId>org.jboss.maven.plugins</groupId>
<artifactId>maven-jdocbook-plugin</artifactId>
<version>2.1.2</version>
[View Less]
10 years, 8 months
JBossWS SVN: r18791 - stack/cxf/trunk/modules/client.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-07-07 12:23:56 -0400 (Mon, 07 Jul 2014)
New Revision: 18791
Modified:
stack/cxf/trunk/modules/client/pom.xml
Log:
[JBWS-3799] Remove duplicated dependency, caused by commit 18747
Modified: stack/cxf/trunk/modules/client/pom.xml
===================================================================
--- stack/cxf/trunk/modules/client/pom.xml 2014-07-07 15:31:05 UTC (rev 18790)
+++ stack/cxf/trunk/modules/client/pom.xml 2014-07-07 16:23:56 UTC (rev 18791)
@@ -240,10 +…
[View More]240,6 @@
</exclusion>
</exclusions>
</dependency>
- <dependency>
- <groupId>org.jboss.spec.javax.xml.bind</groupId>
- <artifactId>jboss-jaxb-api_2.2_spec</artifactId>
- </dependency>
<!-- jboss provided -->
<dependency>
[View Less]
10 years, 8 months
JBossWS SVN: r18790 - in stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/noIntegration: moduleImports/WEB-INF and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-07-07 11:31:05 -0400 (Mon, 07 Jul 2014)
New Revision: 18790
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/noIntegration/embedded/WEB-INF/jboss-deployment-structure.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/noIntegration/moduleImports/WEB-INF/jboss-deployment-structure.xml
Log:
[WFLY-3440] Fix jboss-deployment-structure.xml files according to new WFLY behaviour when WS subsystem is disabled
…
[View More]
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/noIntegration/embedded/WEB-INF/jboss-deployment-structure.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/noIntegration/embedded/WEB-INF/jboss-deployment-structure.xml 2014-07-07 09:31:44 UTC (rev 18789)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/noIntegration/embedded/WEB-INF/jboss-deployment-structure.xml 2014-07-07 15:31:05 UTC (rev 18790)
@@ -7,6 +7,9 @@
</exclude-subsystems>
<!-- Dependencies below included for the sake of simplifying test only, would actually come within the deployment in this scenario -->
<dependencies>
+ <module name="javax.xml.ws.api"/>
+ <module name="javax.xml.soap.api"/>
+ <module name="javax.jws.api"/>
<module name="javax.wsdl4j.api"/>
<module name="org.apache.ws.xmlschema"/>
<module name="org.apache.neethi"/>
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/noIntegration/moduleImports/WEB-INF/jboss-deployment-structure.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/noIntegration/moduleImports/WEB-INF/jboss-deployment-structure.xml 2014-07-07 09:31:44 UTC (rev 18789)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/noIntegration/moduleImports/WEB-INF/jboss-deployment-structure.xml 2014-07-07 15:31:05 UTC (rev 18790)
@@ -8,6 +8,9 @@
<module name="org.apache.cxf"/>
<module name="org.apache.cxf.impl"/>
<module name="javax.wsdl4j.api"/>
+ <module name="javax.xml.ws.api"/>
+ <module name="javax.xml.soap.api"/>
+ <module name="javax.jws.api"/>
<module name="org.apache.ws.xmlschema"/>
<module name="org.apache.neethi"/>
<module name="org.codehaus.woodstox"/>
[View Less]
10 years, 8 months
JBossWS SVN: r18789 - in stack/cxf/trunk/modules/dist/src/main: scripts and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-07-07 05:31:44 -0400 (Mon, 07 Jul 2014)
New Revision: 18789
Modified:
stack/cxf/trunk/modules/dist/src/main/distro/build.xml
stack/cxf/trunk/modules/dist/src/main/scripts/assembly-bin-dist.xml
Log:
[JBWS-3711] Fixing bin distro
Modified: stack/cxf/trunk/modules/dist/src/main/distro/build.xml
===================================================================
--- stack/cxf/trunk/modules/dist/src/main/distro/build.xml 2014-07-07 08:38:55 UTC (rev 18788)
+++ …
[View More]stack/cxf/trunk/modules/dist/src/main/distro/build.xml 2014-07-07 09:31:44 UTC (rev 18789)
@@ -111,9 +111,7 @@
<macro-copy-resources srcdir="${tests.dir}"/>
</target>
- <target name="tests-jars" depends="tests-compile,tests-copy-resources">
- <ant antfile="${tests.dir}/ant-import/cxf-samples-jars-jaxws.xml" target="build-jars-jaxws" inheritall="true"/>
- </target>
+ <target name="tests-jars" depends="tests-compile,tests-copy-resources"/>
<target name="tests-main" depends="tests-jars" description="Build the test deployments."/>
Modified: stack/cxf/trunk/modules/dist/src/main/scripts/assembly-bin-dist.xml
===================================================================
--- stack/cxf/trunk/modules/dist/src/main/scripts/assembly-bin-dist.xml 2014-07-07 08:38:55 UTC (rev 18788)
+++ stack/cxf/trunk/modules/dist/src/main/scripts/assembly-bin-dist.xml 2014-07-07 09:31:44 UTC (rev 18789)
@@ -87,13 +87,6 @@
<include>resources/jaxws/samples/**</include>
</includes>
</fileSet>
- <fileSet>
- <directory>../testsuite/cxf-tests/scripts</directory>
- <outputDirectory>jbossws-cxf-bin-dist/tests/ant-import</outputDirectory>
- <includes>
- <include>cxf-samples-jars-jaxws.xml</include>
- </includes>
- </fileSet>
<!-- Test utils -->
<fileSet>
<directory>../test-utils/src/main</directory>
[View Less]
10 years, 8 months
JBossWS SVN: r18788 - in stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test: java/org/jboss/test/ws/jaxws/samples/wsse and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2014-07-07 04:38:55 -0400 (Mon, 07 Jul 2014)
New Revision: 18788
Added:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/DoubleItPortTypeImpl.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/KerberosTestCase.java
stack/cxf/…
[View More]trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/KeystorePasswordCallback.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/contract/
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/contract/DoubleItFault.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/contract/DoubleItPortType.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/DoubleIt.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/DoubleIt2.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/DoubleItFault.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/DoubleItResponse.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/ObjectFactory.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/package-info.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsse/kerberos/kerberos.jaas
Removed:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/kerberos/
Log:
Fix kerberos test package name
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/DoubleItPortTypeImpl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/DoubleItPortTypeImpl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/DoubleItPortTypeImpl.java 2014-07-07 08:38:55 UTC (rev 18788)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.test.ws.jaxws.samples.wsse.kerberos;
+
+import java.security.Principal;
+
+import javax.annotation.Resource;
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceContext;
+
+import org.jboss.test.ws.jaxws.samples.wsse.kerberos.contract.DoubleItFault;
+import org.jboss.test.ws.jaxws.samples.wsse.kerberos.contract.DoubleItPortType;
+
+@WebService(targetNamespace = "http://www.example.org/contract/DoubleIt",
+ serviceName = "DoubleItService",
+ portName = "DoubleItKerberosSupportingPort",
+ wsdlLocation = "WEB-INF/wsdl/DoubleItKerberos.wsdl",
+ endpointInterface = "org.jboss.test.ws.jaxws.samples.wsse.kerberos.contract.DoubleItPortType")
+
+public class DoubleItPortTypeImpl implements DoubleItPortType
+{
+
+ @Resource
+ WebServiceContext wsContext;
+
+ public int doubleIt(int numberToDouble) throws DoubleItFault
+ {
+ Principal pr = wsContext.getUserPrincipal();
+
+ if (pr == null)
+ {
+ throw new DoubleItFault("Principal must not be null");
+ }
+
+ if (pr.getName() == null)
+ {
+ throw new DoubleItFault("Principal.getName() must not return null");
+ }
+ return numberToDouble * 2;
+ }
+
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/DoubleItPortTypeImpl.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/KerberosTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/KerberosTestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/KerberosTestCase.java 2014-07-07 08:38:55 UTC (rev 18788)
@@ -0,0 +1,256 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.test.ws.jaxws.samples.wsse.kerberos;
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.apache.cxf.endpoint.Client;
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.feature.LoggingFeature;
+import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.ws.policy.WSPolicyFeature;
+import org.apache.cxf.ws.security.kerberos.KerberosClient;
+import org.jboss.test.ws.jaxws.samples.wsse.kerberos.contract.DoubleItPortType;
+import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * This test is excluded. Please modify modules/testsuite/pom.xml to enable this test.
+ * Before run this test, a KDC of realm "WS.APACHE.ORG" is required to setup first.
+ * Please look at these two links to find more info about setup a KDC on Fedora and configure it with realm and principals:
+ * https://docs.fedoraproject.org/en-US/Fedora//html/Security_Guide/sect-Sec...
+ * http://coheigea.blogspot.com/2011/10/using-kerberos-with-web-services-par...
+ * In server side, add the following security-domain to security subsystem section in AS7/WildFly80 standalone.xml:
+ *
+ * <pre>
+ * {@code
+ * <security-domain name="alice" cache-type="default">
+ <authentication>
+ <login-module code="com.sun.security.auth.module.Krb5LoginModule" flag="required">
+ <module-option name="refreshKrb5Config" value="true"/>
+ <module-option name="useKeyTab" value="true"/>
+ <module-option name="keyTab" value="/home/jimma/alice.keytab"/>
+ <module-option name="principal" value="alice"/>
+ <module-option name="storeKey" value="true"/>
+ <module-option name="debug" value="true"/>
+ </login-module>
+ </authentication>
+ </security-domain>
+ <security-domain name="bob" cache-type="default">
+ <authentication>
+ <login-module code="com.sun.security.auth.module.Krb5LoginModule" flag="required">
+ <module-option name="refreshKrb5Config" value="true"/>
+ <module-option name="useKeyTab" value="true"/>
+ <module-option name="keyTab" value="/home/jimma/bob.keytab"/>
+ <module-option name="principal" value="bob/service.ws.apache.org"/>
+ <module-option name="storeKey" value="true"/>
+ <module-option name="debug" value="true"/>
+ </login-module>
+ </authentication>
+ </security-domain>
+
+ }
+ </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>
+ */
+
+
+
+public class KerberosTestCase extends JBossWSTest
+{
+
+ private static final String namespace = "http://www.example.org/contract/DoubleIt";
+ public static Test suite()
+ {
+ JBossWSCXFTestSetup testSetup;
+ testSetup = new JBossWSCXFTestSetup(KerberosTestCase.class, "jaxws-samples-wsse-kerberos-client.jar jaxws-samples-wsse-kerberos.war");
+ Map<String, String> sslOptions = new HashMap<String, String>();
+ sslOptions.put("server-identity.ssl.keystore-path", System.getProperty("org.jboss.ws.testsuite.server.keystore"));
+ sslOptions.put("server-identity.ssl.keystore-password", "changeit");
+ sslOptions.put("server-identity.ssl.alias", "tomcat");
+ testSetup.setHttpsConnectorRequirement(sslOptions);
+
+ return testSetup;
+ }
+
+ public void testKerberosSupport() throws Exception
+ {
+ String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-kerberos/DoubleItKerberosSupport";
+ QName servicePort = new QName(namespace, "DoubleItKerberosSupportingPort");
+
+ QName serviceName = new QName(namespace, "DoubleItService");
+ URL wsdlURL = new URL(serviceURL + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ DoubleItPortType proxy = (DoubleItPortType)service.getPort(servicePort, DoubleItPortType.class);
+ setupKerberosSupport(proxy);
+ assertEquals(20, proxy.doubleIt(10));
+ }
+
+
+ public void testKerberosTransport() throws Exception
+ {
+ String serviceURL = "https://" + getServerHost() + ":8443/jaxws-samples-wsse-kerberos/DoubleItKerberosTransport";
+ QName servicePort = new QName(namespace, "DoubleItKerberosTransportPort");
+ QName serviceName = new QName(namespace, "DoubleItService");
+ URL wsdlURL = new URL(serviceURL + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ DoubleItPortType proxy = (DoubleItPortType)service.getPort(servicePort, DoubleItPortType.class);
+ setupKerberosTransport(proxy);
+ assertEquals(20, proxy.doubleIt(10));
+ }
+
+
+ public void testKerberosSymmetricSupporting() throws Exception
+ {
+ String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-kerberos/DoubleItKerberosOverSymmetricSupporting";
+ QName servicePort = new QName(namespace, "DoubleItKerberosSymmetricSupportingPort");
+ QName serviceName = new QName(namespace, "DoubleItService");
+ URL wsdlURL = new URL(serviceURL + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ DoubleItPortType proxy = (DoubleItPortType)service.getPort(servicePort, DoubleItPortType.class);
+ setupSymmetricSupporting(proxy);
+ assertEquals(20, proxy.doubleIt(10));
+ }
+
+
+ public void testKerberosAsymmetric() throws Exception
+ {
+ String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-kerberos/DoubleItKerberosAsymmetric";
+ QName servicePort = new QName(namespace, "DoubleItKerberosAsymmetricPort");
+ QName serviceName = new QName(namespace, "DoubleItService");
+ URL wsdlURL = new URL(serviceURL + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ DoubleItPortType proxy = (DoubleItPortType)service.getPort(servicePort, DoubleItPortType.class);
+ setupAsymmetric(proxy);
+ assertEquals(20, proxy.doubleIt(10));
+ }
+
+ public void testKerberosOverAsymmetricSignedEncrypted() throws Exception
+ {
+ String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-kerberos/DoubleItKerberosOverAsymmetricSignedEncrypted";
+ QName servicePort = new QName(namespace, "DoubleItKerberosAsymmetricSignedEncryptedPort");
+ QName serviceName = new QName(namespace, "DoubleItService");
+ URL wsdlURL = new URL(serviceURL + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ DoubleItPortType proxy = (DoubleItPortType)service.getPort(servicePort, DoubleItPortType.class);
+ setupAsymmetricSignedEncrypted(proxy);
+ assertEquals(20, proxy.doubleIt(10));
+ }
+
+ public void testKerberosKerberosSymmetric() throws Exception
+ {
+ String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-kerberos/DoubleItKerberosSymmetric";
+ QName servicePort = new QName(namespace, "DoubleItKerberosSymmetricPort");
+ QName serviceName = new QName(namespace, "DoubleItService");
+ URL wsdlURL = new URL(serviceURL + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ DoubleItPortType proxy = (DoubleItPortType)service.getPort(servicePort, DoubleItPortType.class);
+ setupSymmetricSupporting(proxy);
+ assertEquals(20, proxy.doubleIt(10));
+ }
+
+ private void setupAsymmetricSignedEncrypted(DoubleItPortType proxy)
+ {
+ Client client = ClientProxy.getClient(proxy);
+ Endpoint cxfEndpoint = client.getEndpoint();
+ cxfEndpoint.put("ws-security.callback-handler","org.jboss.test.ws.jaxws.samples.wsse.kerberos.KeystorePasswordCallback");
+ cxfEndpoint.put("ws-security.encryption.properties", "META-INF/bob.properties");
+ cxfEndpoint.put("ws-security.encryption.username", "bob");
+ cxfEndpoint.put("ws-security.signature.properties", "META-INF/alice.properties");
+ cxfEndpoint.put("ws-security.signature.username", "alice");
+
+ client.getBus().getFeatures().add(new LoggingFeature());
+ client.getBus().getFeatures().add(new WSPolicyFeature());
+ KerberosClient kerberosClient = new KerberosClient(client.getBus());
+ kerberosClient.setServiceName("bob(a)service.ws.apache.org");
+ kerberosClient.setContextName("alice");
+ cxfEndpoint.put("ws-security.kerberos.client", kerberosClient);
+ }
+
+ private void setupAsymmetric(DoubleItPortType proxy)
+ {
+ Client client = ClientProxy.getClient(proxy);
+ Endpoint cxfEndpoint = client.getEndpoint();
+ cxfEndpoint.put("ws-security.callback-handler","org.jboss.test.ws.jaxws.samples.wsse.kerberos.KeystorePasswordCallback");
+ cxfEndpoint.put("ws-security.encryption.properties", "META-INF/bob.properties");
+ cxfEndpoint.put("ws-security.encryption.username", "bob");
+ cxfEndpoint.put("ws-security.signature.properties", "META-INF/alice.properties");
+ cxfEndpoint.put("ws-security.signature.username", "alice");
+
+ client.getBus().getFeatures().add(new LoggingFeature());
+ client.getBus().getFeatures().add(new WSPolicyFeature());
+ KerberosClient kerberosClient = new KerberosClient(client.getBus());
+ kerberosClient.setServiceName("bob(a)service.ws.apache.org");
+ kerberosClient.setContextName("alice");
+ cxfEndpoint.put("ws-security.kerberos.client", kerberosClient);
+ }
+
+ private void setupSymmetricSupporting(DoubleItPortType proxy)
+ {
+ Client client = ClientProxy.getClient(proxy);
+ Endpoint cxfEndpoint = client.getEndpoint();
+ cxfEndpoint.put("ws-security.encryption.properties", "META-INF/bob.properties");
+ cxfEndpoint.put("ws-security.encryption.username", "bob");
+
+ client.getBus().getFeatures().add(new LoggingFeature());
+ client.getBus().getFeatures().add(new WSPolicyFeature());
+ KerberosClient kerberosClient = new KerberosClient(client.getBus());
+ kerberosClient.setServiceName("bob(a)service.ws.apache.org");
+ kerberosClient.setContextName("alice");
+ cxfEndpoint.put("ws-security.kerberos.client", kerberosClient);
+ }
+
+ private void setupKerberosSupport(DoubleItPortType proxy)
+ {
+ Client client = ClientProxy.getClient(proxy);
+ Endpoint cxfEndpoint = client.getEndpoint();
+ client.getBus().getFeatures().add(new LoggingFeature());
+ client.getBus().getFeatures().add(new WSPolicyFeature());
+ KerberosClient kerberosClient = new KerberosClient(client.getBus());
+ kerberosClient.setServiceName("bob(a)service.ws.apache.org");
+ kerberosClient.setContextName("alice");
+ cxfEndpoint.put("ws-security.kerberos.client", kerberosClient);
+ }
+
+
+ private void setupKerberosTransport(DoubleItPortType proxy)
+ {
+ Client client = ClientProxy.getClient(proxy);
+ Endpoint cxfEndpoint = client.getEndpoint();
+ cxfEndpoint.put("ws-security.is-bsp-compliant", "false");
+
+ client.getBus().getFeatures().add(new LoggingFeature());
+ client.getBus().getFeatures().add(new WSPolicyFeature());
+ KerberosClient kerberosClient = new KerberosClient(client.getBus());
+ kerberosClient.setServiceName("bob(a)service.ws.apache.org");
+ kerberosClient.setContextName("alice");
+ cxfEndpoint.put("ws-security.kerberos.client", kerberosClient);
+ }
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/KerberosTestCase.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/KeystorePasswordCallback.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/KeystorePasswordCallback.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/KeystorePasswordCallback.java 2014-07-07 08:38:55 UTC (rev 18788)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.test.ws.jaxws.samples.wsse.kerberos;
+
+import java.io.IOException;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.wss4j.common.ext.WSPasswordCallback;
+
+
+public class KeystorePasswordCallback implements CallbackHandler {
+
+ public KeystorePasswordCallback() {
+ }
+
+ /**
+ * It attempts to get the password from the private
+ * alias/passwords map.
+ */
+ public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
+ for (int i = 0; i < callbacks.length; i++) {
+ WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
+ if ("alice".equals(pc.getIdentifier())) {
+ pc.setPassword("password");
+ } else if ("bob".equals(pc.getIdentifier())) {
+ pc.setPassword("password");
+ } else {
+ pc.setPassword("abcd!1234");
+ }
+ }
+ }
+
+
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/KeystorePasswordCallback.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/contract/DoubleItFault.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/contract/DoubleItFault.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/contract/DoubleItFault.java 2014-07-07 08:38:55 UTC (rev 18788)
@@ -0,0 +1,58 @@
+
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.test.ws.jaxws.samples.wsse.kerberos.contract;
+
+import javax.xml.ws.WebFault;
+
+@WebFault(name = "DoubleItFault", targetNamespace = "http://www.example.org/schema/DoubleIt")
+public class DoubleItFault extends Exception {
+ public static final long serialVersionUID = 1L;
+
+ private org.jboss.test.ws.jaxws.samples.wsse.kerberos.schema.DoubleItFault doubleItFault;
+
+ public DoubleItFault() {
+ super();
+ }
+
+ public DoubleItFault(String message) {
+ super(message);
+ }
+
+ public DoubleItFault(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public DoubleItFault(String message, org.jboss.test.ws.jaxws.samples.wsse.kerberos.schema.DoubleItFault doubleItFault) {
+ super(message);
+ this.doubleItFault = doubleItFault;
+ }
+
+ public DoubleItFault(String message, org.jboss.test.ws.jaxws.samples.wsse.kerberos.schema.DoubleItFault doubleItFault, Throwable cause) {
+ super(message, cause);
+ this.doubleItFault = doubleItFault;
+ }
+
+ public org.jboss.test.ws.jaxws.samples.wsse.kerberos.schema.DoubleItFault getFaultInfo() {
+ return this.doubleItFault;
+ }
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/contract/DoubleItFault.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/contract/DoubleItPortType.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/contract/DoubleItPortType.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/contract/DoubleItPortType.java 2014-07-07 08:38:55 UTC (rev 18788)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.test.ws.jaxws.samples.wsse.kerberos.contract;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+@WebService(targetNamespace = "http://www.example.org/contract/DoubleIt", name = "DoubleItPortType")
+(a)XmlSeeAlso({org.jboss.test.ws.jaxws.samples.wsse.kerberos.schema.ObjectFactory.class})
+public interface DoubleItPortType {
+
+ @WebResult(name = "doubledNumber", targetNamespace = "")
+ @RequestWrapper(localName = "DoubleIt", targetNamespace = "http://www.example.org/schema/DoubleIt", className = "org.jboss.test.ws.jaxws.samples.wsse.kerberos.schema.DoubleIt")
+ @WebMethod(operationName = "DoubleIt")
+ @ResponseWrapper(localName = "DoubleItResponse", targetNamespace = "http://www.example.org/schema/DoubleIt", className = "org.jboss.test.ws.jaxws.samples.wsse.kerberos.schema.DoubleItResponse")
+ public int doubleIt(
+ @WebParam(name = "numberToDouble", targetNamespace = "")
+ int numberToDouble
+ ) throws DoubleItFault;
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/contract/DoubleItPortType.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/DoubleIt.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/DoubleIt.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/DoubleIt.java 2014-07-07 08:38:55 UTC (rev 18788)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.test.ws.jaxws.samples.wsse.kerberos.schema;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="numberToDouble" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "numberToDouble"
+})
+@XmlRootElement(name = "DoubleIt")
+public class DoubleIt {
+
+ protected int numberToDouble;
+
+ /**
+ * Gets the value of the numberToDouble property.
+ *
+ */
+ public int getNumberToDouble() {
+ return numberToDouble;
+ }
+
+ /**
+ * Sets the value of the numberToDouble property.
+ *
+ */
+ public void setNumberToDouble(int value) {
+ this.numberToDouble = value;
+ }
+
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/DoubleIt.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/DoubleIt2.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/DoubleIt2.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/DoubleIt2.java 2014-07-07 08:38:55 UTC (rev 18788)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.test.ws.jaxws.samples.wsse.kerberos.schema;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="numberToDouble" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "numberToDouble"
+})
+@XmlRootElement(name = "DoubleIt2")
+public class DoubleIt2 {
+
+ protected int numberToDouble;
+
+ /**
+ * Gets the value of the numberToDouble property.
+ *
+ */
+ public int getNumberToDouble() {
+ return numberToDouble;
+ }
+
+ /**
+ * Sets the value of the numberToDouble property.
+ *
+ */
+ public void setNumberToDouble(int value) {
+ this.numberToDouble = value;
+ }
+
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/DoubleIt2.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/DoubleItFault.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/DoubleItFault.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/DoubleItFault.java 2014-07-07 08:38:55 UTC (rev 18788)
@@ -0,0 +1,93 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.test.ws.jaxws.samples.wsse.kerberos.schema;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="minor" type="{http://www.w3.org/2001/XMLSchema}short"/>
+ * <element name="major" type="{http://www.w3.org/2001/XMLSchema}short"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "minor",
+ "major"
+})
+@XmlRootElement(name = "DoubleItFault")
+public class DoubleItFault {
+
+ protected short minor;
+ protected short major;
+
+ /**
+ * Gets the value of the minor property.
+ *
+ */
+ public short getMinor() {
+ return minor;
+ }
+
+ /**
+ * Sets the value of the minor property.
+ *
+ */
+ public void setMinor(short value) {
+ this.minor = value;
+ }
+
+ /**
+ * Gets the value of the major property.
+ *
+ */
+ public short getMajor() {
+ return major;
+ }
+
+ /**
+ * Sets the value of the major property.
+ *
+ */
+ public void setMajor(short value) {
+ this.major = value;
+ }
+
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/DoubleItFault.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/DoubleItResponse.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/DoubleItResponse.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/DoubleItResponse.java 2014-07-07 08:38:55 UTC (rev 18788)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.test.ws.jaxws.samples.wsse.kerberos.schema;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="doubledNumber" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "doubledNumber"
+})
+@XmlRootElement(name = "DoubleItResponse")
+public class DoubleItResponse {
+
+ protected int doubledNumber;
+
+ /**
+ * Gets the value of the doubledNumber property.
+ *
+ */
+ public int getDoubledNumber() {
+ return doubledNumber;
+ }
+
+ /**
+ * Sets the value of the doubledNumber property.
+ *
+ */
+ public void setDoubledNumber(int value) {
+ this.doubledNumber = value;
+ }
+
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/DoubleItResponse.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/ObjectFactory.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/ObjectFactory.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/ObjectFactory.java 2014-07-07 08:38:55 UTC (rev 18788)
@@ -0,0 +1,97 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.test.ws.jaxws.samples.wsse.kerberos.schema;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.example.schema.doubleit package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+ private final static QName _DoubleItHeader_QNAME = new QName("http://www.example.org/schema/DoubleIt", "DoubleItHeader");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.example.schema.doubleit
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link DoubleItFault }
+ *
+ */
+ public DoubleItFault createDoubleItFault() {
+ return new DoubleItFault();
+ }
+
+ /**
+ * Create an instance of {@link DoubleItResponse }
+ *
+ */
+ public DoubleItResponse createDoubleItResponse() {
+ return new DoubleItResponse();
+ }
+
+ /**
+ * Create an instance of {@link DoubleIt2 }
+ *
+ */
+ public DoubleIt2 createDoubleIt2() {
+ return new DoubleIt2();
+ }
+
+ /**
+ * Create an instance of {@link DoubleIt }
+ *
+ */
+ public DoubleIt createDoubleIt() {
+ return new DoubleIt();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link Integer }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://www.example.org/schema/DoubleIt", name = "DoubleItHeader")
+ public JAXBElement<Integer> createDoubleItHeader(Integer value) {
+ return new JAXBElement<Integer>(_DoubleItHeader_QNAME, Integer.class, null, value);
+ }
+
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/ObjectFactory.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/package-info.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/package-info.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/package-info.java 2014-07-07 08:38:55 UTC (rev 18788)
@@ -0,0 +1,23 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.
+ */
+(a)javax.xml.bind.annotation.XmlSchema(namespace = "http://www.example.org/schema/DoubleIt")
+package org.jboss.test.ws.jaxws.samples.wsse.kerberos.schema;
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/schema/package-info.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsse/kerberos/kerberos.jaas
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsse/kerberos/kerberos.jaas (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsse/kerberos/kerberos.jaas 2014-07-07 08:38:55 UTC (rev 18788)
@@ -0,0 +1,8 @@
+
+alice {
+ com.sun.security.auth.module.Krb5LoginModule required refreshKrb5Config=true useKeyTab=true keyTab="/etc/alice.keytab" principal="alice";
+};
+
+bob {
+ com.sun.security.auth.module.Krb5LoginModule required refreshKrb5Config=true useKeyTab=true storeKey=true keyTab="/etc/bob.keytab" principal="bob/service.ws.apache.org";
+};
[View Less]
10 years, 8 months
JBossWS SVN: r18787 - in stack/cxf/branches/metrics: modules/client/src/main/java/org/jboss/wsf/stack/cxf/client and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2014-07-07 04:26:10 -0400 (Mon, 07 Jul 2014)
New Revision: 18787
Added:
stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/EndpointMetricsCXFAdapterImpl.java
stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/EndpointMetricsFactoryImpl.java
stack/cxf/branches/metrics/modules/server/src/main/resources/jbossws-cxf-server.jar/META-INF/services/org.jboss.wsf.spi.management.EndpointMetricsFactory
Modified:
…
[View More]stack/cxf/branches/metrics/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/Constants.java
stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/RequestHandlerImpl.java
stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EnableDecoupledFaultInterceptor.java
stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointAssociationInterceptor.java
stack/cxf/branches/metrics/pom.xml
Log:
[JBWS-3808]:Add new EndpintMetricsImpl and enable the ResponseTimeCounter in cxf to log message processing time
Modified: stack/cxf/branches/metrics/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/Constants.java
===================================================================
--- stack/cxf/branches/metrics/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/Constants.java 2014-07-07 07:39:49 UTC (rev 18786)
+++ stack/cxf/branches/metrics/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/Constants.java 2014-07-07 08:26:10 UTC (rev 18787)
@@ -41,7 +41,6 @@
public static final String CXF_QUEUE_DEQUEUE_TIMEOUT_PROP = "dequeueTimeout";
public static final String CXF_POLICY_ALTERNATIVE_SELECTOR_PROP = "cxf.policy.alternativeSelector";
public static final String CXF_MANAGEMENT_ENABLED = "cxf.management.enabled";
- public static final String CXF_MANAGEMENT_INSTALL_RESPONSE_TIME_INTERCEPTORS = "cxf.management.installResponseTimeInterceptors";
public static final String CXF_WS_DISCOVERY_ENABLED = "cxf.ws-discovery.enabled";
public static final String JBWS_CXF_DISABLE_HANDLER_AUTH_CHECKS = "org.jboss.ws.cxf.disableHandlerAuthChecks";
Added: stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/EndpointMetricsCXFAdapterImpl.java
===================================================================
--- stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/EndpointMetricsCXFAdapterImpl.java (rev 0)
+++ stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/EndpointMetricsCXFAdapterImpl.java 2014-07-07 08:26:10 UTC (rev 18787)
@@ -0,0 +1,71 @@
+package org.jboss.wsf.stack.cxf;
+
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+
+import org.apache.cxf.management.counters.CounterRepository;
+import org.apache.cxf.management.counters.ResponseTimeCounter;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.management.EndpointMetrics;
+import org.jboss.wsf.stack.cxf.configuration.BusHolder;
+
+public class EndpointMetricsCXFAdapterImpl implements EndpointMetrics {
+ private CounterRepository counterRepo;
+ private ResponseTimeCounter counter = null;
+ private ObjectName objectName = null;
+
+ public EndpointMetricsCXFAdapterImpl(Endpoint endpoint) {
+ BusHolder busHolder = endpoint.getService().getDeployment()
+ .getAttachment(BusHolder.class);
+ counterRepo = busHolder.getBus().getExtension(CounterRepository.class);
+ try {
+ objectName = new ObjectName(endpoint.getName().toString()
+ + ",metrics=EndpointMetrics");
+ } catch (MalformedObjectNameException e) {
+ // ignore
+ }
+ counter = (ResponseTimeCounter)counterRepo.createCounter(objectName);
+ counter.reset();
+ counterRepo.getCounters().put(objectName, counter);
+ }
+
+ @Override
+ public long getMinProcessingTime() {
+ return counter.getMinResponseTime().longValue();
+ }
+
+ @Override
+ public long getMaxProcessingTime() {
+ return counter.getMaxResponseTime().longValue();
+ }
+
+ @Override
+ public long getAverageProcessingTime() {
+ return counter.getAvgResponseTime().longValue();
+ }
+
+ @Override
+ public long getTotalProcessingTime() {
+ return counter.getTotalHandlingTime().longValue();
+ }
+
+ @Override
+ public long getRequestCount() {
+ return counter.getNumInvocations().longValue();
+ }
+
+ @Override
+ public long getFaultCount() {
+ long totalFault = counter.getNumCheckedApplicationFaults().longValue()
+ + counter.getNumLogicalRuntimeFaults().longValue()
+ + counter.getNumRuntimeFaults().longValue()
+ + counter.getNumUnCheckedApplicationFaults().longValue();
+ return totalFault;
+ }
+
+ @Override
+ public long getResponseCount() {
+ return counter.getNumInvocations().longValue();
+ }
+
+}
Property changes on: stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/EndpointMetricsCXFAdapterImpl.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/EndpointMetricsFactoryImpl.java
===================================================================
--- stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/EndpointMetricsFactoryImpl.java (rev 0)
+++ stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/EndpointMetricsFactoryImpl.java 2014-07-07 08:26:10 UTC (rev 18787)
@@ -0,0 +1,11 @@
+package org.jboss.wsf.stack.cxf;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.management.EndpointMetrics;
+import org.jboss.wsf.spi.management.EndpointMetricsFactory;
+public class EndpointMetricsFactoryImpl extends EndpointMetricsFactory {
+
+ @Override
+ public EndpointMetrics newEndpointMetrics(Endpoint endpoint) {
+ return new EndpointMetricsCXFAdapterImpl(endpoint);
+ }
+}
Property changes on: stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/EndpointMetricsFactoryImpl.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified: stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/RequestHandlerImpl.java
===================================================================
--- stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/RequestHandlerImpl.java 2014-07-07 07:39:49 UTC (rev 18786)
+++ stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/RequestHandlerImpl.java 2014-07-07 08:26:10 UTC (rev 18787)
@@ -52,7 +52,6 @@
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.invocation.InvocationContext;
import org.jboss.wsf.spi.invocation.RequestHandler;
-import org.jboss.wsf.spi.management.EndpointMetrics;
import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.stack.cxf.addressRewrite.SoapAddressRewriteHelper;
import org.jboss.wsf.stack.cxf.configuration.BusHolder;
@@ -93,8 +92,6 @@
out.close();
return;
}
- final boolean statisticsEnabled = getServerConfig().isStatisticsEnabled();
- Long beginTime = statisticsEnabled == true ? initRequestMetrics(ep) : 0;
Bus bus = ep.getService().getDeployment().getAttachment(BusHolder.class).getBus();
AbstractHTTPDestination dest = findDestination(req, bus);
HttpServletResponseWrapper response = new HttpServletResponseWrapper(res);
@@ -113,14 +110,6 @@
{
throw new ServletException(e);
}
- if (response.getStatus() < 500 && statisticsEnabled)
- {
- processResponseMetrics(ep, beginTime);
- }
- if (response.getStatus() >= 500 && statisticsEnabled)
- {
- processFaultMetrics(ep, beginTime);
- }
}
private boolean hasQueryString(HttpServletRequest req)
@@ -210,29 +199,4 @@
}
return AccessController.doPrivileged(AbstractServerConfig.GET_SERVER_INTEGRATION_SERVER_CONFIG);
}
-
- private long initRequestMetrics(Endpoint endpoint)
- {
- long beginTime = 0;
-
- EndpointMetrics metrics = endpoint.getEndpointMetrics();
- if (metrics != null)
- beginTime = metrics.processRequestMessage();
-
- return beginTime;
- }
-
- private void processResponseMetrics(Endpoint endpoint, long beginTime)
- {
- EndpointMetrics metrics = endpoint.getEndpointMetrics();
- if (metrics != null)
- metrics.processResponseMessage(beginTime);
- }
-
- private void processFaultMetrics(Endpoint endpoint, long beginTime)
- {
- EndpointMetrics metrics = endpoint.getEndpointMetrics();
- if (metrics != null)
- metrics.processFaultMessage(beginTime);
- }
}
Modified: stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
===================================================================
--- stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2014-07-07 07:39:49 UTC (rev 18786)
+++ stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2014-07-07 08:26:10 UTC (rev 18787)
@@ -21,11 +21,14 @@
*/
package org.jboss.wsf.stack.cxf.configuration;
+import java.security.AccessController;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
+import javax.management.MBeanServer;
+
import org.apache.cxf.Bus;
import org.apache.cxf.buslifecycle.BusLifeCycleListener;
import org.apache.cxf.buslifecycle.BusLifeCycleManager;
@@ -33,9 +36,7 @@
import org.apache.cxf.endpoint.ServerLifeCycleManager;
import org.apache.cxf.management.InstrumentationManager;
import org.apache.cxf.management.counters.CounterRepository;
-import org.apache.cxf.management.interceptor.ResponseTimeMessageInInterceptor;
-import org.apache.cxf.management.interceptor.ResponseTimeMessageInvokerInterceptor;
-import org.apache.cxf.management.interceptor.ResponseTimeMessageOutInterceptor;
+import org.apache.cxf.management.jmx.InstrumentationManagerImpl;
import org.apache.cxf.resource.ResourceManager;
import org.apache.cxf.resource.ResourceResolver;
import org.apache.cxf.service.factory.FactoryBeanListener;
@@ -49,6 +50,7 @@
import org.apache.cxf.ws.policy.selector.MaximalAlternativeSelector;
import org.jboss.ws.api.annotation.PolicySets;
import org.jboss.ws.api.binding.BindingCustomization;
+import org.jboss.ws.common.management.AbstractServerConfig;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.WSFException;
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
@@ -56,6 +58,7 @@
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
+import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
import org.jboss.wsf.spi.security.JASPIAuthenticationProvider;
import org.jboss.wsf.stack.cxf.Loggers;
@@ -66,7 +69,6 @@
import org.jboss.wsf.stack.cxf.interceptor.EndpointAssociationInterceptor;
import org.jboss.wsf.stack.cxf.interceptor.HandlerAuthInterceptor;
import org.jboss.wsf.stack.cxf.interceptor.NsCtxSelectorStoreInterceptor;
-import org.jboss.wsf.stack.cxf.management.InstrumentationManagerExtImpl;
import org.jboss.wsf.stack.cxf.security.authentication.AuthenticationMgrSubjectCreatingInterceptor;
/**
@@ -246,31 +248,17 @@
}
protected static void setCXFManagement(Bus bus, Map<String, String> props) {
- if (props != null && !props.isEmpty()) {
- final String p = props.get(Constants.CXF_MANAGEMENT_ENABLED);
- if ("true".equalsIgnoreCase(p) || "1".equalsIgnoreCase(p)) {
- InstrumentationManagerExtImpl instrumentationManagerImpl = new InstrumentationManagerExtImpl();
- instrumentationManagerImpl.setBus(bus);
- instrumentationManagerImpl.setEnabled(true);
- instrumentationManagerImpl.initMBeanServer();
- instrumentationManagerImpl.register();
- bus.setExtension(instrumentationManagerImpl, InstrumentationManager.class);
- CounterRepository couterRepository = new CounterRepository();
- couterRepository.setBus(bus);
- final String installRespTimeInterceptors = props.get(Constants.CXF_MANAGEMENT_INSTALL_RESPONSE_TIME_INTERCEPTORS);
- if (installRespTimeInterceptors == null ||
- "true".equalsIgnoreCase(installRespTimeInterceptors) ||
- "1".equalsIgnoreCase(installRespTimeInterceptors)) {
- ResponseTimeMessageInInterceptor in = new ResponseTimeMessageInInterceptor();
- ResponseTimeMessageInvokerInterceptor invoker = new ResponseTimeMessageInvokerInterceptor();
- ResponseTimeMessageOutInterceptor out = new ResponseTimeMessageOutInterceptor();
- bus.getInInterceptors().add(in);
- bus.getInInterceptors().add(invoker);
- bus.getOutInterceptors().add(out);
- }
- bus.setExtension(couterRepository, CounterRepository.class);
- }
- }
+ CounterRepository couterRepository = new CounterRepository();
+ couterRepository.setBus(bus);
+ bus.setExtension(couterRepository, CounterRepository.class);
+
+ AbstractServerConfig serverConfig = (AbstractServerConfig)getServerConfig();
+ if (serverConfig != null && serverConfig.getMbeanServer() != null) {
+ bus.setExtension(serverConfig.getMbeanServer(), MBeanServer.class);
+ InstrumentationManagerImpl instrumentationImpl = (InstrumentationManagerImpl) bus
+ .getExtension(InstrumentationManager.class);
+ instrumentationImpl.init();
+ }
}
protected static void setWSDiscovery(Bus bus, Map<String, String> props) {
@@ -278,10 +266,19 @@
final String p = props.get(Constants.CXF_WS_DISCOVERY_ENABLED);
if ("true".equalsIgnoreCase(p) || "1".equalsIgnoreCase(p)) {
bus.getExtension(ServerLifeCycleManager.class).registerListener(new WSDiscoveryServerListener(bus));
+
}
}
}
+ private static ServerConfig getServerConfig() {
+ if (System.getSecurityManager() == null) {
+ return AbstractServerConfig.getServerIntegrationServerConfig();
+ }
+ return AccessController
+ .doPrivileged(AbstractServerConfig.GET_SERVER_INTEGRATION_SERVER_CONFIG);
+ }
+
private static AlternativeSelector getAlternativeSelector(Map<String, String> props) {
//default to MaximalAlternativeSelector on server side [JBWS-3149]
AlternativeSelector selector = new MaximalAlternativeSelector();
Modified: stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EnableDecoupledFaultInterceptor.java
===================================================================
--- stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EnableDecoupledFaultInterceptor.java 2014-07-07 07:39:49 UTC (rev 18786)
+++ stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EnableDecoupledFaultInterceptor.java 2014-07-07 08:26:10 UTC (rev 18787)
@@ -30,7 +30,7 @@
* This interceptor adds the context property decoupled_fault_support
* to enable decoupled faultTo. This is an optional feature in cxf and we
* need this to be default to make it same behavior with native stack.
- * @author <a href="mailto:ema@redhat.com>Jim Ma</a>
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
*/
public class EnableDecoupledFaultInterceptor extends AbstractPhaseInterceptor<Message>
{
Modified: stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointAssociationInterceptor.java
===================================================================
--- stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointAssociationInterceptor.java 2014-07-07 07:39:49 UTC (rev 18786)
+++ stack/cxf/branches/metrics/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointAssociationInterceptor.java 2014-07-07 08:26:10 UTC (rev 18787)
@@ -21,13 +21,19 @@
*/
package org.jboss.wsf.stack.cxf.interceptor;
+import java.security.AccessController;
+
import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.management.interceptor.ResponseTimeMessageInInterceptor;
import org.apache.cxf.message.Exchange;
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;
+import org.apache.cxf.ws.policy.PolicyInInterceptor;
+import org.jboss.ws.common.management.AbstractServerConfig;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.invocation.EndpointAssociation;
+import org.jboss.wsf.spi.management.ServerConfig;
/**
* A RECEIVE phase interceptor that sets the @see{org.jboss.wsf.spi.deployment.Endpoint}
@@ -41,10 +47,11 @@
*/
public class EndpointAssociationInterceptor extends AbstractPhaseInterceptor<Message>
{
-
public EndpointAssociationInterceptor()
{
super(Phase.RECEIVE);
+ addBefore(ResponseTimeMessageInInterceptor.class.getName());
+ addBefore(PolicyInInterceptor.class.getName());
}
@Override
@@ -53,6 +60,22 @@
Endpoint endpoint = EndpointAssociation.getEndpoint();
Exchange exchange = message.getExchange();
exchange.put(Endpoint.class, endpoint);
+ String serviceCounterName = endpoint.getName().toString();
+ exchange.put("org.apache.cxf.management.service.counter.name", serviceCounterName + ",metrics=EndpointMetrics");
+ if (!getServerConfig().isStatisticsEnabled())
+ {
+ exchange.put("org.apache.cxf.management.counter.enabled", false);
+ }
}
+
+
+ private static ServerConfig getServerConfig() {
+ if (System.getSecurityManager() == null) {
+ return AbstractServerConfig.getServerIntegrationServerConfig();
+ }
+ return AccessController
+ .doPrivileged(AbstractServerConfig.GET_SERVER_INTEGRATION_SERVER_CONFIG);
+ }
+
}
Added: stack/cxf/branches/metrics/modules/server/src/main/resources/jbossws-cxf-server.jar/META-INF/services/org.jboss.wsf.spi.management.EndpointMetricsFactory
===================================================================
--- stack/cxf/branches/metrics/modules/server/src/main/resources/jbossws-cxf-server.jar/META-INF/services/org.jboss.wsf.spi.management.EndpointMetricsFactory (rev 0)
+++ stack/cxf/branches/metrics/modules/server/src/main/resources/jbossws-cxf-server.jar/META-INF/services/org.jboss.wsf.spi.management.EndpointMetricsFactory 2014-07-07 08:26:10 UTC (rev 18787)
@@ -0,0 +1 @@
+org.jboss.wsf.stack.cxf.EndpointMetricsFactoryImpl
\ No newline at end of file
Modified: stack/cxf/branches/metrics/pom.xml
===================================================================
--- stack/cxf/branches/metrics/pom.xml 2014-07-07 07:39:49 UTC (rev 18786)
+++ stack/cxf/branches/metrics/pom.xml 2014-07-07 08:26:10 UTC (rev 18787)
@@ -71,7 +71,7 @@
<wildfly810.version>8.1.0.Final</wildfly810.version>
<wildfly900.version>9.0.0.Alpha1-SNAPSHOT</wildfly900.version>
<ejb.api.version>1.0.2.Final</ejb.api.version>
- <cxf.version>3.0.0</cxf.version>
+ <cxf.version>3.0.1-SNAPSHOT</cxf.version>
<cxf.asm.version>3.3.1</cxf.asm.version>
<cxf.xjcplugins.version>2.7.0</cxf.xjcplugins.version>
<jboss.common.core.version>2.2.17.GA</jboss.common.core.version>
[View Less]
10 years, 8 months
JBossWS SVN: r18786 - stack/cxf/branches.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2014-07-07 03:39:49 -0400 (Mon, 07 Jul 2014)
New Revision: 18786
Added:
stack/cxf/branches/metrics/
Log:
Create workspace for endpoint metrics refactor
10 years, 8 months
JBossWS SVN: r18785 - spi/branches/metrics/src/main/java/org/jboss/wsf/spi/management.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2014-07-07 03:33:29 -0400 (Mon, 07 Jul 2014)
New Revision: 18785
Modified:
spi/branches/metrics/src/main/java/org/jboss/wsf/spi/management/EndpointMetrics.java
spi/branches/metrics/src/main/java/org/jboss/wsf/spi/management/EndpointMetricsFactory.java
Log:
[JBWS-3808]:Refactor endpint metrics api
Modified: spi/branches/metrics/src/main/java/org/jboss/wsf/spi/management/EndpointMetrics.java
===================================================================
--- spi/…
[View More]branches/metrics/src/main/java/org/jboss/wsf/spi/management/EndpointMetrics.java 2014-07-07 07:28:11 UTC (rev 18784)
+++ spi/branches/metrics/src/main/java/org/jboss/wsf/spi/management/EndpointMetrics.java 2014-07-07 07:33:29 UTC (rev 18785)
@@ -24,16 +24,6 @@
public interface EndpointMetrics
{
- void start();
-
- void stop();
-
- long processRequestMessage();
-
- void processResponseMessage(long beginTime);
-
- void processFaultMessage(long beginTime);
-
long getMinProcessingTime();
long getMaxProcessingTime();
Modified: spi/branches/metrics/src/main/java/org/jboss/wsf/spi/management/EndpointMetricsFactory.java
===================================================================
--- spi/branches/metrics/src/main/java/org/jboss/wsf/spi/management/EndpointMetricsFactory.java 2014-07-07 07:28:11 UTC (rev 18784)
+++ spi/branches/metrics/src/main/java/org/jboss/wsf/spi/management/EndpointMetricsFactory.java 2014-07-07 07:33:29 UTC (rev 18785)
@@ -21,7 +21,9 @@
*/
package org.jboss.wsf.spi.management;
+import org.jboss.wsf.spi.deployment.Endpoint;
+
public abstract class EndpointMetricsFactory
{
- public abstract EndpointMetrics newEndpointMetrics();
+ public abstract EndpointMetrics newEndpointMetrics(Endpoint endpoint);
}
[View Less]
10 years, 8 months