JBossWS SVN: r10955 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2009-10-19 12:06:43 -0400 (Mon, 19 Oct 2009)
New Revision: 10955
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-2660]:fix the testcase in other containers
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2009-10-19 15:33:32 UTC (rev 10954)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2009-10-19 16:06:43 UTC (rev 10955)
@@ -323,6 +323,11 @@
<jbossws.integration.target>jboss500</jbossws.integration.target>
</properties>
<dependencies>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ <version>${hibernate.version}</version>
+ </dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-ejb3</artifactId>
@@ -335,6 +340,11 @@
</exclusions>
</dependency>
<dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-security</artifactId>
+ <version>${jboss.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.jboss.javaee</groupId>
<artifactId>jboss-javaee</artifactId>
<version>${jboss.javaee.version}</version>
@@ -376,6 +386,11 @@
</properties>
<dependencies>
<dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ <version>${hibernate.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-ejb3</artifactId>
<version>${jboss.version}</version>
@@ -387,15 +402,15 @@
</exclusions>
</dependency>
<dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-security</artifactId>
+ <version>${jboss.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.jboss.javaee</groupId>
<artifactId>jboss-javaee</artifactId>
<version>${jboss.javaee.version}</version>
</dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-security</artifactId>
- <version>${jboss.version}</version>
- </dependency>
</dependencies>
<build>
<plugins>
@@ -413,6 +428,7 @@
<!-- TODO: replace with maven dependencies -->
<additionalClasspathElements>
<additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
+ <additionalClasspathElement>${jboss.home}/common/lib/jboss-ejb3-core.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
</plugin>
@@ -432,6 +448,11 @@
</properties>
<dependencies>
<dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ <version>${hibernate.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-ejb3</artifactId>
<version>${jboss.version}</version>
@@ -478,6 +499,11 @@
</properties>
<dependencies>
<dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ <version>${hibernate.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-ejb3</artifactId>
<version>${jboss.version}</version>
@@ -501,6 +527,11 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>${surefire.jvm.args} ${surefire.jvm.management.args} -Djava.endorsed.dirs=${jboss520.home}/lib/endorsed</argLine>
+ <!-- TODO: replace with maven dependencies -->
+ <additionalClasspathElements>
+ <additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
+ <additionalClasspathElement>${jboss.home}/common/lib/jboss-ejb3-core.jar</additionalClasspathElement>
+ </additionalClasspathElements>
</configuration>
</plugin>
</plugins>
@@ -519,6 +550,11 @@
</properties>
<dependencies>
<dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ <version>${hibernate.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-ejb3</artifactId>
<version>${jboss.version}</version>
@@ -542,6 +578,11 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>${surefire.jvm.args} ${surefire.jvm.management.args} -Djava.endorsed.dirs=${jboss600.home}/lib/endorsed</argLine>
+ <!-- TODO: replace with maven dependencies -->
+ <additionalClasspathElements>
+ <additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
+ <additionalClasspathElement>${jboss.home}/common/lib/jboss-ejb3-core.jar</additionalClasspathElement>
+ </additionalClasspathElements>
</configuration>
</plugin>
</plugins>
15 years, 2 months
JBossWS SVN: r10954 - framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-19 11:33:32 -0400 (Mon, 19 Oct 2009)
New Revision: 10954
Removed:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBeanNoAdapter.java
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java
Log:
[JBWS-2479] Enabling test for Metro stack
Deleted: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBeanNoAdapter.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBeanNoAdapter.java 2009-10-19 15:20:40 UTC (rev 10953)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBeanNoAdapter.java 2009-10-19 15:33:32 UTC (rev 10954)
@@ -1,62 +0,0 @@
-/*
- * 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.smoke.tools;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Set;
-
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.xml.bind.annotation.XmlList;
-
-@WebService(targetNamespace = "http://foo.bar.com/calculator", serviceName="CalculatorBeanService")
-public class CalculatorBeanNoAdapter
-{
- @WebMethod
- public int add(int a, int b)
- {
- return a+b;
- }
-
- @WebMethod
- public int subtract(int a, int b)
- {
- return a-b;
- }
-
- @WebMethod
- public Set<Integer> getKeys(HashMap<Integer, String> map)
- {
- if (map != null)
- return map.keySet();
- else
- return null;
- }
-
- @WebMethod
- @XmlList
- public List<String> processList(@XmlList List<String> list)
- {
- return list;
- }
-}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java 2009-10-19 15:20:40 UTC (rev 10953)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java 2009-10-19 15:33:32 UTC (rev 10954)
@@ -159,17 +159,10 @@
responseWrapper = loader.loadClass("org.jboss.test.ws.jaxws.smoke.tools.jaxws.ProcessListResponse");
XmlList xmlList = (XmlList) responseWrapper.getDeclaredField("_return").getAnnotation(XmlList.class);
assertNotNull("@XmlList missing from response wrapper's _return field", xmlList);
- if (!isIntegrationMetro())
- {
- responseWrapper = loader.loadClass("org.jboss.test.ws.jaxws.smoke.tools.jaxws.ProcessCustomResponse");
- XmlJavaTypeAdapter xmlJavaTypeAdapter = (XmlJavaTypeAdapter) responseWrapper.getDeclaredField("_return").getAnnotation(XmlJavaTypeAdapter.class);
- assertNotNull("@XmlJavaTypeAdapter missing from response wrapper's _return field", xmlJavaTypeAdapter);
- assertEquals("org.jboss.test.ws.jaxws.smoke.tools.CustomAdapter", xmlJavaTypeAdapter.value().getName());
- }
- else
- {
- System.out.println("FIXME: [JBWS-2479] @XmlJavaTypeAdapter on SEI causes exception");
- }
+ responseWrapper = loader.loadClass("org.jboss.test.ws.jaxws.smoke.tools.jaxws.ProcessCustomResponse");
+ XmlJavaTypeAdapter xmlJavaTypeAdapter = (XmlJavaTypeAdapter)responseWrapper.getDeclaredField("_return").getAnnotation(XmlJavaTypeAdapter.class);
+ assertNotNull("@XmlJavaTypeAdapter missing from response wrapper's _return field", xmlJavaTypeAdapter);
+ assertEquals("org.jboss.test.ws.jaxws.smoke.tools.CustomAdapter", xmlJavaTypeAdapter.value().getName());
}
/**
@@ -292,8 +285,6 @@
{
//provider.setGenerateSource(true);
provider.setOutputDirectory(outputDirectory);
- //JBWS-2479: using different beans because the whole smoke tools test is supposed to be run for every stack
- //and we can't afford excluding it for Metro just because of JBWS-2479
- provider.provide(!isIntegrationMetro() ? CalculatorBean.class : CalculatorBeanNoAdapter.class);
+ provider.provide(CalculatorBean.class);
}
}
15 years, 2 months
JBossWS SVN: r10953 - stack/native/trunk.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-19 11:20:40 -0400 (Mon, 19 Oct 2009)
New Revision: 10953
Modified:
stack/native/trunk/pom.xml
Log:
[JBWS-2792] Moving to JAXB RI 2.1.12 and JAXWS RI 2.1.7 (for tooling)
Modified: stack/native/trunk/pom.xml
===================================================================
--- stack/native/trunk/pom.xml 2009-10-19 15:04:49 UTC (rev 10952)
+++ stack/native/trunk/pom.xml 2009-10-19 15:20:40 UTC (rev 10953)
@@ -66,7 +66,7 @@
<jaxws.api.version>2.1</jaxws.api.version>
<jsr181.api.version>1.0-MR1</jsr181.api.version>
<jaxb.api.version>2.1</jaxb.api.version>
- <jaxb.impl.version>2.1.9</jaxb.impl.version>
+ <jaxb.impl.version>2.1.12</jaxb.impl.version>
<jboss.common.version>1.2.1.GA</jboss.common.version>
<jboss.logging.version>2.2.0.CR1</jboss.logging.version>
<jboss.jaxr.version>2.0.1</jboss.jaxr.version>
@@ -74,7 +74,7 @@
<juddi.version>2.0.1</juddi.version>
<netty.version>3.1.5.GA</netty.version>
<sun.fastinfoset.version>1.2.2</sun.fastinfoset.version>
- <sun.jaxws.version>2.1.3</sun.jaxws.version>
+ <sun.jaxws.version>2.1.7</sun.jaxws.version>
<woodstox.version>3.2.6</woodstox.version>
<wscommons.policy.version>1.0</wscommons.policy.version>
<wsdl4j.version>1.6.1</wsdl4j.version>
15 years, 2 months
JBossWS SVN: r10952 - stack/metro/trunk.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-19 11:04:49 -0400 (Mon, 19 Oct 2009)
New Revision: 10952
Modified:
stack/metro/trunk/pom.xml
Log:
[JBWS-2792] Update to JAXWS RI 2.1.7, JAXB RI 2.1.12, saaj-impl 1.3.3
Modified: stack/metro/trunk/pom.xml
===================================================================
--- stack/metro/trunk/pom.xml 2009-10-19 12:29:37 UTC (rev 10951)
+++ stack/metro/trunk/pom.xml 2009-10-19 15:04:49 UTC (rev 10952)
@@ -60,7 +60,7 @@
<jboss.common.version>1.2.1.GA</jboss.common.version>
<commons.logging.version>1.1.1</commons.logging.version>
<jaxb.api.version>2.1</jaxb.api.version>
- <jaxb.impl.version>2.1.9</jaxb.impl.version>
+ <jaxb.impl.version>2.1.12</jaxb.impl.version>
<jaxrpc.api.version>1.1</jaxrpc.api.version>
<jboss.jaxr.version>2.0.1</jboss.jaxr.version>
<apache.scout.version>1.1.1</apache.scout.version>
@@ -68,9 +68,9 @@
<sun.fastinfoset.version>1.2.2</sun.fastinfoset.version>
<sun.sjsxp.version>1.0.1</sun.sjsxp.version>
<sun.http-transport.version>2.1.3</sun.http-transport.version>
- <sun.jaxws.version>2.1.4</sun.jaxws.version>
+ <sun.jaxws.version>2.1.7</sun.jaxws.version>
<sun.wsit.version>1.3.1</sun.wsit.version>
- <sun.saaj.impl.version>1.3</sun.saaj.impl.version>
+ <sun.saaj.impl.version>1.3.3</sun.saaj.impl.version>
<woodstox.version>3.2.6</woodstox.version>
<wsdl4j.version>1.6.1</wsdl4j.version>
<jsr181.version>1.0-MR1</jsr181.version>
@@ -208,7 +208,7 @@
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-local-transport</artifactId>
- <version>${sun.http-transport.version}</version>
+ <version>${sun.jaxws.version}</version>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
15 years, 2 months
JBossWS SVN: r10951 - stack/cxf/trunk.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-19 08:29:37 -0400 (Mon, 19 Oct 2009)
New Revision: 10951
Modified:
stack/cxf/trunk/pom.xml
Log:
[JBWS-2660] Reverting change to snapshots repository usage
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2009-10-19 09:39:30 UTC (rev 10950)
+++ stack/cxf/trunk/pom.xml 2009-10-19 12:29:37 UTC (rev 10951)
@@ -520,7 +520,7 @@
<id>snapshots.jboss.org</id>
<url>http://snapshots.jboss.org/maven2</url>
<snapshots>
- <enabled>false</enabled>
+ <enabled>true</enabled>
</snapshots>
</repository>
</repositories>
15 years, 2 months
JBossWS SVN: r10950 - in stack/cxf/trunk: modules/resources/src/main/resources/resources and 11 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2009-10-19 05:39:30 -0400 (Mon, 19 Oct 2009)
New Revision: 10950
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/JMSTransportTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/Organization.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/OrganizationHttpEndpoint.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/OrganizationJmsEndpoint.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/META-INF/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/META-INF/jboss-service.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/META-INF/wsdl.plugin.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/jboss-web.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/jbossws-cxf.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/web.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/wsdl/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/wsdl/jmstransport.wsdl
Modified:
stack/cxf/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
stack/cxf/trunk/modules/server/pom.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jaxws.xml
stack/cxf/trunk/modules/testsuite/pom.xml
stack/cxf/trunk/pom.xml
stack/cxf/trunk/src/main/scripts/assembly-deploy-artifacts.xml
Log:
[JBWS-2660]:cxf jms tranport testcase;it queries the wsdl file from servlet transport and call the webservice through jms
Modified: stack/cxf/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2009-10-18 00:04:03 UTC (rev 10949)
+++ stack/cxf/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2009-10-19 09:39:30 UTC (rev 10950)
@@ -47,6 +47,8 @@
<include name="**/spring-beans.jar"/>
<include name="**/spring-context.jar"/>
<include name="**/spring-core.jar"/>
+ <include name="**/spring-jms.jar"/>
+ <include name="**/spring-tx.jar"/>
<include name="**/stax-api.jar"/>
<include name="**/velocity.jar"/>
<include name="**/wsdl4j.jar"/>
@@ -90,6 +92,8 @@
<include name="**/spring-beans.jar"/>
<include name="**/spring-context.jar"/>
<include name="**/spring-core.jar"/>
+ <include name="**/spring-jms.jar"/>
+ <include name="**/spring-tx.jar"/>
<include name="**/wsdl4j.jar"/>
<include name="**/wss4j.jar"/>
<include name="**/xml-resolver.jar"/>
Modified: stack/cxf/trunk/modules/server/pom.xml
===================================================================
--- stack/cxf/trunk/modules/server/pom.xml 2009-10-18 00:04:03 UTC (rev 10949)
+++ stack/cxf/trunk/modules/server/pom.xml 2009-10-19 09:39:30 UTC (rev 10950)
@@ -160,6 +160,15 @@
<groupId>asm</groupId>
<artifactId>asm</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jms</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-tx</artifactId>
+ </dependency>
+
<!-- jboss provided -->
<dependency>
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jaxws.xml 2009-10-18 00:04:03 UTC (rev 10949)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jaxws.xml 2009-10-19 09:39:30 UTC (rev 10950)
@@ -15,6 +15,33 @@
<target name="build-samples-jaxws" description="Build the jaxws samples deployments">
<mkdir dir="${tests.output.dir}/test-libs"/>
+
+ <!-- jaxws-samples-jmstransport -->
+ <war
+ warfile="${tests.output.dir}/test-libs/jaxws-samples-jmstransport.war"
+ webxml="${tests.output.dir}/test-resources/jaxws/samples/jmstransport/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/samples/jmstransport/*.class"/>
+ </classes>
+ <metainf dir="${tests.output.dir}/test-resources/jaxws/samples/jmstransport/META-INF/">
+ <include name="wsdl.plugin.xml"/>
+ </metainf>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/samples/jmstransport/WEB-INF">
+ <include name="wsdl/**"/>
+ <include name="jbossws-cxf.xml"/>
+ <include name="jboss-web.xml"/>
+ </webinf>
+ </war>
+ <jar jarfile="${tests.output.dir}/test-libs/jaxws-samples-jmstransport.sar">
+ <fileset dir="${tests.output.dir}/test-libs">
+ <include name="jaxws-samples-jmstransport.war"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/test-resources/jaxws/samples/jmstransport/META-INF">
+ <include name="jboss-service.xml"/>
+ </metainf>
+ </jar>
+
+
<!-- jaxws-samples-wsa -->
<war
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/JMSTransportTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/JMSTransportTestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/JMSTransportTestCase.java 2009-10-19 09:39:30 UTC (rev 10950)
@@ -0,0 +1,162 @@
+/*
+ * 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.jmstransport;
+
+import java.net.URL;
+
+import javax.jms.Message;
+import javax.jms.MessageListener;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueReceiver;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.naming.InitialContext;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * The test for cxf jms transport
+ *
+ * @author <a href=mailto:ema@redhat.com> Jim Ma </a>
+ */
+public class JMSTransportTestCase extends JBossWSTest
+{
+ private static boolean waitForResponse;
+
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(JMSTransportTestCase.class, "jaxws-samples-jmstransport.sar");
+ }
+
+
+ public void testJMSEndpointPort() throws Exception
+ {
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-jmstransport?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/samples/jmstransport", "OrganizationService");
+ QName portName = new QName("http://org.jboss.ws/samples/jmstransport", "JmsEndpointPort");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ Organization port = service.getPort(portName, Organization.class);
+
+ String res = port.getContactInfo("mafia");
+ assertEquals("The 'mafia' boss is currently out of office, please call again.", res);
+ }
+
+ public void testHTTPEndpointPort() throws Exception
+ {
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-jmstransport?wsdl");
+
+ QName serviceName = new QName("http://org.jboss.ws/samples/jmstransport", "OrganizationService");
+ QName portName = new QName("http://org.jboss.ws/samples/jmstransport", "HttpEndpointPort");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ Organization port = service.getPort(portName, Organization.class);
+
+ String res = port.getContactInfo("mafia");
+ assertEquals("The 'mafia' boss is currently out of office, please call again.", res);
+ }
+
+ public void testMessagingClient() throws Exception
+ {
+ String reqMessage =
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ "<env:Body>" +
+ "<ns1:getContactInfo xmlns:ns1='http://org.jboss.ws/samples/jmstransport'>" +
+ "<arg0>mafia</arg0>" +
+ "</ns1:getContactInfo>" +
+ "</env:Body>" +
+ "</env:Envelope>";
+
+ String resMessage =
+ "<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ "<soap:Body>" +
+ "<ns1:getContactInfoResponse xmlns:ns1='http://org.jboss.ws/samples/jmstransport'>" +
+ "<return>The 'mafia' boss is currently out of office, please call again.</return>" +
+ "</ns1:getContactInfoResponse>" +
+ "</soap:Body>" +
+ "</soap:Envelope>";
+
+ InitialContext context = new InitialContext();
+ QueueConnectionFactory connectionFactory = (QueueConnectionFactory)context.lookup("ConnectionFactory");
+ Queue reqQueue = (Queue)context.lookup("queue/RequestQueue");
+ Queue resQueue = (Queue)context.lookup("queue/ResponseQueue");
+
+ QueueConnection con = connectionFactory.createQueueConnection();
+ 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);
+
+ waitForResponse = true;
+
+ QueueSender sender = session.createSender(reqQueue);
+ sender.send(message);
+ sender.close();
+
+ int timeout = 3000;
+ while (waitForResponse && timeout > 0)
+ {
+ Thread.sleep(100);
+ timeout -= 10;
+ }
+
+ assertNotNull("Expected response message", responseListener.resMessage);
+ assertEquals(DOMUtils.parse(resMessage), DOMUtils.parse(responseListener.resMessage));
+
+ 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();
+ }
+ }
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/Organization.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/Organization.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/Organization.java 2009-10-19 09:39:30 UTC (rev 10950)
@@ -0,0 +1,32 @@
+/*
+ * 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.jmstransport;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService(targetNamespace = "http://org.jboss.ws/samples/jmstransport")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface Organization
+{
+ String getContactInfo(String organization);
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/OrganizationHttpEndpoint.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/OrganizationHttpEndpoint.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/OrganizationHttpEndpoint.java 2009-10-19 09:39:30 UTC (rev 10950)
@@ -0,0 +1,38 @@
+/*
+ * 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.jmstransport;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService (serviceName="OrganizationService", portName="HttpEndpointPort",wsdlLocation = "WEB-INF/wsdl/jmstransport.wsdl",targetNamespace = "http://org.jboss.ws/samples/jmstransport", endpointInterface="org.jboss.test.ws.jaxws.samples.jmstransport.Organization")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+
+public class OrganizationHttpEndpoint implements Organization
+{
+ @WebMethod
+ public String getContactInfo(String organization)
+ {
+ return "The '" + organization + "' boss is currently out of office, please call again.";
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/OrganizationJmsEndpoint.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/OrganizationJmsEndpoint.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/OrganizationJmsEndpoint.java 2009-10-19 09:39:30 UTC (rev 10950)
@@ -0,0 +1,33 @@
+/*
+ * 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.jmstransport;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService (serviceName="OrganizationService",portName="JmsEndpointPort", wsdlLocation = "WEB-INF/wsdl/jmstransport.wsdl", targetNamespace = "http://org.jboss.ws/samples/jmstransport", endpointInterface="org.jboss.test.ws.jaxws.samples.jmstransport.Organization")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+
+public class OrganizationJmsEndpoint extends OrganizationHttpEndpoint
+{
+
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/META-INF/jboss-service.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/META-INF/jboss-service.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/META-INF/jboss-service.xml 2009-10-19 09:39:30 UTC (rev 10950)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+ <mbean code="org.jboss.mq.server.jmx.Queue" name="jboss.mq.destination:service=Queue,name=RequestQueue">
+ <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue" name="jboss.mq.destination:service=Queue,name=ResponseQueue">
+ <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+ </mbean>
+</server>
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/META-INF/wsdl.plugin.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/META-INF/wsdl.plugin.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/META-INF/wsdl.plugin.xml 2009-10-19 09:39:30 UTC (rev 10950)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
+
+<properties version="1.0">
+ <entry key="soap-javax.wsdl.Port">org.apache.cxf.binding.soap.wsdl11.SoapAddressPlugin</entry>
+ <entry key="xml-javax.wsdl.Port">org.apache.cxf.binding.xml.wsdl11.HttpAddressPlugin</entry>
+ <entry key="xml-javax.wsdl.Binding">org.apache.cxf.binding.xml.wsdl11.XmlBindingPlugin</entry>
+ <entry key="xml-javax.wsdl.BindingInput">org.apache.cxf.binding.xml.wsdl11.XmlIoPlugin</entry>
+ <entry key="xml-javax.wsdl.BindingOutput">org.apache.cxf.binding.xml.wsdl11.XmlIoPlugin</entry>
+ <entry key="jms-javax.wsdl.Port">org.apache.cxf.transport.jms.wsdl11.JmsTransportPlugin</entry>
+</properties>
\ No newline at end of file
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/jboss-web.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/jboss-web.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/jboss-web.xml 2009-10-19 09:39:30 UTC (rev 10950)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+ <context-root>/jaxws-samples-jmstransport</context-root>
+</jboss-web>
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/jbossws-cxf.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/jbossws-cxf.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/jbossws-cxf.xml 2009-10-19 09:39:30 UTC (rev 10950)
@@ -0,0 +1,25 @@
+<beans xmlns='http://www.springframework.org/schema/beans'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:beans='http://www.springframework.org/schema/beans'
+ xmlns:jms="http://cxf.apache.org/transports/jms"
+ xmlns:jaxws='http://cxf.apache.org/jaxws'
+ xsi:schemaLocation='http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+ http://www.w3.org/2006/07/ws-policy http://www.w3.org/2006/07/ws-policy.xsd
+ http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
+ http://cxf.apache.org/transports/jms http://cxf.apache.org/schemas/configuration/jms.xsd'>
+
+ <import resource="classpath:META-INF/cxf/cxf-extension-jms.xml"/>
+ <jaxws:endpoint id='SOAPQueryService'
+ implementor='org.jboss.test.ws.jaxws.samples.jmstransport.OrganizationHttpEndpoint'
+ >
+ <jaxws:invoker>
+ <bean class='org.jboss.wsf.stack.cxf.InvokerJSE'/>
+ </jaxws:invoker>
+ </jaxws:endpoint>
+
+ <jaxws:endpoint id='JMSQueryService'
+ implementor='org.jboss.test.ws.jaxws.samples.jmstransport.OrganizationJmsEndpoint'
+ transportId="http://cxf.apache.org/transports/jms">
+ </jaxws:endpoint>
+</beans>
+
+
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/web.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/web.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/web.xml 2009-10-19 09:39:30 UTC (rev 10950)
@@ -0,0 +1,20 @@
+<?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>OrganizationService</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.samples.jmstransport.OrganizationHttpEndpoint</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>OrganizationService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/wsdl/jmstransport.wsdl
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/wsdl/jmstransport.wsdl (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/wsdl/jmstransport.wsdl 2009-10-19 09:39:30 UTC (rev 10950)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions name="OrganizationJMSEndpointService" targetNamespace="http://org.jboss.ws/samples/jmstransport" xmlns:jms="http://cxf.apache.org/transports/jms" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://org.jboss.ws/samples/jmstransport" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <wsdl:message name="getContactInfoResponse">
+ <wsdl:part name="return" type="xsd:string">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getContactInfo">
+ <wsdl:part name="arg0" type="xsd:string">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="Organization">
+ <wsdl:operation name="getContactInfo">
+ <wsdl:input message="tns:getContactInfo" name="getContactInfo">
+ </wsdl:input>
+ <wsdl:output message="tns:getContactInfoResponse" name="getContactInfoResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="HTTPSoapBinding" type="tns:Organization">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getContactInfo">
+ <soap:operation soapAction="" style="rpc"/>
+ <wsdl:input name="getContactInfo">
+ <soap:body namespace="http://org.jboss.ws/samples/jmstransport" use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getContactInfoResponse">
+ <soap:body namespace="http://org.jboss.ws/samples/jmstransport" use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:binding name="JMSSoapBinding" type="tns:Organization">
+ <soap:binding style="rpc" transport="http://cxf.apache.org/transports/jms"/>
+ <wsdl:operation name="getContactInfo">
+ <soap:operation soapAction="" style="rpc"/>
+ <wsdl:input name="getContactInfo">
+ <soap:body namespace="http://org.jboss.ws/samples/jmstransport" use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getContactInfoResponse">
+ <soap:body namespace="http://org.jboss.ws/samples/jmstransport" use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+
+ <wsdl:service name="OrganizationService">
+ <wsdl:port binding='tns:HTTPSoapBinding' name='HttpEndpointPort'>
+ <soap:address location='http://@jboss.bind.address@:8080/jaxws-samples-jmstransport'/>
+ </wsdl:port>
+ <wsdl:port binding="tns:JMSSoapBinding" name="JmsEndpointPort">
+ <jms:address
+ destinationStyle="queue"
+ jndiConnectionFactoryName="ConnectionFactory"
+ jndiDestinationName="queue/RequestQueue"
+ jndiReplyDestinationName="queue/ResponseQueue">
+ >
+ </jms:address>
+ </wsdl:port>
+
+
+ </wsdl:service>
+</wsdl:definitions>
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2009-10-18 00:04:03 UTC (rev 10949)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2009-10-19 09:39:30 UTC (rev 10950)
@@ -455,6 +455,11 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>${surefire.jvm.args} ${surefire.jvm.management.args} -Djava.endorsed.dirs=${jboss510.home}/lib/endorsed</argLine>
+ <!-- TODO: replace with maven dependencies -->
+ <additionalClasspathElements>
+ <additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
+ <additionalClasspathElement>${jboss.home}/common/lib/jboss-ejb3-core.jar</additionalClasspathElement>
+ </additionalClasspathElements>
</configuration>
</plugin>
</plugins>
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2009-10-18 00:04:03 UTC (rev 10949)
+++ stack/cxf/trunk/pom.xml 2009-10-19 09:39:30 UTC (rev 10950)
@@ -77,6 +77,8 @@
<velocity.version>1.5</velocity.version>
<xmlsec.version>1.4.3</xmlsec.version>
<wstx.version>3.2.8</wstx.version>
+ <spring.version>2.5.5</spring.version>
+
</properties>
@@ -364,7 +366,19 @@
<artifactId>asm</artifactId>
<version>${cxf.asm.version}</version>
</dependency>
-
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-tx</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jms</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+
<!-- jboss provided -->
<dependency>
<groupId>org.jboss</groupId>
@@ -506,7 +520,7 @@
<id>snapshots.jboss.org</id>
<url>http://snapshots.jboss.org/maven2</url>
<snapshots>
- <enabled>true</enabled>
+ <enabled>false</enabled>
</snapshots>
</repository>
</repositories>
Modified: stack/cxf/trunk/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/cxf/trunk/src/main/scripts/assembly-deploy-artifacts.xml 2009-10-18 00:04:03 UTC (rev 10949)
+++ stack/cxf/trunk/src/main/scripts/assembly-deploy-artifacts.xml 2009-10-19 09:39:30 UTC (rev 10950)
@@ -39,6 +39,8 @@
<include>org.springframework:spring-beans:jar</include>
<include>org.springframework:spring-context:jar</include>
<include>org.springframework:spring-core:jar</include>
+ <include>org.springframework:spring-jms:jar</include>
+ <include>org.springframework:spring-tx:jar</include>
<include>wsdl4j:wsdl4j:jar</include>
<include>xml-resolver:xml-resolver:jar</include>
<include>org.apache.ws.commons.schema:XmlSchema:jar</include>
15 years, 2 months
JBossWS SVN: r10949 - in stack/native/trunk/modules/core/src/main/java/org/jboss/ws: extensions/wsrm and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-10-17 20:04:03 -0400 (Sat, 17 Oct 2009)
New Revision: 10949
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/netty/AbstractNettyRequestHandler.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/netty/NettyHttpServerImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/RMClientSequence.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/backchannel/RMCallbackHandlerFactory.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/backchannel/RMRequestHandlerFactory.java
Log:
fixed RM regression - mostly synchronization issues
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/netty/AbstractNettyRequestHandler.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/netty/AbstractNettyRequestHandler.java 2009-10-17 20:53:10 UTC (rev 10948)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/netty/AbstractNettyRequestHandler.java 2009-10-18 00:04:03 UTC (rev 10949)
@@ -23,8 +23,6 @@
import java.util.LinkedList;
import java.util.List;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.channel.ChannelPipelineCoverage;
@@ -46,9 +44,6 @@
/** Callbacks registry. */
private final List<NettyCallbackHandler> callbacks = new LinkedList<NettyCallbackHandler>();
- /** Callback registry lock. */
- private final Lock callbackRegistryLock = new ReentrantLock();
-
/**
* Constructor.
*/
@@ -104,15 +99,7 @@
*/
public final boolean hasMoreCallbacks()
{
- this.callbackRegistryLock.lock();
- try
- {
- return this.callbacks.size() > 0;
- }
- finally
- {
- this.callbackRegistryLock.unlock();
- }
+ return this.callbacks.size() > 0;
}
/**
@@ -123,21 +110,13 @@
*/
public final NettyCallbackHandler getCallback(final String requestPath)
{
- this.callbackRegistryLock.lock();
- try
+ for (final NettyCallbackHandler handler : this.callbacks)
{
- for (final NettyCallbackHandler handler : this.callbacks)
+ if (handler.getPath().equals(requestPath))
{
- if (handler.getPath().equals(requestPath))
- {
- return handler;
- }
+ return handler;
}
}
- finally
- {
- this.callbackRegistryLock.unlock();
- }
return null;
}
@@ -149,16 +128,8 @@
*/
public final void registerCallback(final NettyCallbackHandler callback)
{
- this.callbackRegistryLock.lock();
- try
- {
- callback.init();
- this.callbacks.add(callback);
- }
- finally
- {
- this.callbackRegistryLock.unlock();
- }
+ callback.init();
+ this.callbacks.add(callback);
}
/**
@@ -168,16 +139,8 @@
*/
public final void unregisterCallback(final NettyCallbackHandler callback)
{
- this.callbackRegistryLock.lock();
- try
- {
- this.callbacks.remove(callback);
- callback.destroy();
- }
- finally
- {
- this.callbackRegistryLock.unlock();
- }
+ this.callbacks.remove(callback);
+ callback.destroy();
}
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/netty/NettyHttpServerImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/netty/NettyHttpServerImpl.java 2009-10-17 20:53:10 UTC (rev 10948)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/netty/NettyHttpServerImpl.java 2009-10-18 00:04:03 UTC (rev 10949)
@@ -55,9 +55,6 @@
/** Indicates server is stopped. */
private boolean stopped;
- /** Indicates server is terminated. */
- private boolean terminated;
-
/** Channel factory. */
private ChannelFactory channelFactory;
@@ -109,7 +106,7 @@
*
* @param callback new callback
*/
- public void registerCallback(final NettyCallbackHandler callback)
+ public synchronized void registerCallback(final NettyCallbackHandler callback)
{
if (callback != null)
{
@@ -123,7 +120,7 @@
*
* @param callback old callback
*/
- public void unregisterCallback(final NettyCallbackHandler callback)
+ public synchronized void unregisterCallback(final NettyCallbackHandler callback)
{
if (callback != null)
{
@@ -148,7 +145,7 @@
* @param requestPath request path
* @return callback handler associated with path
*/
- public NettyCallbackHandler getCallback(final String requestPath)
+ public synchronized NettyCallbackHandler getCallback(final String requestPath)
{
if (requestPath == null)
{
@@ -158,13 +155,13 @@
this.ensureUpAndRunning();
return this.nettyRequestHandler.getCallback(requestPath);
}
-
+
/**
* @see NettyHttpServer#hasMoreCallbacks()
*
* @return true if at least one callback handler is registered, false otherwise
*/
- public boolean hasMoreCallbacks()
+ public synchronized boolean hasMoreCallbacks()
{
this.ensureUpAndRunning();
return this.nettyRequestHandler.hasMoreCallbacks();
@@ -175,24 +172,13 @@
*
* @return server port
*/
- public int getPort()
+ public synchronized int getPort()
{
this.ensureUpAndRunning();
return this.port;
}
/**
- * Ensures server is up and running.
- */
- private synchronized void ensureUpAndRunning()
- {
- if (this.stopped)
- {
- throw new IllegalStateException("Server is down");
- }
- }
-
- /**
* Handles incomming connections.
*/
public synchronized void run()
@@ -208,20 +194,6 @@
ie.printStackTrace();
}
}
- try
- {
- //Close all connections and server sockets.
- NettyHttpServerImpl.NETTY_CHANNEL_GROUP.close().awaitUninterruptibly();
- //Shutdown the selector loop (boss and worker).
- if (this.channelFactory != null)
- {
- this.channelFactory.releaseExternalResources();
- }
- }
- finally
- {
- this.terminated = true;
- }
}
/**
@@ -229,26 +201,40 @@
*/
public synchronized void terminate()
{
- if (this.stopped)
+ synchronized (NettyHttpServerFactory.SERVERS)
{
- return;
- }
+ if (this.stopped)
+ {
+ return;
+ }
- this.stopped = true;
- while (!this.terminated)
- {
+ this.stopped = true;
+
try
{
- this.wait(NettyHttpServerImpl.WAIT_PERIOD);
+ //Close all connections and server sockets.
+ NettyHttpServerImpl.NETTY_CHANNEL_GROUP.close().awaitUninterruptibly();
+ //Shutdown the selector loop (boss and worker).
+ if (this.channelFactory != null)
+ {
+ this.channelFactory.releaseExternalResources();
+ }
}
- catch (InterruptedException ie)
+ finally
{
- ie.printStackTrace();
+ NettyHttpServerFactory.SERVERS.remove(this.port);
}
}
- synchronized (NettyHttpServerFactory.SERVERS)
+ }
+
+ /**
+ * Ensures server is up and running.
+ */
+ private void ensureUpAndRunning()
+ {
+ if (this.stopped)
{
- NettyHttpServerFactory.SERVERS.remove(this.port);
+ throw new IllegalStateException("Server is down");
}
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/RMClientSequence.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/RMClientSequence.java 2009-10-17 20:53:10 UTC (rev 10948)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/RMClientSequence.java 2009-10-18 00:04:03 UTC (rev 10949)
@@ -43,6 +43,9 @@
import org.jboss.logging.Logger;
import org.jboss.ws.core.jaxws.client.ClientImpl;
+import org.jboss.ws.core.server.netty.NettyCallbackHandler;
+import org.jboss.ws.core.server.netty.NettyHttpServer;
+import org.jboss.ws.core.server.netty.NettyHttpServerFactory;
import org.jboss.ws.extensions.addressing.AddressingClientUtil;
import org.jboss.ws.extensions.wsrm.config.RMConfig;
import org.jboss.ws.extensions.wsrm.api.RMException;
@@ -50,6 +53,7 @@
import org.jboss.ws.extensions.wsrm.protocol.RMProvider;
import org.jboss.ws.extensions.wsrm.protocol.spi.RMIncompleteSequenceBehavior;
import org.jboss.ws.extensions.wsrm.transport.RMUnassignedMessageListener;
+import org.jboss.ws.extensions.wsrm.transport.backchannel.RMRequestHandlerFactory;
import org.jboss.wsf.common.utils.UUIDGenerator;
/**
@@ -275,6 +279,15 @@
{
throw new RMException("Unable to terminate WSRM sequence", e);
}
+ finally
+ {
+ if (this.backPort != null)
+ {
+ NettyHttpServer server = NettyHttpServerFactory.getNettyHttpServer(backPort.getPort(), RMRequestHandlerFactory.getInstance());
+ NettyCallbackHandler callback = server.getCallback(this.backPort.getPath());
+ server.unregisterCallback(callback);
+ }
+ }
}
public final void sendCloseMessage()
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/backchannel/RMCallbackHandlerFactory.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/backchannel/RMCallbackHandlerFactory.java 2009-10-17 20:53:10 UTC (rev 10948)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/backchannel/RMCallbackHandlerFactory.java 2009-10-18 00:04:03 UTC (rev 10949)
@@ -22,8 +22,6 @@
package org.jboss.ws.extensions.wsrm.transport.backchannel;
import java.net.URI;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
import org.jboss.ws.core.server.netty.NettyHttpServer;
import org.jboss.ws.core.server.netty.NettyHttpServerFactory;
@@ -37,9 +35,6 @@
*/
public final class RMCallbackHandlerFactory
{
- private static NettyHttpServer server;
- private static Lock lock = new ReentrantLock();
-
private RMCallbackHandlerFactory()
{
// no instances
@@ -47,25 +42,14 @@
public static RMCallbackHandler getCallbackHandler(URI backPort)
{
- lock.lock();
- try
+ NettyHttpServer server = NettyHttpServerFactory.getNettyHttpServer(backPort.getPort(), RMRequestHandlerFactory.getInstance());
+ RMCallbackHandler callbackHandler = (RMCallbackHandler)server.getCallback(backPort.getPath());
+ if (callbackHandler == null)
{
- if (server == null)
- {
- server = NettyHttpServerFactory.getNettyHttpServer(backPort.getPort(), RMRequestHandlerFactory.getInstance());
- }
- RMCallbackHandler callbackHandler = (RMCallbackHandler)server.getCallback(backPort.getPath());
- if (callbackHandler == null)
- {
- callbackHandler = new RMCallbackHandlerImpl(backPort.getPath());
- server.registerCallback(callbackHandler);
- }
-
- return callbackHandler;
+ callbackHandler = new RMCallbackHandlerImpl(backPort.getPath());
+ server.registerCallback(callbackHandler);
}
- finally
- {
- lock.unlock();
- }
+
+ return callbackHandler;
}
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/backchannel/RMRequestHandlerFactory.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/backchannel/RMRequestHandlerFactory.java 2009-10-17 20:53:10 UTC (rev 10948)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/transport/backchannel/RMRequestHandlerFactory.java 2009-10-18 00:04:03 UTC (rev 10949)
@@ -28,7 +28,7 @@
*
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
-final class RMRequestHandlerFactory implements NettyRequestHandlerFactory<RMRequestHandlerImpl>
+public final class RMRequestHandlerFactory implements NettyRequestHandlerFactory<RMRequestHandlerImpl>
{
private static final NettyRequestHandlerFactory<RMRequestHandlerImpl> SINGLETON = new RMRequestHandlerFactory();
15 years, 2 months
JBossWS SVN: r10948 - stack/native/trunk.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-10-17 16:53:10 -0400 (Sat, 17 Oct 2009)
New Revision: 10948
Modified:
stack/native/trunk/.classpath
Log:
fixing project classpath
Modified: stack/native/trunk/.classpath
===================================================================
--- stack/native/trunk/.classpath 2009-10-17 04:03:31 UTC (rev 10947)
+++ stack/native/trunk/.classpath 2009-10-17 20:53:10 UTC (rev 10948)
@@ -4,7 +4,6 @@
<classpathentry kind="src" path="modules/testsuite/native-tests/src/test/java"/>
<classpathentry kind="src" output="modules/saaj/target/classes" path="modules/saaj/src/main/java"/>
<classpathentry kind="src" output="modules/jaxrpc/target/classes" path="modules/jaxrpc/src/main/java"/>
- <classpathentry kind="src" output="modules/jaxws/target/classes" path="modules/jaxws/src/main/java"/>
<classpathentry kind="src" output="modules/jaxws-ext/target/classes" path="modules/jaxws-ext/src/main/java"/>
<classpathentry kind="src" output="modules/core/target/classes" path="modules/core/src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
15 years, 2 months