JBossWS SVN: r19529 - in stack/cxf/trunk/modules/testsuite/cxf-tests: src/test/etc and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-03-05 10:17:02 -0500 (Thu, 05 Mar 2015)
New Revision: 19529
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/jbws-application-roles.properties
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/jbws-application-users.properties
Removed:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/application-roles.properties
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/application-users.properties
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/scripts/jbws-testsuite-jms.groovy
Log:
[JBWS-3874] Do not overwrite application-*.properties
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml 2015-03-05 13:32:26 UTC (rev 19528)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml 2015-03-05 15:17:02 UTC (rev 19529)
@@ -140,10 +140,10 @@
<inputFile>${jboss.home}/standalone/configuration/standalone-full.xml</inputFile>
<outputFile>${jboss.home}/standalone/configuration/jbws-testsuite-jms.xml</outputFile>
<serverLog>jbws-testsuite-jms.log</serverLog>
- <srcUsersProperties>${project.build.directory}/test-classes/application-users.properties</srcUsersProperties>
- <destUsersProperties>${jboss.home}/standalone/configuration/application-users.properties</destUsersProperties>
- <srcRolesProperties>${project.build.directory}/test-classes/application-roles.properties</srcRolesProperties>
- <destRolesProperties>${jboss.home}/standalone/configuration/application-roles.properties</destRolesProperties>
+ <srcUsersProperties>${project.build.directory}/test-classes/jbws-application-users.properties</srcUsersProperties>
+ <destUsersProperties>${jboss.home}/standalone/configuration/jbws-application-users.properties</destUsersProperties>
+ <srcRolesProperties>${project.build.directory}/test-classes/jbws-application-roles.properties</srcRolesProperties>
+ <destRolesProperties>${jboss.home}/standalone/configuration/jbws-application-roles.properties</destRolesProperties>
</properties>
</configuration>
</execution>
Deleted: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/application-roles.properties
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/application-roles.properties 2015-03-05 13:32:26 UTC (rev 19528)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/application-roles.properties 2015-03-05 15:17:02 UTC (rev 19529)
@@ -1 +0,0 @@
-kermit=guest
Deleted: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/application-users.properties
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/application-users.properties 2015-03-05 13:32:26 UTC (rev 19528)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/application-users.properties 2015-03-05 15:17:02 UTC (rev 19529)
@@ -1 +0,0 @@
-kermit=0491092837b7e5aef6f270a3b85f8336
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/jbws-application-roles.properties
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/jbws-application-roles.properties (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/jbws-application-roles.properties 2015-03-05 15:17:02 UTC (rev 19529)
@@ -0,0 +1 @@
+kermit=guest
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/jbws-application-roles.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/jbws-application-users.properties
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/jbws-application-users.properties (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/jbws-application-users.properties 2015-03-05 15:17:02 UTC (rev 19529)
@@ -0,0 +1 @@
+kermit=0491092837b7e5aef6f270a3b85f8336
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/jbws-application-users.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/scripts/jbws-testsuite-jms.groovy
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/scripts/jbws-testsuite-jms.groovy 2015-03-05 13:32:26 UTC (rev 19528)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/scripts/jbws-testsuite-jms.groovy 2015-03-05 15:17:02 UTC (rev 19529)
@@ -11,6 +11,28 @@
file.attributes()['path'] = project.properties['serverLog']
/**
+ * Modify ApplicationRealm security-realm to use custom properties files
+ *
+ * <security-realm name="ApplicationRealm">
+ * <authentication>
+ * <local default-user="$local" allowed-users="*" skip-group-loading="true"/>
+ * <properties path="jbws-application-users.properties" relative-to="jboss.server.config.dir"/>
+ * </authentication>
+ * <authorization>
+ * <properties path="jbws-application-roles.properties" relative-to="jboss.server.config.dir"/>
+ * </authorization>
+ * </security-realm>
+ **/
+def securityRealms = root.management.'security-realms'[0]
+def appRealm = securityRealms.find{it.@name == 'ApplicationRealm'}
+def realmAuthentication = appRealm.'authentication'[0];
+def authenticationProps = realmAuthentication.'properties'
+authenticationProps.@path = 'jbws-application-users.properties'
+def realmAuthorization = appRealm.'authorization'[0];
+def authorizationProps = realmAuthorization.'properties'
+authorizationProps.@path = 'jbws-application-roles.properties'
+
+/**
* Add a JMS queue like this
*
* <subsystem xmlns="urn:jboss:domain:messaging:2.0">
@@ -43,7 +65,7 @@
f.write(writer.toString())
/*
- * copy the preconfigured application-roles.properties and application-users.properties
+ * copy the preconfigured jbws-application-roles.properties and jbws-application-users.properties
* files into the standalone/configure directory
*/
def srcUsersProperties = project.properties['srcUsersProperties']
9 years, 10 months
JBossWS SVN: r19528 - in stack/cxf/trunk/modules/testsuite/cxf-spring-tests: src/test/etc and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-03-05 08:32:26 -0500 (Thu, 05 Mar 2015)
New Revision: 19528
Removed:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/application-roles.properties
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/application-users.properties
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms/
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/pom.xml
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/scripts/jbws_testsuite_spring_default.groovy
Log:
[JBWS-3874] Removing tests from cxf-spring-tests module
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/pom.xml 2015-03-05 13:31:10 UTC (rev 19527)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/pom.xml 2015-03-05 13:32:26 UTC (rev 19528)
@@ -93,11 +93,6 @@
<rolesPropFile>${project.build.directory}/test-classes/jbossws-roles.properties</rolesPropFile>
<keystorePath>${project.build.directory}/test-classes/test.keystore</keystorePath>
<testResourcesDir>${project.build.directory}/test-resources</testResourcesDir>
-
- <srcUsersProperties>${project.build.directory}/test-classes/application-users.properties</srcUsersProperties>
- <destUsersProperties>${jboss.home}/standalone/configuration/application-users.properties</destUsersProperties>
- <srcRolesProperties>${project.build.directory}/test-classes/application-roles.properties</srcRolesProperties>
- <destRolesProperties>${jboss.home}/standalone/configuration/application-roles.properties</destRolesProperties>
</properties>
</configuration>
</execution>
Deleted: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/application-roles.properties
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/application-roles.properties 2015-03-05 13:31:10 UTC (rev 19527)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/application-roles.properties 2015-03-05 13:32:26 UTC (rev 19528)
@@ -1 +0,0 @@
-kermit=guest
Deleted: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/application-users.properties
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/application-users.properties 2015-03-05 13:31:10 UTC (rev 19527)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/application-users.properties 2015-03-05 13:32:26 UTC (rev 19528)
@@ -1 +0,0 @@
-kermit=0491092837b7e5aef6f270a3b85f8336
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/scripts/jbws_testsuite_spring_default.groovy
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/scripts/jbws_testsuite_spring_default.groovy 2015-03-05 13:31:10 UTC (rev 19527)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/scripts/jbws_testsuite_spring_default.groovy 2015-03-05 13:32:26 UTC (rev 19528)
@@ -94,29 +94,6 @@
loginModuleDigest.appendNode('module-option', ['name':'rolesProperties','value':project.properties['testResourcesDir'] + '/jaxws/samples/wsse/username-digest/WEB-INF/jbossws-roles.properties'])
/**
- * Add a JMS queue like this
- *
- * <subsystem xmlns="urn:jboss:domain:messaging:2.0">
- * <hornetq-server>
- * <jms-destinations>
- * <jms-queue name="testQueue">
- * <entry name="queue/test"/>
- * <entry name="java:jboss/exported/jms/queue/test"/>
- * </jms-queue>
- * </jms-destinations>
- * </hornetq-server>
- * </subsystem>
- **/
-def hornetqServer = root.profile.subsystem.'hornetq-server'[0]
-def jmsDestinations = hornetqServer.'jms-destinations'[0]
-if (jmsDestinations == null) {
- jmsDestinations = hornetqServer.appendNode('jms-destinations');
-}
-def jmsQueue = jmsDestinations.appendNode('jms-queue', ['name':'testQueue'])
-jmsQueue.appendNode('entry', ['name':'queue/test'])
-jmsQueue.appendNode('entry', ['name':'java:jboss/exported/jms/queue/test'])
-
-/**
* Save the configuration to a new file
*/
def writer = new StringWriter()
@@ -125,16 +102,3 @@
def f = new File(project.properties['outputFile'])
f.write(writer.toString())
-/*
- * copy the preconfigured application-roles.properties and application-users.properties
- * files into the standalone/configure directory
- */
-def srcUsersProperties = project.properties['srcUsersProperties']
-def destUsersProperties = project.properties['destUsersProperties']
-new AntBuilder().copy( file:srcUsersProperties,
- tofile:destUsersProperties)
-
-def srcRolesProperties = project.properties['srcRolesProperties']
-def destRolesProperties = project.properties['destRolesProperties']
-new AntBuilder().copy( file:srcRolesProperties,
- tofile:destRolesProperties)
9 years, 10 months
JBossWS SVN: r19527 - in stack/cxf/trunk/modules/testsuite/cxf-tests/src/test: java/org/jboss/test/ws/jaxws/cxf/jms_http and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-03-05 08:31:10 -0500 (Thu, 05 Mar 2015)
New Revision: 19527
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/DeploymentTestServlet.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorld.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorldImpl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HttpHelloWorldImpl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jms_http/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/web.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/wsdl/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl
Log:
[JBWS-3874] Moving jms_http tests too
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/DeploymentTestServlet.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/DeploymentTestServlet.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/DeploymentTestServlet.java 2015-03-05 13:31:10 UTC (rev 19527)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.jms_http;
+
+import java.io.IOException;
+import java.net.URL;
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+
+@WebServlet(name = "TestServlet", urlPatterns = "/*")
+public class DeploymentTestServlet extends HttpServlet
+{
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ try
+ {
+ boolean result;
+ URL wsdlUrl = Thread.currentThread().getContextClassLoader().getResource("META-INF/wsdl/HelloWorldService.wsdl");
+ //start a new bus to avoid affecting the one that could already be assigned to this thread
+ Bus bus = BusFactory.newInstance().createBus();
+ BusFactory.setThreadDefaultBus(bus);
+ try
+ {
+ Service service = Service.create(wsdlUrl, new QName("http://org.jboss.ws/jaxws/cxf/jms", "HelloWorldService"));
+ //HelloWorldServiceLocal service references local connection factory (for in-VM use)
+ Service serviceLocal = Service.create(wsdlUrl, new QName("http://org.jboss.ws/jaxws/cxf/jms", "HelloWorldServiceLocal"));
+
+ //JMS test
+ HelloWorld proxy = (HelloWorld) serviceLocal.getPort(new QName("http://org.jboss.ws/jaxws/cxf/jms", "HelloWorldImplPort"), HelloWorld.class);
+ result = "Hi".equals(proxy.echo("Hi"));
+ //HTTP test
+ HelloWorld httpProxy = (HelloWorld) service.getPort(new QName("http://org.jboss.ws/jaxws/cxf/jms", "HttpHelloWorldImplPort"), HelloWorld.class);
+ result = result && "(http) Hi".equals(httpProxy.echo("Hi"));
+ }
+ finally
+ {
+ bus.shutdown(true);
+ }
+ res.getWriter().print(result);
+ }
+ catch (Throwable t)
+ {
+ t.printStackTrace();
+ throw new ServletException(t);
+ }
+ }
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/DeploymentTestServlet.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorld.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorld.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorld.java 2015-03-05 13:31:10 UTC (rev 19527)
@@ -0,0 +1,30 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.jms_http;
+
+import javax.jws.WebService;
+
+@WebService(targetNamespace = "http://org.jboss.ws/jaxws/cxf/jms")
+public interface HelloWorld
+{
+ String echo(String input);
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorld.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorldImpl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorldImpl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorldImpl.java 2015-03-05 13:31:10 UTC (rev 19527)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.jms_http;
+
+import javax.jws.WebService;
+
+@WebService
+(
+ portName = "HelloWorldImplPort",
+ serviceName = "HelloWorldServiceLocal",
+ wsdlLocation = "WEB-INF/wsdl/HelloWorldService.wsdl",
+ endpointInterface = "org.jboss.test.ws.jaxws.cxf.jms_http.HelloWorld",
+ targetNamespace = "http://org.jboss.ws/jaxws/cxf/jms"
+)
+public class HelloWorldImpl implements HelloWorld
+{
+ public String echo(String input)
+ {
+ System.out.println("input: " + input);
+ return input;
+ }
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorldImpl.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HttpHelloWorldImpl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HttpHelloWorldImpl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HttpHelloWorldImpl.java 2015-03-05 13:31:10 UTC (rev 19527)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.jms_http;
+
+import javax.jws.WebService;
+
+@WebService
+(
+ portName = "HttpHelloWorldImplPort",
+ serviceName = "HelloWorldService",
+ wsdlLocation = "WEB-INF/wsdl/HelloWorldService.wsdl",
+ endpointInterface = "org.jboss.test.ws.jaxws.cxf.jms_http.HelloWorld",
+ targetNamespace = "http://org.jboss.ws/jaxws/cxf/jms"
+)
+public class HttpHelloWorldImpl implements HelloWorld
+{
+ public String echo(String input)
+ {
+ System.out.println("input (http): " + input);
+ return "(http) " + input;
+ }
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HttpHelloWorldImpl.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCase.java 2015-03-05 13:31:10 UTC (rev 19527)
@@ -0,0 +1,142 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.jms_http;
+
+import java.io.File;
+import java.net.URL;
+import java.util.Properties;
+
+import javax.naming.Context;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.transport.jms.JMSConduit;
+import org.apache.cxf.transport.jms.JMSConfiguration;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.container.test.api.TargetsContainer;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.test.ws.jaxws.cxf.jms.HelloWorld;
+import org.jboss.ws.common.IOUtils;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Test case for deploying an archive with a JMS (SOAP-over-JMS 1.0) and a HTTP endpoints
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 10-Jun-2011
+ */
+(a)RunWith(Arquillian.class)
+public final class JMSHTTPEndpointDeploymentTestCase extends JBossWSTest
+{
+ private static final String JMS_SERVER = "jms";
+
+ @Deployment(name = "jaxws-cxf-jms-http-deployment", order = 1, testable = false)
+ @TargetsContainer(JMS_SERVER)
+ public static WebArchive createDeployment1()
+ {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxws-cxf-jms-http-deployment.war");
+ archive
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n" + "Dependencies: org.hornetq\n"))
+ .addClass(org.jboss.test.ws.jaxws.cxf.jms_http.HelloWorld.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.jms_http.HelloWorldImpl.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.jms_http.HttpHelloWorldImpl.class)
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl"), "wsdl/HelloWorldService.wsdl")
+ .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/cxf/jms_http/WEB-INF/web.xml"));
+ return archive;
+ }
+
+ @Deployment(name = "jaxws-cxf-jms-http-deployment-test-servlet", order = 2, testable = false)
+ @TargetsContainer(JMS_SERVER)
+ public static WebArchive createDeployment2()
+ {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxws-cxf-jms-http-deployment-test-servlet.war");
+ archive
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client services,org.hornetq\n"))
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl"), "classes/META-INF/wsdl/HelloWorldService.wsdl")
+ .addClass(org.jboss.test.ws.jaxws.cxf.jms_http.DeploymentTestServlet.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.jms_http.HelloWorld.class);
+ return archive;
+ }
+
+ @Test
+ @RunAsClient
+ public void testJMSEndpointServerSide() throws Exception
+ {
+ URL url = new URL("http://" + getServerHost() + ":" + getServerPort(CXF_TESTS_GROUP_QUALIFIER, JMS_SERVER) + "/jaxws-cxf-jms-http-deployment-test-servlet");
+ assertEquals("true", IOUtils.readAndCloseStream(url.openStream()));
+ }
+
+ @Test
+ @RunAsClient
+ public void testJMSEndpointClientSide() throws Exception
+ {
+ URL wsdlUrl = getResourceURL("jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/jms", "HelloWorldService");
+
+ Service service = Service.create(wsdlUrl, serviceName);
+ HelloWorld proxy = (HelloWorld) service.getPort(new QName("http://org.jboss.ws/jaxws/cxf/jms", "HelloWorldImplPort"), HelloWorld.class);
+ setupProxy(proxy);
+ try
+ {
+ assertEquals("Hi", proxy.echo("Hi"));
+ }
+ catch (Exception e)
+ {
+ System.out.println("This test requires a testQueue JMS queue and a user with 'guest' role to be available on the application server; "
+ + "queue are easily added using jboss-cli.sh/bat, while users are added using add-user.sh/bat. When running test please specify user "
+ + "and password using -Dtest.username=\"foo\" -Dtest.password=\"bar\".");
+ throw e;
+ }
+ }
+
+ @Test
+ @RunAsClient
+ public void testHTTPEndpointClientSide() throws Exception
+ {
+ URL wsdlUrl = new URL("http://" + getServerHost() + ":" + getServerPort(CXF_TESTS_GROUP_QUALIFIER, JMS_SERVER) + "/jaxws-cxf-jms-http-deployment?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/jms", "HelloWorldService");
+
+ Service service = Service.create(wsdlUrl, serviceName);
+ HelloWorld proxy = (HelloWorld) service.getPort(new QName("http://org.jboss.ws/jaxws/cxf/jms", "HttpHelloWorldImplPort"), HelloWorld.class);
+ assertEquals("(http) Hi", proxy.echo("Hi"));
+ }
+
+ private void setupProxy(HelloWorld proxy)
+ {
+ JMSConduit conduit = (JMSConduit) ClientProxy.getClient(proxy).getConduit();
+ JMSConfiguration config = conduit.getJmsConfig();
+ config.setUserName(JBossWSTestHelper.getTestUsername());
+ config.setPassword(JBossWSTestHelper.getTestPassword());
+ Properties props = conduit.getJmsConfig().getJndiEnvironment();
+ props.put(Context.SECURITY_PRINCIPAL, JBossWSTestHelper.getTestUsername());
+ props.put(Context.SECURITY_CREDENTIALS, JBossWSTestHelper.getTestPassword());
+ }
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCase.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/web.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/web.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/web.xml 2015-03-05 13:31:10 UTC (rev 19527)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>EndpointServlet</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.cxf.jms_http.HttpHelloWorldImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>EndpointServlet</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/web.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl 2015-03-05 13:31:10 UTC (rev 19527)
@@ -0,0 +1,83 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<wsdl:definitions name="HelloWorldService" targetNamespace="http://org.jboss.ws/jaxws/cxf/jms"
+ xmlns:ns1="http://schemas.xmlsoap.org/soap/http"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://org.jboss.ws/jaxws/cxf/jms"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soapjms="http://www.w3.org/2010/soapjms/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <wsdl:types>
+<xs:schema elementFormDefault="unqualified" targetNamespace="http://org.jboss.ws/jaxws/cxf/jms" version="1.0" xmlns:tns="http://org.jboss.ws/jaxws/cxf/jms" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+<xs:element name="echo" type="tns:echo"/>
+<xs:element name="echoResponse" type="tns:echoResponse"/>
+<xs:complexType name="echo">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+<xs:complexType name="echoResponse">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+ </wsdl:types>
+ <wsdl:message name="echoResponse">
+ <wsdl:part element="tns:echoResponse" name="parameters">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="echo">
+ <wsdl:part element="tns:echo" name="parameters">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="echo">
+ <wsdl:input message="tns:echo" name="echo">
+ </wsdl:input>
+ <wsdl:output message="tns:echoResponse" name="echoResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="HelloWorldServiceSoapBinding" type="tns:HelloWorld">
+ <soap:binding style="document" transport="http://www.w3.org/2010/soapjms/"/>
+ <wsdl:operation name="echo">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="echo">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="echoResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="HttpHelloWorldServiceSoapBinding" type="tns:HelloWorld">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="echo">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="echo">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="echoResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="HelloWorldService">
+ <soapjms:jndiConnectionFactoryName>java:jms/RemoteConnectionFactory</soapjms:jndiConnectionFactoryName>
+ <soapjms:jndiInitialContextFactory>org.jboss.naming.remote.client.InitialContextFactory</soapjms:jndiInitialContextFactory>
+ <soapjms:jndiURL>http-remoting://@jboss.bind.address@:@add_int(port-offset.cxf-tests.jms,8080)@</soapjms:jndiURL>
+ <wsdl:port binding="tns:HelloWorldServiceSoapBinding" name="HelloWorldImplPort">
+ <soap:address location="jms:queue:testQueue"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HttpHelloWorldServiceSoapBinding" name="HttpHelloWorldImplPort">
+ <soap:address location="http://@jboss.bind.address@:@add_int(port-offset.cxf-tests.jms,8080)@/jaxws-cxf-jms-http-deployment"/>
+ </wsdl:port>
+ </wsdl:service>
+ <wsdl:service name="HelloWorldServiceLocal">
+ <soapjms:jndiConnectionFactoryName>java:/ConnectionFactory</soapjms:jndiConnectionFactoryName>
+ <soapjms:jndiURL></soapjms:jndiURL>
+ <wsdl:port binding="tns:HelloWorldServiceSoapBinding" name="HelloWorldImplPort">
+ <soap:address location="jms:queue:testQueue"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
9 years, 10 months
JBossWS SVN: r19526 - in stack/cxf/trunk/modules/testsuite: cxf-tests and 8 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-03-05 06:50:15 -0500 (Thu, 05 Mar 2015)
New Revision: 19526
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/application-roles.properties
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/application-users.properties
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/DeploymentTestServlet.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/HelloWorld.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/HelloWorldImpl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointAPITestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointOnlyDeploymentTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/TestServlet.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jms/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jms/META-INF/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jms/META-INF/wsdl/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jms/META-INF/wsdl/HelloWorldService.wsdl
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/scripts/jbws-testsuite-jms.groovy
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/arquillian.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/container.properties
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3874] Adding jms tests to the cxf-tests module and creating a new server configuration for them
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml 2015-03-05 06:52:26 UTC (rev 19525)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml 2015-03-05 11:50:15 UTC (rev 19526)
@@ -128,6 +128,25 @@
</properties>
</configuration>
</execution>
+ <execution>
+ <id>testsuite-jms</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <source>${basedir}/src/test/scripts/jbws-testsuite-jms.groovy</source>
+ <properties>
+ <inputFile>${jboss.home}/standalone/configuration/standalone-full.xml</inputFile>
+ <outputFile>${jboss.home}/standalone/configuration/jbws-testsuite-jms.xml</outputFile>
+ <serverLog>jbws-testsuite-jms.log</serverLog>
+ <srcUsersProperties>${project.build.directory}/test-classes/application-users.properties</srcUsersProperties>
+ <destUsersProperties>${jboss.home}/standalone/configuration/application-users.properties</destUsersProperties>
+ <srcRolesProperties>${project.build.directory}/test-classes/application-roles.properties</srcRolesProperties>
+ <destRolesProperties>${jboss.home}/standalone/configuration/application-roles.properties</destRolesProperties>
+ </properties>
+ </configuration>
+ </execution>
</executions>
</plugin>
<plugin>
@@ -341,6 +360,31 @@
<port>19990</port> <!-- Keep in sync with the port-offset -->
</configuration>
</execution>
+ <execution>
+ <id>jms</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ <configuration>
+ <jvmArgs>-server -XX:+UseCompressedOops -Xms48m -Xmx384m -XX:MaxPermSize=192m -Djboss.socket.binding.port-offset=${port-offset.cxf-tests.jms} ${additionalJvmArgs}</jvmArgs>
+ <serverConfig>jbws-testsuite-jms.xml</serverConfig>
+ <jbossHome>${jboss.home}</jbossHome>
+ <!-- TODO: add serverArgs section to use a custom bind address (requires wildfly-maven-plugin 1.1.0 +)
+ https://github.com/wildfly/wildfly-maven-plugin/commit/160b1a29f4e26fff9f... -->
+ <port>44990</port> <!-- Keep in sync with the port-offset -->
+ </configuration>
+ </execution>
+ <execution>
+ <id>jms-shutdown</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>shutdown</goal>
+ </goals>
+ <configuration>
+ <port>44990</port> <!-- Keep in sync with the port-offset -->
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/application-roles.properties
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/application-roles.properties (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/application-roles.properties 2015-03-05 11:50:15 UTC (rev 19526)
@@ -0,0 +1 @@
+kermit=guest
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/application-roles.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/application-users.properties
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/application-users.properties (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/application-users.properties 2015-03-05 11:50:15 UTC (rev 19526)
@@ -0,0 +1 @@
+kermit=0491092837b7e5aef6f270a3b85f8336
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/application-users.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/arquillian.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/arquillian.xml 2015-03-05 06:52:26 UTC (rev 19525)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/arquillian.xml 2015-03-05 11:50:15 UTC (rev 19526)
@@ -45,5 +45,19 @@
<property name="waitForPortsTimeoutInSeconds">8</property>
</configuration>
</container>
+ <container qualifier="jms">
+ <configuration>
+ <property name="jbossHome">${jboss.home}</property>
+ <property name="javaVmArguments">-server -XX:+UseCompressedOops -Xms48m -Xmx384m -XX:MaxPermSize=192m -Djboss.socket.binding.port-offset=${port-offset.cxf-tests.jms} ${additionalJvmArgs}</property>
+ <property name="serverConfig">jbws-testsuite-jms.xml</property>
+ <property name="allowConnectingToRunningServer">true</property>
+ <property name="managementAddress">${jboss.bind.address:localhost}</property>
+ <property name="jbossArguments">${jbossArguments}</property>
+ <property name="managementPort">${add_int(port-offset.cxf-tests.jms,9990)}</property>
+ <!-- AS7-4070 -->
+ <property name="waitForPorts">${add_int(port-offset.cxf-tests.jms,8787)} ${add_int(port-offset.cxf-tests.jms,9990)}</property>
+ <property name="waitForPortsTimeoutInSeconds">8</property>
+ </configuration>
+ </container>
</group>
</arquillian>
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/container.properties
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/container.properties 2015-03-05 06:52:26 UTC (rev 19525)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/container.properties 2015-03-05 11:50:15 UTC (rev 19526)
@@ -3,6 +3,7 @@
port-offset.cxf-tests.jboss=(a)port-offset.cxf-tests.jboss@
port-offset.cxf-tests.ssl-mutual-auth=(a)port-offset.cxf-tests.ssl-mutual-auth@
port-offset.cxf-tests.default-config-tests=(a)port-offset.cxf-tests.default-config-tests@
+port-offset.cxf-tests.jms=(a)port-offset.cxf-tests.jms@
port-offset.shared-tests.jboss=(a)port-offset.shared-tests.jboss@
port-offset.shared-tests.default-config-tests=(a)port-offset.shared-tests.default-config-tests@
port-offset.cxf-spring-tests.jboss=(a)port-offset.cxf-spring-tests.jboss@
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/DeploymentTestServlet.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/DeploymentTestServlet.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/DeploymentTestServlet.java 2015-03-05 11:50:15 UTC (rev 19526)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.jms;
+
+import java.io.IOException;
+import java.net.URL;
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+
+@WebServlet(name = "TestServlet", urlPatterns = "/*")
+public class DeploymentTestServlet extends HttpServlet
+{
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ try
+ {
+ boolean result;
+ URL wsdlUrl = Thread.currentThread().getContextClassLoader().getResource("META-INF/wsdl/HelloWorldService.wsdl");
+ //start a new bus to avoid affecting the one that could already be assigned to this thread
+ Bus bus = BusFactory.newInstance().createBus();
+ BusFactory.setThreadDefaultBus(bus);
+ try
+ {
+ //HelloWorldServiceLocal service references local connection factory (for in-VM use)
+ QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/jms", "HelloWorldServiceLocal");
+ Service service = Service.create(wsdlUrl, serviceName);
+
+ //JMS test
+ HelloWorld proxy = (HelloWorld) service.getPort(new QName("http://org.jboss.ws/jaxws/cxf/jms", "HelloWorldImplPort"), HelloWorld.class);
+ result = "Hi".equals(proxy.echo("Hi"));
+ }
+ finally
+ {
+ bus.shutdown(true);
+ }
+ res.getWriter().print(result);
+ }
+ catch (Throwable t)
+ {
+ t.printStackTrace();
+ throw new ServletException(t);
+ }
+ }
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/DeploymentTestServlet.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/HelloWorld.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/HelloWorld.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/HelloWorld.java 2015-03-05 11:50:15 UTC (rev 19526)
@@ -0,0 +1,30 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.jms;
+
+import javax.jws.WebService;
+
+@WebService(targetNamespace = "http://org.jboss.ws/jaxws/cxf/jms")
+public interface HelloWorld
+{
+ String echo(String input);
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/HelloWorld.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/HelloWorldImpl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/HelloWorldImpl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/HelloWorldImpl.java 2015-03-05 11:50:15 UTC (rev 19526)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.jms;
+
+import javax.jws.WebService;
+
+@WebService
+(
+ portName = "HelloWorldImplPort",
+ serviceName = "HelloWorldServiceLocal",
+ wsdlLocation = "META-INF/wsdl/HelloWorldService.wsdl",
+ endpointInterface = "org.jboss.test.ws.jaxws.cxf.jms.HelloWorld",
+ targetNamespace = "http://org.jboss.ws/jaxws/cxf/jms"
+)
+public class HelloWorldImpl implements HelloWorld
+{
+ public String echo(String input)
+ {
+ System.out.println("input: " + input);
+ return input;
+ }
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/HelloWorldImpl.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointAPITestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointAPITestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointAPITestCase.java 2015-03-05 11:50:15 UTC (rev 19526)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.jms;
+
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.container.test.api.TargetsContainer;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.ws.common.IOUtils;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.io.File;
+import java.net.URL;
+
+/**
+ * Test case for publishing a JMS (SOAP-over-JMS 1.0) endpoint through API
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 29-Apr-2011
+ */
+(a)RunWith(Arquillian.class)
+public final class JMSEndpointAPITestCase extends JBossWSTest
+{
+ private static final String JMS_SERVER = "jms";
+
+ @Deployment(testable = false)
+ @TargetsContainer(JMS_SERVER)
+ public static WebArchive createWarDeployment() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class,"jaxws-cxf-jms-api.war");
+ archive
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client services,org.hornetq\n"))
+ .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 archive;
+ }
+
+ @Test
+ @RunAsClient
+ public void testServerSide() throws Exception
+ {
+ URL url = new URL("http://" + getServerHost() + ":" + getServerPort(CXF_TESTS_GROUP_QUALIFIER, JMS_SERVER) + "/jaxws-cxf-jms-api");
+ assertEquals("true", IOUtils.readAndCloseStream(url.openStream()));
+ }
+
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointAPITestCase.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointOnlyDeploymentTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointOnlyDeploymentTestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointOnlyDeploymentTestCase.java 2015-03-05 11:50:15 UTC (rev 19526)
@@ -0,0 +1,221 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.jms;
+
+import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.transport.jms.JMSConduit;
+import org.apache.cxf.transport.jms.JMSConfiguration;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.container.test.api.TargetsContainer;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.ws.common.DOMUtils;
+import org.jboss.ws.common.IOUtils;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import javax.jms.*;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import java.io.File;
+import java.net.URL;
+import java.util.Properties;
+
+/**
+ * Test case for deploying an archive with a JMS (SOAP-over-JMS 1.0) endpoint only
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 10-Jun-2011
+ */
+(a)RunWith(Arquillian.class)
+public class JMSEndpointOnlyDeploymentTestCase extends JBossWSTest
+{
+ private static final String JMS_SERVER = "jms";
+ private static volatile boolean waitForResponse;
+
+ @Deployment(name="jaxws-cxf-jms-only-deployment-test-servlet", order=1, testable = false)
+ @TargetsContainer(JMS_SERVER)
+ public static WebArchive createWarDeployment() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxws-cxf-jms-only-deployment-test-servlet.war");
+ archive
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client services,org.hornetq\n"))
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/cxf/jms/META-INF/wsdl/HelloWorldService.wsdl"), "classes/META-INF/wsdl/HelloWorldService.wsdl")
+ .addClass(org.jboss.test.ws.jaxws.cxf.jms.DeploymentTestServlet.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.jms.HelloWorld.class);
+ return archive;
+ }
+
+ @Deployment(name="jaxws-cxf-jms-only-deployment", order=2, testable = false)
+ @TargetsContainer(JMS_SERVER)
+ public static JavaArchive createJarDeployment() {
+ JavaArchive archive = ShrinkWrap.create(JavaArchive.class,"jaxws-cxf-jms-only-deployment.jar");
+ archive
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.hornetq\n"))
+ .addClass(org.jboss.test.ws.jaxws.cxf.jms.HelloWorld.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.jms.HelloWorldImpl.class)
+ .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/cxf/jms/META-INF/wsdl/HelloWorldService.wsdl"), "wsdl/HelloWorldService.wsdl");
+ return archive;
+ }
+
+ @Test
+ @RunAsClient
+ public void testJMSEndpointServerSide() throws Exception
+ {
+ URL url = new URL("http://" + getServerHost() + ":" + getServerPort(CXF_TESTS_GROUP_QUALIFIER, JMS_SERVER) + "/jaxws-cxf-jms-only-deployment-test-servlet");
+ assertEquals("true", IOUtils.readAndCloseStream(url.openStream()));
+ }
+
+ @Test
+ @RunAsClient
+ public void testJMSEndpointClientSide() throws Exception
+ {
+ URL wsdlUrl = getResourceURL("jaxws/cxf/jms/META-INF/wsdl/HelloWorldService.wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/jms", "HelloWorldService");
+
+ Service service = Service.create(wsdlUrl, serviceName);
+ HelloWorld proxy = (HelloWorld) service.getPort(new QName("http://org.jboss.ws/jaxws/cxf/jms", "HelloWorldImplPort"), HelloWorld.class);
+ setupProxy(proxy);
+ try {
+ assertEquals("Hi", proxy.echo("Hi"));
+ } catch (Exception e) {
+ rethrowAndHandleAuthWarning(e);
+ }
+ }
+
+ @Test
+ @RunAsClient
+ public void testMessagingClient() throws Exception
+ {
+ String reqMessage =
+ "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" +
+ " <soap:Body>" +
+ " <ns2:echo xmlns:ns2=\"http://org.jboss.ws/jaxws/cxf/jms\">" +
+ " <arg0>Hi</arg0>" +
+ " </ns2:echo>" +
+ " </soap:Body>" +
+ "</soap:Envelope>";
+
+ String resMessage =
+ "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" +
+ " <soap:Body>" +
+ " <ns2:echoResponse xmlns:ns2=\"http://org.jboss.ws/jaxws/cxf/jms\">" +
+ " <return>Hi</return>" +
+ " </ns2:echoResponse>" +
+ " </soap:Body>" +
+ "</soap:Envelope>";
+
+ Properties env = new Properties();
+ env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
+ env.put(Context.PROVIDER_URL, "http-remoting://" + getServerHost() + ":" + getServerPort(CXF_TESTS_GROUP_QUALIFIER, JMS_SERVER));
+ env.put(Context.SECURITY_PRINCIPAL, JBossWSTestHelper.getTestUsername());
+ env.put(Context.SECURITY_CREDENTIALS, JBossWSTestHelper.getTestPassword());
+ InitialContext context = null;
+ try {
+ context = new InitialContext(env);
+ } catch (Exception e) {
+ rethrowAndHandleAuthWarning(e);
+ }
+ QueueConnectionFactory connectionFactory = (QueueConnectionFactory)context.lookup("jms/RemoteConnectionFactory");
+ Queue reqQueue = (Queue)context.lookup("jms/queue/test");
+ Queue resQueue = (Queue)context.lookup("jms/queue/test");
+
+ QueueConnection con = connectionFactory.createQueueConnection(JBossWSTestHelper.getTestUsername(), JBossWSTestHelper.getTestPassword());
+ QueueSession session = con.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
+ QueueReceiver receiver = session.createReceiver(resQueue);
+ ResponseListener responseListener = new ResponseListener();
+ receiver.setMessageListener(responseListener);
+ con.start();
+
+ TextMessage message = session.createTextMessage(reqMessage);
+ message.setJMSReplyTo(resQueue);
+ message.setStringProperty("SOAPJMS_contentType", "text/xml");
+ message.setStringProperty("SOAPJMS_requestURI", "jms:queue:testQueue");
+
+ waitForResponse = true;
+
+ QueueSender sender = session.createSender(reqQueue);
+ sender.send(message);
+ sender.close();
+
+ int timeout = 30000;
+ while (waitForResponse && timeout > 0)
+ {
+ Thread.sleep(100);
+ timeout -= 100;
+ }
+
+ assertNotNull("Expected response message", responseListener.resMessage);
+ assertEquals(DOMUtils.parse(resMessage), DOMUtils.parse(responseListener.resMessage));
+
+ sender.close();
+ receiver.close();
+ con.stop();
+ session.close();
+ con.close();
+ }
+
+ public static class ResponseListener implements MessageListener
+ {
+ public String resMessage;
+
+ public void onMessage(Message msg)
+ {
+ TextMessage textMessage = (TextMessage)msg;
+ try
+ {
+ resMessage = textMessage.getText();
+ waitForResponse = false;
+ }
+ catch (Throwable t)
+ {
+ t.printStackTrace();
+ }
+ }
+ }
+
+ private void setupProxy(HelloWorld proxy) {
+ JMSConduit conduit = (JMSConduit)ClientProxy.getClient(proxy).getConduit();
+ JMSConfiguration config = conduit.getJmsConfig();
+ config.setUserName(JBossWSTestHelper.getTestUsername());
+ config.setPassword(JBossWSTestHelper.getTestPassword());
+ Properties props = conduit.getJmsConfig().getJndiEnvironment();
+ props.put(Context.SECURITY_PRINCIPAL, JBossWSTestHelper.getTestUsername());
+ props.put(Context.SECURITY_CREDENTIALS, JBossWSTestHelper.getTestPassword());
+ }
+
+ private static void rethrowAndHandleAuthWarning(Exception e) throws Exception {
+ System.out.println("This test requires a testQueue JMS queue and a user with 'guest' role to be available on the application server; " +
+ "queue are easily added using jboss-cli.sh/bat, while users are added using add-user.sh/bat. When running test please specify user " +
+ "and password using -Dtest.username=\"foo\" -Dtest.password=\"bar\".");
+ throw e;
+ }
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointOnlyDeploymentTestCase.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/TestServlet.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/TestServlet.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/TestServlet.java 2015-03-05 11:50:15 UTC (rev 19526)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.jms;
+
+import java.io.IOException;
+import java.net.URL;
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Endpoint;
+import javax.xml.ws.Service;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+
+@WebServlet(name = "TestServlet", urlPatterns = "/*")
+public class TestServlet extends HttpServlet
+{
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ try
+ {
+ boolean result;
+ URL wsdlUrl = Thread.currentThread().getContextClassLoader()
+ .getResource("META-INF/wsdl/HelloWorldService.wsdl");
+ //start a new bus to avoid affecting the one that could already be assigned to this thread
+ Bus bus = BusFactory.newInstance().createBus();
+ BusFactory.setThreadDefaultBus(bus);
+ Object implementor = new HelloWorldImpl();
+ Endpoint ep = Endpoint.publish("jms:queue:testQueue", implementor);
+ try
+ {
+ //use HelloWorldServiceLocal service which has local connection factory references (we're running on the same JVM here)
+ QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/jms", "HelloWorldServiceLocal");
+
+ Service service = Service.create(wsdlUrl, serviceName);
+ HelloWorld proxy = (HelloWorld) service.getPort(new QName("http://org.jboss.ws/jaxws/cxf/jms", "HelloWorldImplPort"), HelloWorld.class);
+ result = "Hi".equals(proxy.echo("Hi"));
+ }
+ finally
+ {
+ ep.stop();
+ bus.shutdown(true);
+ }
+ res.getWriter().print(result);
+ }
+ catch (Throwable t)
+ {
+ t.printStackTrace();
+ throw new ServletException(t);
+ }
+ }
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/TestServlet.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jms/META-INF/wsdl/HelloWorldService.wsdl
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jms/META-INF/wsdl/HelloWorldService.wsdl (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jms/META-INF/wsdl/HelloWorldService.wsdl 2015-03-05 11:50:15 UTC (rev 19526)
@@ -0,0 +1,86 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<wsdl:definitions name="HelloWorldService" targetNamespace="http://org.jboss.ws/jaxws/cxf/jms"
+ xmlns:ns1="http://schemas.xmlsoap.org/soap/http"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://org.jboss.ws/jaxws/cxf/jms"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soapjms="http://www.w3.org/2010/soapjms/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <wsdl:types>
+<xs:schema elementFormDefault="unqualified" targetNamespace="http://org.jboss.ws/jaxws/cxf/jms" version="1.0" xmlns:tns="http://org.jboss.ws/jaxws/cxf/jms" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+<xs:element name="echo" type="tns:echo"/>
+<xs:element name="echoResponse" type="tns:echoResponse"/>
+<xs:complexType name="echo">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+<xs:complexType name="echoResponse">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+ </wsdl:types>
+ <wsdl:message name="echoResponse">
+ <wsdl:part element="tns:echoResponse" name="parameters">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="echo">
+ <wsdl:part element="tns:echo" name="parameters">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="echo">
+ <wsdl:input message="tns:echo" name="echo">
+ </wsdl:input>
+ <wsdl:output message="tns:echoResponse" name="echoResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="HelloWorldServiceSoapBinding" type="tns:HelloWorld">
+ <soap:binding style="document" transport="http://www.w3.org/2010/soapjms/"/>
+ <wsdl:operation name="echo">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="echo">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="echoResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="HttpHelloWorldServiceSoapBinding" type="tns:HelloWorld">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="echo">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="echo">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="echoResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="HelloWorldService">
+ <soapjms:jndiConnectionFactoryName>java:jms/RemoteConnectionFactory</soapjms:jndiConnectionFactoryName>
+ <soapjms:jndiInitialContextFactory>org.jboss.naming.remote.client.InitialContextFactory</soapjms:jndiInitialContextFactory>
+ <soapjms:jndiURL>http-remoting://@jboss.bind.address@:@add_int(port-offset.cxf-tests.jms,8080)@</soapjms:jndiURL>
+ <wsdl:port binding="tns:HelloWorldServiceSoapBinding" name="HelloWorldImplPort">
+ <soap:address location="jms:queue:testQueue"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HttpHelloWorldServiceSoapBinding" name="HttpHelloWorldImplPort">
+ <soap:address location="http://host:port"/><!-- will be rewritten at deploy time -->
+ </wsdl:port>
+ </wsdl:service>
+ <wsdl:service name="HelloWorldServiceLocal">
+ <soapjms:jndiConnectionFactoryName>java:/ConnectionFactory</soapjms:jndiConnectionFactoryName>
+ <soapjms:jndiURL></soapjms:jndiURL>
+ <wsdl:port binding="tns:HelloWorldServiceSoapBinding" name="HelloWorldImplPort">
+ <soap:address location="jms:queue:testQueue"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HttpHelloWorldServiceSoapBinding" name="HttpHelloWorldImplPort">
+ <soap:address location="http://host:port"/><!-- will be rewritten at deploy time -->
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jms/META-INF/wsdl/HelloWorldService.wsdl
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/scripts/jbws-testsuite-jms.groovy
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/scripts/jbws-testsuite-jms.groovy (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/scripts/jbws-testsuite-jms.groovy 2015-03-05 11:50:15 UTC (rev 19526)
@@ -0,0 +1,57 @@
+def root = new XmlParser().parse(project.properties['inputFile'])
+
+/**
+ * Fix logging: remove CONSOLE handler and set a specific log file
+ *
+ */
+def logHandlers = root.profile.subsystem.'root-logger'.handlers[0]
+def consoleHandler = logHandlers.find{it.@name == 'CONSOLE'}
+logHandlers.remove(consoleHandler)
+def file = root.profile.subsystem.'periodic-rotating-file-handler'.file[0]
+file.attributes()['path'] = project.properties['serverLog']
+
+/**
+ * Add a JMS queue like this
+ *
+ * <subsystem xmlns="urn:jboss:domain:messaging:2.0">
+ * <hornetq-server>
+ * <jms-destinations>
+ * <jms-queue name="testQueue">
+ * <entry name="queue/test"/>
+ * <entry name="java:jboss/exported/jms/queue/test"/>
+ * </jms-queue>
+ * </jms-destinations>
+ * </hornetq-server>
+ * </subsystem>
+ **/
+def hornetqServer = root.profile.subsystem.'hornetq-server'[0]
+def jmsDestinations = hornetqServer.'jms-destinations'[0]
+if (jmsDestinations == null) {
+ jmsDestinations = hornetqServer.appendNode('jms-destinations');
+}
+def jmsQueue = jmsDestinations.appendNode('jms-queue', ['name':'testQueue'])
+jmsQueue.appendNode('entry', ['name':'queue/test'])
+jmsQueue.appendNode('entry', ['name':'java:jboss/exported/jms/queue/test'])
+
+/**
+ * Save the configuration to a new file
+ */
+def writer = new StringWriter()
+writer.println('<?xml version="1.0" encoding="UTF-8"?>')
+new XmlNodePrinter(new PrintWriter(writer)).print(root)
+def f = new File(project.properties['outputFile'])
+f.write(writer.toString())
+
+/*
+ * copy the preconfigured application-roles.properties and application-users.properties
+ * files into the standalone/configure directory
+ */
+def srcUsersProperties = project.properties['srcUsersProperties']
+def destUsersProperties = project.properties['destUsersProperties']
+new AntBuilder().copy( file:srcUsersProperties,
+ tofile:destUsersProperties)
+
+def srcRolesProperties = project.properties['srcRolesProperties']
+def destRolesProperties = project.properties['destRolesProperties']
+new AntBuilder().copy( file:srcRolesProperties,
+ tofile:destRolesProperties)
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2015-03-05 06:52:26 UTC (rev 19525)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2015-03-05 11:50:15 UTC (rev 19526)
@@ -35,6 +35,7 @@
<port-offset.cxf-tests.jboss>0</port-offset.cxf-tests.jboss>
<port-offset.cxf-tests.ssl-mutual-auth>5000</port-offset.cxf-tests.ssl-mutual-auth>
<port-offset.cxf-tests.default-config-tests>10000</port-offset.cxf-tests.default-config-tests>
+ <port-offset.cxf-tests.jms>35000</port-offset.cxf-tests.jms>
<port-offset.shared-tests.jboss>15000</port-offset.shared-tests.jboss>
<port-offset.shared-tests.default-config-tests>20000</port-offset.shared-tests.default-config-tests>
<port-offset.shared-tests.address-rewrite>25000</port-offset.shared-tests.address-rewrite>
@@ -319,7 +320,7 @@
<test.archive.directory>${test.archive.directory}</test.archive.directory>
<test.classes.directory>${test.classes.directory}</test.classes.directory>
<test.resources.directory>${test.resources.directory}</test.resources.directory>
- <test.username>test.username</test.username>
+ <test.username>${test.username}</test.username>
<test.password>${test.password}</test.password>
<wsdl.publish.location>${wsdl.publish.location}</wsdl.publish.location>
</systemPropertyVariables>
9 years, 10 months
JBossWS SVN: r19525 - stack/cxf/branches.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2015-03-05 01:52:26 -0500 (Thu, 05 Mar 2015)
New Revision: 19525
Added:
stack/cxf/branches/management/
Log:
Create workspace for management improvement
9 years, 10 months
JBossWS SVN: r19524 - spi/branches.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2015-03-05 01:44:36 -0500 (Thu, 05 Mar 2015)
New Revision: 19524
Added:
spi/branches/management/
Log:
Create workspace for management improvement
9 years, 10 months
JBossWS SVN: r19523 - common/branches.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2015-03-05 01:25:13 -0500 (Thu, 05 Mar 2015)
New Revision: 19523
Added:
common/branches/management/
Log:
Create workspace for management improvement
9 years, 10 months
JBossWS SVN: r19522 - api/branches.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2015-03-05 01:16:38 -0500 (Thu, 05 Mar 2015)
New Revision: 19522
Added:
api/branches/management/
Log:
Create workspace for management enhancement
9 years, 10 months
JBossWS SVN: r19521 - container/wildfly81/branches/jbossws-wildfly810.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-03-04 10:06:34 -0500 (Wed, 04 Mar 2015)
New Revision: 19521
Modified:
container/wildfly81/branches/jbossws-wildfly810/pom.xml
Log:
Use latest parent
Modified: container/wildfly81/branches/jbossws-wildfly810/pom.xml
===================================================================
--- container/wildfly81/branches/jbossws-wildfly810/pom.xml 2015-03-04 15:01:57 UTC (rev 19520)
+++ container/wildfly81/branches/jbossws-wildfly810/pom.xml 2015-03-04 15:06:34 UTC (rev 19521)
@@ -28,7 +28,7 @@
<parent>
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-parent</artifactId>
- <version>1.1.0.GA</version>
+ <version>1.2.0.CR1</version>
</parent>
<name>JBossWS WildFly 8.1.0.Final Integration Parent</name>
9 years, 10 months
JBossWS SVN: r19520 - spi/trunk.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-03-04 10:01:57 -0500 (Wed, 04 Mar 2015)
New Revision: 19520
Modified:
spi/trunk/pom.xml
Log:
Use latest parent
Modified: spi/trunk/pom.xml
===================================================================
--- spi/trunk/pom.xml 2015-03-04 15:00:53 UTC (rev 19519)
+++ spi/trunk/pom.xml 2015-03-04 15:01:57 UTC (rev 19520)
@@ -13,7 +13,7 @@
<parent>
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-parent</artifactId>
- <version>1.1.0.GA</version>
+ <version>1.2.0.CR1</version>
</parent>
<!-- Source Control Management -->
9 years, 10 months