JBossWS SVN: r10129 - common/trunk/src/main/java/org/jboss/wsf/test.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-05-28 03:43:15 -0400 (Thu, 28 May 2009)
New Revision: 10129
Modified:
common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTest.java
common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
Log:
adding AS 5.2.x support
Modified: common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTest.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTest.java 2009-05-28 07:29:35 UTC (rev 10128)
+++ common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTest.java 2009-05-28 07:43:15 UTC (rev 10129)
@@ -68,7 +68,7 @@
{
super(name);
}
-
+
/**
* Execute <b>command</b> in separate process.
* @param command command to execute
@@ -78,7 +78,7 @@
{
this.executeCommand(command, null, null, null);
}
-
+
/**
* Execute <b>command</b> in separate process. If process will fail, display custom <b>message</b> in assertion.
* @param command command to execute
@@ -89,7 +89,7 @@
{
this.executeCommand(command, null, message, null);
}
-
+
/**
* Execute <b>command</b> in separate process, copy process input to <b>os</b>.
* @param command command to execute
@@ -125,10 +125,10 @@
{
if (command == null)
throw new NullPointerException( "Command cannot be null" );
-
+
System.out.println("Executing command: " + command);
log.debug("Executing command: " + command);
-
+
StringTokenizer st = new StringTokenizer(command, " \t\r");
List<String> tokenizedCommand = new LinkedList<String>();
while (st.hasMoreTokens())
@@ -136,7 +136,7 @@
// PRECONDITION: command doesn't contain whitespaces in the paths
tokenizedCommand.add(st.nextToken());
}
-
+
try
{
this.executeCommand(tokenizedCommand, os, message, env);
@@ -201,12 +201,17 @@
{
return delegate.isTargetJBoss5();
}
-
+
public boolean isTargetJBoss51()
{
return delegate.isTargetJBoss51();
}
+ public boolean isTargetJBoss52()
+ {
+ return delegate.isTargetJBoss52();
+ }
+
public boolean isTargetJBoss50()
{
return delegate.isTargetJBoss50();
@@ -216,7 +221,7 @@
{
return delegate.isTargetJBoss6();
}
-
+
public boolean isTargetJBoss61()
{
return delegate.isTargetJBoss61();
Modified: common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2009-05-28 07:29:35 UTC (rev 10128)
+++ common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2009-05-28 07:43:15 UTC (rev 10129)
@@ -78,7 +78,7 @@
/** True, if -Djbossws.integration.target=jboss5x */
public boolean isTargetJBoss5()
{
- return isTargetJBoss51() || isTargetJBoss50();
+ return isTargetJBoss52() || isTargetJBoss51() || isTargetJBoss50();
}
/** True, if -Djbossws.integration.target=jboss50x */
@@ -95,6 +95,13 @@
return target.startsWith("jboss51");
}
+ /** True, if -Djbossws.integration.target=jboss52x */
+ public boolean isTargetJBoss52()
+ {
+ String target = getIntegrationTarget();
+ return target.startsWith("jboss52");
+ }
+
/** True, if -Djbossws.integration.target=jboss6x */
public boolean isTargetJBoss6()
{
@@ -219,7 +226,9 @@
if (jbossVersion == null)
throw new IllegalStateException("Cannot obtain jboss version");
- if (jbossVersion.startsWith("5.1"))
+ if (jbossVersion.startsWith("5.2"))
+ jbossVersion = "jboss52";
+ else if (jbossVersion.startsWith("5.1"))
jbossVersion = "jboss51";
else if (jbossVersion.startsWith("5.0"))
jbossVersion = "jboss50";
15 years, 7 months
JBossWS SVN: r10128 - in framework/trunk/testsuite/test: resources/jaxws/smoke/tools/wsrunclient and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-05-28 03:29:35 -0400 (Thu, 28 May 2009)
New Revision: 10128
Modified:
framework/trunk/testsuite/test/ant-import/build-testsuite.xml
framework/trunk/testsuite/test/resources/jaxws/smoke/tools/wsrunclient/jars.txt
Log:
adding AS 5.2.x support
Modified: framework/trunk/testsuite/test/ant-import/build-testsuite.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-testsuite.xml 2009-05-27 15:38:31 UTC (rev 10127)
+++ framework/trunk/testsuite/test/ant-import/build-testsuite.xml 2009-05-28 07:29:35 UTC (rev 10128)
@@ -24,6 +24,9 @@
<condition property="jboss.home" value="${jboss510.home}">
<equals arg1="${jbossws.integration.target}" arg2="jboss510"/>
</condition>
+ <condition property="jboss.home" value="${jboss520.home}">
+ <equals arg1="${jbossws.integration.target}" arg2="jboss520"/>
+ </condition>
<condition property="jboss.home" value="${jboss600.home}">
<equals arg1="${jbossws.integration.target}" arg2="jboss600"/>
</condition>
@@ -108,7 +111,7 @@
</tstamp>
</target>
- <target name="tests-classpath" depends="tests-classpath-jboss60,tests-classpath-jboss51,tests-classpath-jboss50">
+ <target name="tests-classpath" depends="tests-classpath-jboss60,tests-classpath-jboss52,tests-classpath-jboss51,tests-classpath-jboss50">
<path id="tests.javac.classpath">
<path refid="ws.stack.classpath"/>
<path refid="tests.extra.classpath"/>
@@ -278,6 +281,84 @@
</path>
</target>
+ <target name="tests-classpath-jboss52" depends="tests-prepare" if="jbossws.integration.jboss52">
+
+ <path id="integration.target.javac.classpath">
+ <pathelement location="${jboss.client}/activation.jar"/>
+ <pathelement location="${jboss.client}/jaxws-tools.jar"/>
+ <pathelement location="${jboss.client}/jboss-annotations-ejb3.jar"/>
+ <pathelement location="${jboss.client}/jboss-appclient.jar"/>
+ <pathelement location="${jboss.client}/jboss-common-core.jar"/>
+ <pathelement location="${jboss.client}/jboss-ejb3-client.jar"/>
+ <pathelement location="${jboss.client}/jboss-ejb3-ext-api.jar"/>
+ <pathelement location="${jboss.client}/jboss-logging-spi.jar"/>
+ <pathelement location="${jboss.client}/jboss-metadata.jar"/>
+ <pathelement location="${jboss.client}/jboss-remoting.jar"/>
+ <pathelement location="${jboss.client}/jboss-wsit-tools.jar"/>
+ <pathelement location="${jboss.client}/jboss-xml-binding.jar"/>
+ <pathelement location="${jboss.client}/mail.jar"/>
+ <pathelement location="${jboss.client}/stax-api.jar"/>
+ <pathelement location="${jboss.client}/wsdl4j.jar"/>
+ <pathelement location="${jboss.server.lib}/jboss-javaee.jar"/>
+ <pathelement location="${jboss.server.lib}/jbosssx.jar"/>
+ <pathelement location="${jboss.server.lib}/servlet-api.jar"/>
+ </path>
+
+ <!--
+ The 's.client.classpath' contains jars that are available in the target container's client directory.
+ There jars apply to all supported stacks. It MUST NOT contains jars from a local thirdparty dir.
+
+ The 'ws.stack.classpath' contains jars that come with a specific stack distribution.
+ The 's.extra.classpath' contains stack specific jars that are needed to run the stack specific tests.
+ -->
+ <path id="integration.target.client.classpath">
+ <pathelement location="${jboss.client}/activation.jar"/>
+ <pathelement location="${jboss.client}/javassist.jar"/>
+ <pathelement location="${jboss.client}/jaxb-api.jar"/>
+ <pathelement location="${jboss.client}/jaxb-impl.jar"/>
+ <pathelement location="${jboss.client}/jaxb-xjc.jar"/>
+ <pathelement location="${jboss.client}/jaxws-tools.jar"/>
+ <pathelement location="${jboss.client}/jboss-appclient.jar"/>
+ <pathelement location="${jboss.client}/jboss-container-metadata.jar"/>
+ <pathelement location="${jboss.client}/jboss-ejb3-ext-api.jar"/>
+ <pathelement location="${jboss.client}/jboss-metadata.jar"/>
+ <pathelement location="${jboss.client}/jboss-remoting.jar"/>
+ <pathelement location="${jboss.client}/jboss-wsit-tools.jar"/>
+ <pathelement location="${jboss.client}/jboss-xml-binding.jar"/>
+ <pathelement location="${jboss.client}/jbossall-client.jar"/>
+ <pathelement location="${jboss.client}/jbossws-jboss520.jar"/>
+ <pathelement location="${jboss.client}/jaxws-tools.jar"/>
+ <pathelement location="${jboss.client}/jboss-wsit-tools.jar"/>
+ <pathelement location="${jboss.client}/log4j.jar"/>
+ <pathelement location="${jboss.client}/mail.jar"/>
+ <pathelement location="${jboss.client}/stax-api.jar"/>
+ <pathelement location="${jboss.client}/trove.jar"/>
+ <!-- FIXME jars should be available in the client dir -->
+ <pathelement location="${jboss.lib}/jboss-aop-jdk50.jar"/>
+ <pathelement location="${jboss.lib}/jboss-classloader.jar"/>
+ <pathelement location="${jboss.lib}/jboss-classloading.jar"/>
+ <pathelement location="${jboss.lib}/jboss-classloading-vfs.jar"/>
+ <pathelement location="${jboss.lib}/jboss-container.jar"/>
+ <pathelement location="${jboss.lib}/jboss-dependency.jar"/>
+ <pathelement location="${jboss.lib}/jboss-vfs.jar"/>
+ <pathelement location="${jboss.lib}/jboss-kernel.jar"/>
+ <pathelement location="${jboss.lib}/jboss-reflect.jar"/>
+ <pathelement location="${jboss.server.lib}/jboss.jar"/>
+ <pathelement location="${jboss.server.lib}/jbosssx.jar"/>
+ <pathelement location="${jboss.server.lib}/hibernate3.jar"/>
+ <pathelement location="${jboss.server.lib}/jnpserver.jar"/>
+ <pathelement location="${jboss.server.lib}/jboss-ejb3-core.jar"/>
+ <pathelement location="${jboss.server.lib}/hibernate-core.jar"/>
+ <pathelement location="${jboss.server.deploy}/juddi-service.sar/juddi.jar"/>
+ <pathelement location="${jboss.server.deploy}/juddi-service.sar/juddi-saaj.jar"/>
+ <pathelement location="${jboss.server.deploy}/juddi-service.sar/scout.jar"/>
+ <pathelement location="${tools.jar}"/>
+ <!-- WS-RM backports server dependencies -->
+ <pathelement location="${jboss.server.deploy}/jbossweb.sar/jbossweb.jar"/>
+ <pathelement location="${jboss.server.deployers}/jbossweb.deployer/jbossweb.jar"/>
+ </path>
+ </target>
+
<target name="tests-classpath-jboss60" depends="tests-prepare" if="jbossws.integration.jboss60">
<path id="integration.target.javac.classpath">
@@ -323,7 +404,7 @@
<pathelement location="${jboss.client}/jboss-wsit-tools.jar"/>
<pathelement location="${jboss.client}/jboss-xml-binding.jar"/>
<pathelement location="${jboss.client}/jbossall-client.jar"/>
- <pathelement location="${jboss.client}/jbossws-jboss510.jar"/>
+ <pathelement location="${jboss.client}/jbossws-jboss600.jar"/>
<pathelement location="${jboss.client}/jaxws-tools.jar"/>
<pathelement location="${jboss.client}/jboss-wsit-tools.jar"/>
<pathelement location="${jboss.client}/log4j.jar"/>
Modified: framework/trunk/testsuite/test/resources/jaxws/smoke/tools/wsrunclient/jars.txt
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/smoke/tools/wsrunclient/jars.txt 2009-05-27 15:38:31 UTC (rev 10127)
+++ framework/trunk/testsuite/test/resources/jaxws/smoke/tools/wsrunclient/jars.txt 2009-05-28 07:29:35 UTC (rev 10128)
@@ -1,7 +1,7 @@
-jbossws-jboss423.jar
jbossws-jboss50.jar
jbossws-jboss500.jar
jbossws-jboss501.jar
jbossws-jboss510.jar
+jbossws-jboss520.jar
jbossws-jboss60.jar
jbossws-jboss600.jar
15 years, 7 months
JBossWS SVN: r10127 - in projects/interop/cxf/noemax/FastInfosetTest: src/main/java/org/jboss/test/ws/fastinfoset and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-05-27 11:38:31 -0400 (Wed, 27 May 2009)
New Revision: 10127
Modified:
projects/interop/cxf/noemax/FastInfosetTest/.classpath
projects/interop/cxf/noemax/FastInfosetTest/libraries.xml
projects/interop/cxf/noemax/FastInfosetTest/src/main/java/org/jboss/test/ws/fastinfoset/NoemaxClient.java
Log:
- [JBWS-2538] Updating testcase to run all Noemax tests (now that FastInfoset fix is included)
- Update classpath/libraries
Modified: projects/interop/cxf/noemax/FastInfosetTest/.classpath
===================================================================
--- projects/interop/cxf/noemax/FastInfosetTest/.classpath 2009-05-27 14:10:37 UTC (rev 10126)
+++ projects/interop/cxf/noemax/FastInfosetTest/.classpath 2009-05-27 15:38:31 UTC (rev 10127)
@@ -28,5 +28,10 @@
<classpathentry kind="lib" path="/dati/jboss-5.0.1.GA/client/cxf-rt-ws-rm.jar"/>
<classpathentry kind="lib" path="/dati/jboss-5.0.1.GA/client/cxf-rt-ws-security.jar"/>
<classpathentry kind="lib" path="/dati/jboss-5.0.1.GA/client/cxf-api.jar"/>
+ <classpathentry kind="lib" path="/dati/jboss-5.0.1.GA/client/jaxb-impl.jar"/>
+ <classpathentry kind="lib" path="/dati/jboss-5.0.1.GA/client/jaxb-xjc.jar"/>
+ <classpathentry kind="lib" path="/dati/jboss-5.0.1.GA/client/cxf-common-schemas.jar"/>
+ <classpathentry kind="lib" path="/dati/jboss-5.0.1.GA/client/cxf-common-utilities.jar"/>
+ <classpathentry kind="lib" path="/dati/jboss-5.0.1.GA/client/FastInfoset.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: projects/interop/cxf/noemax/FastInfosetTest/libraries.xml
===================================================================
--- projects/interop/cxf/noemax/FastInfosetTest/libraries.xml 2009-05-27 14:10:37 UTC (rev 10126)
+++ projects/interop/cxf/noemax/FastInfosetTest/libraries.xml 2009-05-27 15:38:31 UTC (rev 10127)
@@ -15,6 +15,12 @@
<pathelement location="${project.jboss.home}/client/geronimo-ws-metadata_2.0_spec.jar"/>
<pathelement location="${project.jboss.home}/client/activation.jar"/>
<pathelement location="${project.jboss.home}/client/jaxws-tools.jar"/>
+<pathelement location="${project.jboss.home}/client/jaxb-api.jar"/>
+<pathelement location="${project.jboss.home}/client/jaxb-impl.jar"/>
+<pathelement location="${project.jboss.home}/client/jaxb-xjc.jar"/>
+<pathelement location="${project.jboss.home}/client/FastInfoset.jar"/>
+<pathelement location="${project.jboss.home}/client/cxf-common-schemas.jar"/>
+<pathelement location="${project.jboss.home}/client/cxf-common-utilities.jar"/>
<pathelement location="${project.jboss.home}/client/jboss-annotations-ejb3.jar"/>
<pathelement location="${project.jboss.home}/client/jboss-appclient.jar"/>
<pathelement location="${project.jboss.home}/client/jboss-common-core.jar"/>
Modified: projects/interop/cxf/noemax/FastInfosetTest/src/main/java/org/jboss/test/ws/fastinfoset/NoemaxClient.java
===================================================================
--- projects/interop/cxf/noemax/FastInfosetTest/src/main/java/org/jboss/test/ws/fastinfoset/NoemaxClient.java 2009-05-27 14:10:37 UTC (rev 10126)
+++ projects/interop/cxf/noemax/FastInfosetTest/src/main/java/org/jboss/test/ws/fastinfoset/NoemaxClient.java 2009-05-27 15:38:31 UTC (rev 10127)
@@ -92,16 +92,16 @@
echo();
System.out.println("Echo");
echo();
-// System.out.println("EchoStruct");
-// echoStruct();
+ System.out.println("EchoStruct");
+ echoStruct();
System.out.println("SendStruct");
sendStruct();
System.out.println("GetStruct");
getStruct();
System.out.println("SendOrder");
sendOrder();
-// System.out.println("GetOrder");
-// getOrder();
+ System.out.println("GetOrder");
+ getOrder();
}
private void echo() throws Exception
15 years, 7 months
JBossWS SVN: r10126 - stack/cxf/branches/jbossws-cxf-3.1.2.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-05-27 10:10:37 -0400 (Wed, 27 May 2009)
New Revision: 10126
Modified:
stack/cxf/branches/jbossws-cxf-3.1.2/pom.xml
Log:
[JBWS-2597] Using FastInfoset 1.2.6
Modified: stack/cxf/branches/jbossws-cxf-3.1.2/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.1.2/pom.xml 2009-05-27 14:09:40 UTC (rev 10125)
+++ stack/cxf/branches/jbossws-cxf-3.1.2/pom.xml 2009-05-27 14:10:37 UTC (rev 10126)
@@ -59,7 +59,7 @@
<cxf.anttasks.version>2.1.5</cxf.anttasks.version>
<cxf.stax.version>1.0.1</cxf.stax.version>
<cxf.asm.version>2.2.3</cxf.asm.version>
- <fastinfoset.api.version>1.2.3</fastinfoset.api.version>
+ <fastinfoset.api.version>1.2.6</fastinfoset.api.version>
<jboss.common.version>1.2.1.GA</jboss.common.version>
<jaxb.api.version>2.1</jaxb.api.version>
<jaxb.impl.version>2.1.9</jaxb.impl.version>
15 years, 7 months
JBossWS SVN: r10125 - stack/cxf/trunk.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-05-27 10:09:40 -0400 (Wed, 27 May 2009)
New Revision: 10125
Modified:
stack/cxf/trunk/pom.xml
Log:
[JBWS-2597] Using FastInfoset 1.2.6
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2009-05-27 10:25:48 UTC (rev 10124)
+++ stack/cxf/trunk/pom.xml 2009-05-27 14:09:40 UTC (rev 10125)
@@ -59,7 +59,7 @@
<cxf.anttasks.version>2.1.5</cxf.anttasks.version>
<cxf.stax.version>1.0.1</cxf.stax.version>
<cxf.asm.version>2.2.3</cxf.asm.version>
- <fastinfoset.api.version>1.2.3</fastinfoset.api.version>
+ <fastinfoset.api.version>1.2.6</fastinfoset.api.version>
<jboss.common.version>1.2.1.GA</jboss.common.version>
<jaxb.api.version>2.1</jaxb.api.version>
<jaxb.impl.version>2.1.9</jaxb.impl.version>
15 years, 7 months
JBossWS SVN: r10124 - in stack/native/trunk/modules/testsuite/native-tests: src/test/java/org/jboss/test/ws/jaxws/samples and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-05-27 06:25:48 -0400 (Wed, 27 May 2009)
New Revision: 10124
Removed:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/wsaddressing/
Modified:
stack/native/trunk/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml
Log:
[JBWS-2657] Removing testcase from native (it's covered in framework now)
Modified: stack/native/trunk/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml 2009-05-27 10:14:39 UTC (rev 10123)
+++ stack/native/trunk/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml 2009-05-27 10:25:48 UTC (rev 10124)
@@ -212,16 +212,6 @@
prefix="WEB-INF/wsdl"/>
</war>
- <!-- jaxws-samples-wsaddressing -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-samples-wsaddressing.war" webxml="${tests.output.dir}/test-resources/jaxws/samples/wsaddressing/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/samples/wsaddressing/StatefulEndpointImpl.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/wsaddressing/StatefulEndpoint.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/wsaddressing/ServerHandler.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/wsaddressing/jaxws-handlers.xml"/>
- </classes>
- </war>
-
<!-- jaxws-samples-wseventing -->
<war warfile="${tests.output.dir}/test-libs/jaxws-samples-wseventing.war" webxml="${tests.output.dir}/test-resources/jaxws/samples/wseventing/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
15 years, 7 months
JBossWS SVN: r10123 - stack/metro/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-05-27 06:14:39 -0400 (Wed, 27 May 2009)
New Revision: 10123
Modified:
stack/metro/trunk/modules/testsuite/test-excludes-jboss500.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt
Log:
[JBWS-2102][JBWS-2657] Excluding tests in Metro
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss500.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss500.txt 2009-05-27 10:11:13 UTC (rev 10122)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss500.txt 2009-05-27 10:14:39 UTC (rev 10123)
@@ -9,6 +9,9 @@
org/jboss/test/ws/jaxws/samples/xop/doclit/XOPWrapped*.*
org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMFeatureTestCase.*
+# [JBWS-2102] JSR-261 impl not available in Metro
+org/jboss/test/ws/jaxws/samples/addressing/**
+
# [JBWS-2596] Resource injection in jaxws endpoints and handlers
org/jboss/test/ws/jaxws/jbws2074/**
org/jboss/test/ws/jaxws/jbws2634/**
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt 2009-05-27 10:11:13 UTC (rev 10122)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt 2009-05-27 10:14:39 UTC (rev 10123)
@@ -9,6 +9,9 @@
org/jboss/test/ws/jaxws/samples/xop/doclit/XOPWrapped*.*
org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMFeatureTestCase.*
+# [JBWS-2102] JSR-261 impl not available in Metro
+org/jboss/test/ws/jaxws/samples/addressing/**
+
# [JBWS-2596] Resource injection in jaxws endpoints and handlers
org/jboss/test/ws/jaxws/jbws2074/**
org/jboss/test/ws/jaxws/jbws2634/**
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt 2009-05-27 10:11:13 UTC (rev 10122)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt 2009-05-27 10:14:39 UTC (rev 10123)
@@ -9,6 +9,9 @@
org/jboss/test/ws/jaxws/samples/xop/doclit/XOPWrapped*.*
org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMFeatureTestCase.*
+# [JBWS-2102] JSR-261 impl not available in Metro
+org/jboss/test/ws/jaxws/samples/addressing/**
+
# [JBWS-2596] Resource injection in jaxws endpoints and handlers
org/jboss/test/ws/jaxws/jbws2074/**
org/jboss/test/ws/jaxws/jbws2634/**
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt 2009-05-27 10:11:13 UTC (rev 10122)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt 2009-05-27 10:14:39 UTC (rev 10123)
@@ -9,6 +9,9 @@
org/jboss/test/ws/jaxws/samples/xop/doclit/XOPWrapped*.*
org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMFeatureTestCase.*
+# [JBWS-2102] JSR-261 impl not available in Metro
+org/jboss/test/ws/jaxws/samples/addressing/**
+
# [JBWS-2596] Resource injection in jaxws endpoints and handlers
org/jboss/test/ws/jaxws/jbws2074/**
org/jboss/test/ws/jaxws/jbws2634/**
15 years, 7 months
JBossWS SVN: r10122 - framework/trunk/testsuite/test/resources/jaxws/smoke/tools/wsrunclient.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-05-27 06:11:13 -0400 (Wed, 27 May 2009)
New Revision: 10122
Modified:
framework/trunk/testsuite/test/resources/jaxws/smoke/tools/wsrunclient/tests.txt
Log:
removing test from wsrunclient test case
Modified: framework/trunk/testsuite/test/resources/jaxws/smoke/tools/wsrunclient/tests.txt
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/smoke/tools/wsrunclient/tests.txt 2009-05-27 10:09:51 UTC (rev 10121)
+++ framework/trunk/testsuite/test/resources/jaxws/smoke/tools/wsrunclient/tests.txt 2009-05-27 10:11:13 UTC (rev 10122)
@@ -1,4 +1,3 @@
-org.jboss.test.ws.jaxws.samples.oneway.OneWayTestCase
org.jboss.test.ws.jaxws.samples.webparam.WebParamTestCase
org.jboss.test.ws.jaxws.samples.webmethod.WebMethodTestCase
org.jboss.test.ws.jaxws.samples.webresult.WebResultTestCase
15 years, 7 months
JBossWS SVN: r10121 - framework/branches/jbossws-framework-3.1.2/testsuite/test/resources/jaxws/smoke/tools/wsrunclient.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-05-27 06:09:51 -0400 (Wed, 27 May 2009)
New Revision: 10121
Modified:
framework/branches/jbossws-framework-3.1.2/testsuite/test/resources/jaxws/smoke/tools/wsrunclient/tests.txt
Log:
removing test from wsrunclient test case
Modified: framework/branches/jbossws-framework-3.1.2/testsuite/test/resources/jaxws/smoke/tools/wsrunclient/tests.txt
===================================================================
--- framework/branches/jbossws-framework-3.1.2/testsuite/test/resources/jaxws/smoke/tools/wsrunclient/tests.txt 2009-05-27 10:09:38 UTC (rev 10120)
+++ framework/branches/jbossws-framework-3.1.2/testsuite/test/resources/jaxws/smoke/tools/wsrunclient/tests.txt 2009-05-27 10:09:51 UTC (rev 10121)
@@ -1,4 +1,3 @@
-org.jboss.test.ws.jaxws.samples.oneway.OneWayTestCase
org.jboss.test.ws.jaxws.samples.webparam.WebParamTestCase
org.jboss.test.ws.jaxws.samples.webmethod.WebMethodTestCase
org.jboss.test.ws.jaxws.samples.webresult.WebResultTestCase
15 years, 7 months
JBossWS SVN: r10120 - in framework/trunk/testsuite/test: java/org/jboss/test/ws/jaxws/samples and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-05-27 06:09:38 -0400 (Wed, 27 May 2009)
New Revision: 10120
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/AddressingPort.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/AddressingStatefulTestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/ServerHandler.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/StatefulEndpoint.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/StatefulEndpointImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/jaxws-handlers.xml
framework/trunk/testsuite/test/resources/jaxws/samples/addressing/
framework/trunk/testsuite/test/resources/jaxws/samples/addressing/META-INF/
framework/trunk/testsuite/test/resources/jaxws/samples/addressing/META-INF/wsdl/
framework/trunk/testsuite/test/resources/jaxws/samples/addressing/META-INF/wsdl/TestService.wsdl
framework/trunk/testsuite/test/resources/jaxws/samples/addressing/WEB-INF/
framework/trunk/testsuite/test/resources/jaxws/samples/addressing/WEB-INF/web.xml
Modified:
framework/trunk/testsuite/test/ant-import/build-samples-jaxws.xml
Log:
[JBWS-2657] Adding testcase
Modified: framework/trunk/testsuite/test/ant-import/build-samples-jaxws.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-samples-jaxws.xml 2009-05-27 09:53:36 UTC (rev 10119)
+++ framework/trunk/testsuite/test/ant-import/build-samples-jaxws.xml 2009-05-27 10:09:38 UTC (rev 10120)
@@ -18,6 +18,16 @@
<mkdir dir="${tests.output.dir}/test-libs"/>
+ <!-- jaxws-samples-addressing -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-samples-wsaddressing.war" webxml="${tests.output.dir}/test-resources/jaxws/samples/addressing/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/samples/addressing/StatefulEndpointImpl.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/addressing/StatefulEndpoint.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/addressing/ServerHandler.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/addressing/jaxws-handlers.xml"/>
+ </classes>
+ </war>
+
<!-- jaxws-samples-asynchronous -->
<war warfile="${tests.output.dir}/test-libs/jaxws-samples-asynchronous.war" webxml="${tests.output.dir}/test-resources/jaxws/samples/asynchronous/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/AddressingPort.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/AddressingPort.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/AddressingPort.java 2009-05-27 10:09:38 UTC (rev 10120)
@@ -0,0 +1,167 @@
+/*
+ * 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.addressing;
+
+import java.io.IOException;
+import java.rmi.RemoteException;
+import java.util.Map;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.common.addressing.MAP;
+import org.jboss.wsf.common.addressing.MAPBuilder;
+import org.jboss.wsf.common.addressing.MAPBuilderFactory;
+import org.jboss.wsf.common.addressing.MAPConstants;
+import org.jboss.wsf.common.addressing.MAPEndpoint;
+import org.jboss.wsf.common.utils.UUIDGenerator;
+import org.w3c.dom.Element;
+
+/**
+ * This is a wrapper around the StatefulEndpoint port, setting / handling client IDs
+ * using WS-Addressing (common JSR-261 API).
+ *
+ * The work performed by this class cannot always be done simply using
+ * handlers on client side. That's because (for instance) CXF's
+ * ws-addressing interceptors run before user provided handlers
+ * when dealing with outbound client messages.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 27-May-2009
+ *
+ */
+public class AddressingPort implements StatefulEndpoint
+{
+ private static Logger log = Logger.getLogger(AddressingPort.class);
+ private static final QName IDQN = StatefulEndpointImpl.IDQN;
+ private StatefulEndpoint port;
+ private static int maxClientId;
+ private String clientID;
+
+ public AddressingPort(StatefulEndpoint port)
+ {
+ this.port = port;
+ }
+
+
+ public void addItem(String item) throws RemoteException
+ {
+ setClientID();
+ port.addItem(item);
+ readClientID();
+ }
+
+ public void checkout() throws RemoteException
+ {
+ setClientID();
+ port.checkout();
+ readClientID();
+ }
+
+ public String getItems() throws RemoteException
+ {
+ setClientID();
+ String result = port.getItems();
+ readClientID();
+ return result;
+ }
+
+ /**
+ * This installs the ID for this client in the outbound messages
+ */
+ private void setClientID()
+ {
+ BindingProvider bindingProvider = (BindingProvider)port;
+ Map<String, Object> msgContext = bindingProvider.getRequestContext();
+ MAPBuilder builder = MAPBuilderFactory.getInstance().getBuilderInstance();
+ MAPConstants ADDR = builder.newConstants();
+ MAP outProps = builder.newMap();
+ outProps.setTo("uri:jaxrpc-samples-wsaddressing/TestService");
+ outProps.setAction("http://org.jboss.ws/addressing/stateful/action");
+ MAPEndpoint replyTo = builder.newEndpoint(ADDR.getAnonymousURI());
+ outProps.setReplyTo(replyTo);
+ outProps.setMessageID("urn:uuid:" + UUIDGenerator.generateRandomUUIDString());
+ // Assign a new clientid
+ if (clientID == null)
+ {
+ clientID = "clientid-" + (++maxClientId);
+ log.info("New clientid: " + clientID);
+ }
+ try
+ {
+ replyTo.addReferenceParameter(DOMUtils.parse(getClientIdElement(clientID)));
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException(e);
+ }
+ outProps.installOutboundMapOnClientSide(msgContext, outProps);
+ }
+
+ /**
+ * This verifies the client ID is available in inbound messages
+ */
+ @SuppressWarnings("unchecked")
+ private void readClientID()
+ {
+ BindingProvider bindingProvider = (BindingProvider)port;
+ Map<String, Object> msgContext = bindingProvider.getResponseContext();
+ MAPBuilder builder = MAPBuilderFactory.getInstance().getBuilderInstance();
+ MAP addrProps = builder.inboundMap(msgContext);
+ if (addrProps == null)
+ throw new IllegalStateException("Cannot obtain AddressingProperties");
+ for (Object obj : addrProps.getReferenceParameters())
+ {
+ if (obj instanceof Element) //Native always uses Element for ref params
+ {
+ Element el = (Element)obj;
+ QName qname = DOMUtils.getElementQName(el);
+ if (qname.equals(IDQN))
+ {
+ clientID = DOMUtils.getTextContent(el);
+ }
+ }
+ else if (obj instanceof JAXBElement) //CXF also uses JAXBElement
+ {
+ JAXBElement<String> el = (JAXBElement<String>)obj;
+ if (IDQN.equals(el.getName()))
+ {
+ clientID = el.getValue();
+ }
+ }
+ }
+ if (clientID == null)
+ throw new IllegalStateException("Cannot obtain clientid");
+ }
+
+ private static String getClientIdElement(String clientid)
+ {
+ String qualname = IDQN.getPrefix() + ":" + IDQN.getLocalPart();
+ StringBuffer buffer = new StringBuffer("<" + qualname);
+ buffer.append(" xmlns:" + IDQN.getPrefix() + "='" + IDQN.getNamespaceURI() + "'");
+ buffer.append(">" + clientid + "</" + qualname + ">");
+ return buffer.toString();
+ }
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/AddressingPort.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/AddressingStatefulTestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/AddressingStatefulTestCase.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/AddressingStatefulTestCase.java 2009-05-27 10:09:38 UTC (rev 10120)
@@ -0,0 +1,95 @@
+/*
+ * 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.addressing;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.soap.AddressingFeature;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * Test stateful endpoint using ws-addressing
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author alessio.soldano(a)jboss.com
+ * @since 24-Nov-2005
+ */
+public class AddressingStatefulTestCase extends JBossWSTest
+{
+ private static AddressingPort port1;
+ private static AddressingPort port2;
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(AddressingStatefulTestCase.class, "jaxws-samples-wsaddressing.war");
+ }
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ if (port1 == null || port2 == null)
+ {
+ URL wsdlURL = new URL(" http://" + getServerHost() + ":8080/jaxws-samples-wsaddressing/TestService?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/samples/wsaddressing", "TestService");
+
+ Service service1 = Service.create(wsdlURL, serviceName);
+ port1 = new AddressingPort(service1.getPort(StatefulEndpoint.class, new AddressingFeature(true, true)));
+
+ Service service2 = Service.create(wsdlURL, serviceName);
+ port2 = new AddressingPort(service2.getPort(StatefulEndpoint.class, new AddressingFeature(true, true)));
+ }
+ }
+
+ public void testAddItem() throws Exception
+ {
+ port1.addItem("Ice Cream");
+ port1.addItem("Ferrari");
+
+ port2.addItem("Mars Bar");
+ port2.addItem("Porsche");
+ }
+
+ public void testGetItems() throws Exception
+ {
+ String items1 = port1.getItems();
+ assertEquals("[Ice Cream, Ferrari]", items1);
+
+ String items2 = port2.getItems();
+ assertEquals("[Mars Bar, Porsche]", items2);
+ }
+
+ public void testCheckout() throws Exception
+ {
+ port1.checkout();
+ assertEquals("[]", port1.getItems());
+
+ port2.checkout();
+ assertEquals("[]", port2.getItems());
+ }
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/AddressingStatefulTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/ServerHandler.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/ServerHandler.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/ServerHandler.java 2009-05-27 10:09:38 UTC (rev 10120)
@@ -0,0 +1,105 @@
+/*
+ * 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.addressing;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.MessageContext.Scope;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.common.addressing.MAP;
+import org.jboss.wsf.common.addressing.MAPBuilder;
+import org.jboss.wsf.common.addressing.MAPBuilderFactory;
+import org.jboss.wsf.common.addressing.MAPEndpoint;
+import org.jboss.wsf.common.handler.GenericSOAPHandler;
+import org.w3c.dom.Element;
+
+/**
+ * A server side handler for the ws-addressing
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 24-Nov-2005
+ */
+public class ServerHandler extends GenericSOAPHandler
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(ServerHandler.class);
+
+ private static final QName IDQN = StatefulEndpointImpl.IDQN;
+
+ @Override
+ public boolean handleInbound(MessageContext msgContext)
+ {
+ log.info("handleRequest");
+
+ MAPBuilder builder = MAPBuilderFactory.getInstance().getBuilderInstance();
+ MAP addrProps = builder.inboundMap(msgContext);
+
+ if (addrProps == null)
+ throw new IllegalStateException("Cannot obtain AddressingProperties");
+
+ String clientid = null;
+ MAPEndpoint replyTo = addrProps.getReplyTo();
+ for (Object obj :replyTo.getReferenceParameters())
+ {
+ if (obj instanceof Element)
+ {
+ Element el = (Element)obj;
+ QName qname = DOMUtils.getElementQName(el);
+ if (qname.equals(IDQN))
+ {
+ clientid = DOMUtils.getTextContent(el);
+ }
+ }
+ else
+ {
+ log.warn("Unsupported reference parameter found: " + obj);
+ }
+ }
+
+ if (clientid == null)
+ throw new IllegalStateException("Cannot obtain client id");
+
+ // put the clientid in the message context
+ msgContext.put("clientid", clientid);
+ msgContext.setScope("clientid", Scope.APPLICATION);
+ return true;
+ }
+
+ @Override
+ public boolean handleOutbound(MessageContext msgContext)
+ {
+ log.info("handleResponse");
+
+ MAPBuilder builder = MAPBuilderFactory.getInstance().getBuilderInstance();
+ MAP inProps = builder.inboundMap(msgContext);
+ MAP outProps = builder.newMap();
+ outProps.initializeAsDestination(inProps.getReplyTo());
+ outProps.setAction("http://org.jboss.ws/addressing/stateful/actionReply");
+
+ outProps.installOutboundMapOnServerSide(msgContext, outProps);
+ msgContext.setScope(builder.newConstants().getServerAddressingPropertiesOutbound(), Scope.APPLICATION);
+
+ return true;
+ }
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/ServerHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/StatefulEndpoint.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/StatefulEndpoint.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/StatefulEndpoint.java 2009-05-27 10:09:38 UTC (rev 10120)
@@ -0,0 +1,50 @@
+/*
+ * 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.addressing;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * WS-Addressing stateful service endpoint interface
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ *
+ * @since 24-Nov-2005
+ */
+@WebService(name = "StatefulEndpoint", targetNamespace = "http://org.jboss.ws/samples/wsaddressing", serviceName = "TestService")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface StatefulEndpoint extends Remote
+{
+ @WebMethod
+ public void addItem(String item) throws RemoteException;
+
+ @WebMethod
+ public void checkout() throws RemoteException;
+
+ @WebMethod
+ public String getItems() throws RemoteException;
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/StatefulEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/StatefulEndpointImpl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/StatefulEndpointImpl.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/StatefulEndpointImpl.java 2009-05-27 10:09:38 UTC (rev 10120)
@@ -0,0 +1,111 @@
+/*
+ * 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.addressing;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Resource;
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.namespace.QName;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.soap.Addressing;
+
+import org.jboss.logging.Logger;
+
+/**
+ * WS-Addressing stateful service endpoint
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 24-Nov-2005
+ */
+@WebService(name = "StatefulEndpoint", targetNamespace = "http://org.jboss.ws/samples/wsaddressing", serviceName = "TestService")
+@Addressing
+@HandlerChain(file = "jaxws-handlers.xml")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public class StatefulEndpointImpl implements StatefulEndpoint
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(StatefulEndpointImpl.class);
+
+ public static final QName IDQN = new QName("http://somens", "clientid", "ns1");
+
+ // The state map for all clients
+ private static Map<String, List<String>> clientStateMap = new HashMap<String, List<String>>();
+
+ private String clientid;
+ private static List<String> items;
+ private WebServiceContext context;
+
+ @Resource
+ public void setContext(WebServiceContext context)
+ {
+ log.info("injecting: " + context);
+ this.context = context;
+ }
+
+ @WebMethod
+ public void addItem(String item)
+ {
+ initSessionState();
+ log.info("addItem [clientid=" + clientid + "]: " + item);
+ items.add(item);
+ }
+
+ @WebMethod
+ public void checkout()
+ {
+ initSessionState();
+ log.info("checkout [clientid=" + clientid + "]");
+ clientStateMap.remove(clientid);
+ }
+
+ @WebMethod
+ public String getItems()
+ {
+ initSessionState();
+ log.info("getItems [clientid=" + clientid + "]: " + items);
+ return items.toString();
+ }
+
+ private void initSessionState()
+ {
+ MessageContext msgContext = context.getMessageContext();
+ clientid = (String)msgContext.get("clientid");
+ if (clientid == null)
+ throw new IllegalStateException("Cannot obtain clientid");
+
+ // Get the client's items
+ items = clientStateMap.get(clientid);
+ if (items == null)
+ {
+ items = new ArrayList<String>();
+ clientStateMap.put(clientid, items);
+ }
+ }
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/StatefulEndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/jaxws-handlers.xml
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/jaxws-handlers.xml (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/jaxws-handlers.xml 2009-05-27 10:09:38 UTC (rev 10120)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd">
+
+ <handler-chain>
+ <protocol-bindings>##SOAP11_HTTP</protocol-bindings>
+ <handler>
+ <handler-name>Application Server Handler</handler-name>
+ <handler-class>org.jboss.test.ws.jaxws.samples.addressing.ServerHandler</handler-class>
+ </handler>
+ </handler-chain>
+</handler-chains>
\ No newline at end of file
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/addressing/jaxws-handlers.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/resources/jaxws/samples/addressing/META-INF/wsdl/TestService.wsdl
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/samples/addressing/META-INF/wsdl/TestService.wsdl (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/samples/addressing/META-INF/wsdl/TestService.wsdl 2009-05-27 10:09:38 UTC (rev 10120)
@@ -0,0 +1,62 @@
+<definitions name='TestService' targetNamespace='http://org.jboss.ws/samples/wsaddressing' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.ws/samples/wsaddressing' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types></types>
+ <message name='StatefulEndpoint_addItem'>
+ <part name='String_1' type='xsd:string'/>
+ </message>
+ <message name='StatefulEndpoint_getItemsResponse'>
+ <part name='result' type='xsd:string'/>
+ </message>
+ <message name='StatefulEndpoint_checkout'></message>
+ <message name='StatefulEndpoint_getItems'></message>
+ <message name='StatefulEndpoint_addItemResponse'></message>
+ <message name='StatefulEndpoint_checkoutResponse'></message>
+ <portType name='StatefulEndpoint'>
+ <operation name='addItem' parameterOrder='String_1'>
+ <input message='tns:StatefulEndpoint_addItem'/>
+ <output message='tns:StatefulEndpoint_addItemResponse'/>
+ </operation>
+ <operation name='checkout'>
+ <input message='tns:StatefulEndpoint_checkout'/>
+ <output message='tns:StatefulEndpoint_checkoutResponse'/>
+ </operation>
+ <operation name='getItems'>
+ <input message='tns:StatefulEndpoint_getItems'/>
+ <output message='tns:StatefulEndpoint_getItemsResponse'/>
+ </operation>
+ </portType>
+ <binding name='StatefulEndpointBinding' type='tns:StatefulEndpoint'>
+ <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='addItem'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.ws/samples/wsaddressing' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.ws/samples/wsaddressing' use='literal'/>
+ </output>
+ </operation>
+ <operation name='checkout'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.ws/samples/wsaddressing' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.ws/samples/wsaddressing' use='literal'/>
+ </output>
+ </operation>
+ <operation name='getItems'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.ws/samples/wsaddressing' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.ws/samples/wsaddressing' use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='TestService'>
+ <port binding='tns:StatefulEndpointBinding' name='StatefulEndpointPort'>
+ <soap:address location='http://@jboss.bind.address@:8080/jaxws-samples-wsaddressing/TestService'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on: framework/trunk/testsuite/test/resources/jaxws/samples/addressing/META-INF/wsdl/TestService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/resources/jaxws/samples/addressing/WEB-INF/web.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/samples/addressing/WEB-INF/web.xml (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/samples/addressing/WEB-INF/web.xml 2009-05-27 10:09:38 UTC (rev 10120)
@@ -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>TestService</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.samples.addressing.StatefulEndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Property changes on: framework/trunk/testsuite/test/resources/jaxws/samples/addressing/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
15 years, 7 months