[jboss-svn-commits] JBL Code SVN: r21344 - in labs/jbosstm/workspace/interop: WSTFSC07-interop and 23 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Aug 4 11:55:25 EDT 2008


Author: adinn
Date: 2008-08-04 11:55:24 -0400 (Mon, 04 Aug 2008)
New Revision: 21344

Added:
   labs/jbosstm/workspace/interop/WSTFSC07-interop/
   labs/jbosstm/workspace/interop/WSTFSC07-interop/build.xml
   labs/jbosstm/workspace/interop/WSTFSC07-interop/dd/
   labs/jbosstm/workspace/interop/WSTFSC07-interop/dd/sc007/
   labs/jbosstm/workspace/interop/WSTFSC07-interop/dd/sc007/build.sh
   labs/jbosstm/workspace/interop/WSTFSC07-interop/dd/sc007/initiatorhandlers.xml
   labs/jbosstm/workspace/interop/WSTFSC07-interop/dd/sc007/participanthandlers.xml
   labs/jbosstm/workspace/interop/WSTFSC07-interop/dd/sc007/wsdl/
   labs/jbosstm/workspace/interop/WSTFSC07-interop/dd/sc007/wsdl/sc007.wsdl
   labs/jbosstm/workspace/interop/WSTFSC07-interop/lib/
   labs/jbosstm/workspace/interop/WSTFSC07-interop/lib/commons-logging.jar
   labs/jbosstm/workspace/interop/WSTFSC07-interop/lib/jaxrpc.jar
   labs/jbosstm/workspace/interop/WSTFSC07-interop/lib/junit.jar
   labs/jbosstm/workspace/interop/WSTFSC07-interop/lib/saaj-api.jar
   labs/jbosstm/workspace/interop/WSTFSC07-interop/lib/saxon.jar
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/InteropTestCase.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/InteropTestSuite.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/MessageLogging.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/Sc007TestCase.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/states/
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/states/BaseState.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/states/InteropWaitState.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/states/Sc007PreparedAfterTimeoutState.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/states/Sc007RetryPreparedAbortState.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/states/Sc007RetryPreparedCommitState.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/AddressingConstants.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/AddressingProxySAXHandler.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/BaseHandler.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/ProxyConversation.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/ProxyConversationState.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/ProxyListenerService.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/ProxyURIRewriting.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/WriterSAXHandler.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/TestConstants.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/TestLogController.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/TestLogServlet.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/TestRunner.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/TestServlet.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/directoryContents.html
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/notFoundResponse.html
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/processor.xsl
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/CoordinationContextManager.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/InteropConstants.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/handlers/
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/handlers/CoordinationContextHandler.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/AsyncParticipantStub.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/InteropConstants.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/InteropUtil.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/ParticipantStub.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/SyncParticipantStub.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/client/
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/client/AsyncParticipantClient.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/client/InitiatorClient.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/client/InteropClient.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/client/SyncParticipantClient.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/generated/
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/generated/InitiatorPortType.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/generated/ObjectFactory.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/generated/ParticipantPortType.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/generated/Sc007Service.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/generated/TestMessageType.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/generated/package-info.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/CommitDurable2PCParticipant.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/CommitFailureDurable2PCParticipant.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/CommitFailureRecoveryDurable2PCParticipant.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/CommitVolatile2PCParticipant.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/ParticipantAdapter.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/ReadonlyDurable2PCParticipant.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/RollbackDurable2PCParticipant.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/VolatileAndDurableDurable2PCParticipant.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/VolatileAndDurableVolatile2PCParticipant.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/processors/
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/processors/InitiatorCallback.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/processors/InitiatorProcessor.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/processors/ParticipantProcessor.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/sei/
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/sei/InitiatorPortTypeImpl.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/sei/ParticipantPortTypeImpl.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/server/
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/server/InitiatorInitialisation.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/server/ParticipantInitialisation.java
   labs/jbosstm/workspace/interop/WSTFSC07-interop/web.xml
   labs/jbosstm/workspace/interop/WSTFSC07-interop/web/
   labs/jbosstm/workspace/interop/WSTFSC07-interop/web/details.jsp
   labs/jbosstm/workspace/interop/WSTFSC07-interop/web/index.jsp
   labs/jbosstm/workspace/interop/WSTFSC07-interop/web/invalidParameters.html
   labs/jbosstm/workspace/interop/WSTFSC07-interop/web/results.jsp
Log:
interop test code for WSTF interop test scenario sc007

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/build.xml
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/build.xml	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/build.xml	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,113 @@
+<?xml version="1.0"?>
+<project name="project" default="war">
+    <description>
+        JBoss Transactions WS-Addressing interop test
+    </description>
+
+	<property environment="env"/>
+	
+	<property name="host" value="localhost"/>
+	<property name="port" value="8080"/>
+	
+	<property name="jboss.deploy.dir" location="${env.JBOSS_HOME}/server/default/deploy"/>
+	
+	<property name="build.dir" location="build"/>
+	<property name="build.classes.dir" location="${build.dir}/classes"/>
+	<property name="build.lib.dir" location="${build.dir}/lib"/>
+	<property name="build.war.file" location="${build.lib.dir}/sc007.war"/>
+	<property name="build.webxml.file" location="${build.lib.dir}/web.xml"/>
+	
+	<property name="src.dir" location="src"/>
+    <property name="dd.dir" location="dd/"/>
+	<property name="webxml.file" location="web.xml"/>
+	<property name="lib.dir" location="lib"/>
+	<property name="web.dir" location="web"/>
+	
+	<property name="jboss.client.lib.dir" location="${env.JBOSS_HOME}/client"/>
+	<!-- export XTS_HOME=/home/adinn/jboss/jbossts/trunk/XTS/xts-install -->
+	<property name="xts.lib.dir" location="${env.XTS_HOME}/lib"/>
+	<property name="xts.ext.lib.dir" location="${xts.lib.dir}/ext"/>
+
+	<!--
+	<property name="dist.compile.libs" value="ws-c.jar ws-t.jar wscf.jar wstx.jar wsas.jar jbossjta.jar jbossts-common.jar stax-api-1.0.jar junit-3.8.1.jar saxon8.jar"/>
+	-->
+    <property name="xts11.compile.libs" value="ws-c11.jar ws-t11.jar wscf11.jar wstx11.jar"/>
+    <property name="xts.compile.libs" value="ws-c.jar ws-t.jar wscf.jar wstx.jar wsas.jar"/>
+	<property name="xts.ext.compile.libs" value="jbossjta.jar"/>
+	<property name="jboss.compile.client.libs" value="jaxb-api.jar jboss-javaee.jar jbossws-native-jaxrpc.jar
+            jbossws-native-jaxws.jar jbossws-client.jar stax-api.jar jbossws-native-saaj.jar
+            jbossws-native-jaxws-ext.jar jbossws-native-core.jar jbossws-common.jar"/>
+
+	<property name="dist.compile.libs" value="junit.jar saxon.jar"/>
+
+	<!--
+	<property name="dist.dependency.libs" value="wstx-asl-2.0.3.jar"/>
+	<property name="dist.libs" value="${dist.compile.libs} ${dist.dependency.libs}"/>
+	-->
+	<property name="dist.libs" value="${dist.compile.libs}"/>
+	<property name="dist.xts.libs" value="${xts11.compile.libs} ${xts.compile.libs}"/>
+	<property name="dist.xts.ext.libs" value="${xts.ext.compile.libs}"/>
+
+	<property name="compile.debug" value="true"/>
+	
+	<path id="classpath">
+		<fileset dir="${lib.dir}" includes="${dist.compile.libs}"/>
+		<fileset dir="${xts.lib.dir}" includes="${dist.xts.libs}"/>
+		<fileset dir="${xts.ext.lib.dir}" includes="${dist.xts.ext.libs}"/>
+		<fileset dir="${jboss.client.lib.dir}" includes="${jboss.compile.client.libs}"/>
+	</path>
+	<property name="classpath" refid="classpath"/>
+	
+	<target name="init">
+		<mkdir dir="${build.dir}"/>
+		<mkdir dir="${build.classes.dir}"/>
+		<mkdir dir="${build.lib.dir}"/>
+	</target>
+	
+	<target name="compile" depends="init">
+		<javac classpathref="classpath" destdir="${build.classes.dir}" srcdir="${src.dir}" debug="${compile.debug}"/>
+	</target>
+	
+    <target name="war" depends="compile">
+    	    <copy file="${webxml.file}" tofile="${build.webxml.file}" overwrite="yes">
+    	    		<filterset>
+    	    			<filter token="HOST" value="${host}"/>
+    	    			<filter token="PORT" value="${port}"/>
+    	    		</filterset>
+            </copy>
+        <!-- todo put one copy of each handler file in WEB-INF and refer to it correctly from SEI class annotation-->
+        <copy file="${dd.dir}/sc007/initiatorhandlers.xml" toDir="${build.classes.dir}/com/jboss/transaction/wstf/webservices/sc007/sei" overwrite="yes">
+        </copy>
+        <copy file="${dd.dir}/sc007/participanthandlers.xml" toDir="${build.classes.dir}/com/jboss/transaction/wstf/webservices/sc007/sei" overwrite="yes">
+        </copy>
+	<!-- wsdl gets loaded relative to service implementation class -->
+        <copy toDir="${build.classes.dir}/com/jboss/transaction/wstf/webservices/sc007/generated"
+	      overwrite="yes">
+            <fileset dir="${dd.dir}/sc007/"
+                    includes="wsdl/sc007.wsdl"/>
+        </copy>
+            <war destfile="${build.war.file}" webxml="${build.webxml.file}">
+    			<classes dir="${build.classes.dir}"/>
+    			<classes dir="${src.dir}" excludes="**/*.java"/>
+                <lib dir="${lib.dir}" includes="${dist.libs}"/>
+                <!--
+		    <lib dir="${xts.lib.dir}" includes="${dist.xts.libs}"/>
+		-->
+                <webinf dir="${dd.dir}/sc007" includes="wsdl/sc007.wsdl"/>
+		<fileset dir="${web.dir}"/>
+    		</war>
+    </target>
+	
+	<target name="deploy" depends="war">
+		<copy file="${build.war.file}" todir="${jboss.deploy.dir}"/>
+	</target>
+	
+	<target name="undeploy">
+		<delete file="${jboss.deploy.dir}/sc007.war"/>
+	</target>
+
+	<target name="clean">
+		<delete dir="${build.dir}"/>
+	</target>
+</project>
+

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/dd/sc007/build.sh
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/dd/sc007/build.sh	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/dd/sc007/build.sh	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,21 @@
+#
+#
+#
+
+if [ ! -d tmp ] ; then
+    mkdir tmp
+fi
+
+if [ ! -d tmp/classes ] ; then
+    mkdir tmp/classes
+fi
+
+if [ ! -d tmp/src ] ; then
+    mkdir tmp/src
+fi
+
+# delete old generated versions -- any changes should be made to a copy!
+
+rm -rf tmp/classes/* tmp/src/*
+
+$GF_HOME/bin/wsimport -verbose -keep -wsdllocation wsdl/sc007.wsdl -d tmp/classes -s tmp/src -target 2.0 -p com.jboss.transaction.wstf.webservices.sc007.generated wsdl/sc007.wsdl

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/dd/sc007/initiatorhandlers.xml
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/dd/sc007/initiatorhandlers.xml	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/dd/sc007/initiatorhandlers.xml	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2007, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags. 
+  See the copyright.txt in the distribution for a full listing 
+  of individual contributors.
+  This copyrighted material is made available to anyone wishing to use,
+  modify, copy, or redistribute it subject to the terms and conditions
+  of the GNU General Public License, v. 2.0.
+  This program is distributed in the hope that it will be useful, but WITHOUT A 
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+  PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+  You should have received a copy of the GNU General Public License,
+  v. 2.0 along with this distribution; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+  MA  02110-1301, USA.
+  
+  (C) 2007,
+  @author JBoss Inc.
+-->
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee" 
+xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" 
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+xsi:schemaLocation="http://java.sun.com/xml/ns/javaee">
+    <handler-chain>
+	<handler>
+		<handler-name>WS Addressing Server Handler</handler-name>
+		<handler-class>org.jboss.ws.extensions.addressing.jaxws.WSAddressingServerHandler</handler-class>
+	</handler>
+    </handler-chain>
+</handler-chains>

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/dd/sc007/participanthandlers.xml
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/dd/sc007/participanthandlers.xml	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/dd/sc007/participanthandlers.xml	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2007, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags. 
+  See the copyright.txt in the distribution for a full listing 
+  of individual contributors.
+  This copyrighted material is made available to anyone wishing to use,
+  modify, copy, or redistribute it subject to the terms and conditions
+  of the GNU General Public License, v. 2.0.
+  This program is distributed in the hope that it will be useful, but WITHOUT A 
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+  PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+  You should have received a copy of the GNU General Public License,
+  v. 2.0 along with this distribution; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+  MA  02110-1301, USA.
+  
+  (C) 2007,
+  @author JBoss Inc.
+-->
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee" 
+xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" 
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+xsi:schemaLocation="http://java.sun.com/xml/ns/javaee">
+    <handler-chain>
+	<handler>
+		<handler-name>Coordination Context Handler</handler-name>
+		<handler-class>com.jboss.transaction.wstf.webservices.handlers.CoordinationContextHandler</handler-class>
+	</handler>
+	<handler>
+		<handler-name>WS Addressing Server Handler</handler-name>
+		<handler-class>org.jboss.ws.extensions.addressing.jaxws.WSAddressingServerHandler</handler-class>
+	</handler>
+    </handler-chain>
+</handler-chains>

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/dd/sc007/wsdl/sc007.wsdl
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/dd/sc007/wsdl/sc007.wsdl	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/dd/sc007/wsdl/sc007.wsdl	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,215 @@
+<?xml version="1.0" encoding="utf-8"?>
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
+  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+  xmlns:s="http://www.w3.org/2001/XMLSchema" 
+  xmlns:tns="http://www.wstf.org/sc007" 
+  targetNamespace="http://www.wstf.org/sc007">
+  <types>
+    <s:schema elementFormDefault="qualified" 
+      targetNamespace="http://www.wstf.org/sc007">
+      <s:complexType name="TestMessageType">
+        <s:sequence />
+      </s:complexType>
+      <s:element name="Response" type="tns:TestMessageType" />
+      <s:element name="CompletionCommit" type="s:string" />
+      <s:element name="CompletionRollback" type="s:string" />
+      <s:element name="Commit" type="tns:TestMessageType" />
+      <s:element name="Rollback" type="tns:TestMessageType" />
+      <s:element name="Phase2Rollback" type="tns:TestMessageType" />
+      <s:element name="Readonly" type="tns:TestMessageType" />
+      <s:element name="VolatileAndDurable" type="tns:TestMessageType" />
+      <s:element name="EarlyReadonly" type="tns:TestMessageType" />
+      <s:element name="EarlyAborted" type="tns:TestMessageType" />
+      <s:element name="ReplayCommit" type="tns:TestMessageType" />
+      <s:element name="RetryPreparedCommit" type="tns:TestMessageType" />
+      <s:element name="RetryPreparedAbort" type="tns:TestMessageType" />
+      <s:element name="RetryCommit" type="tns:TestMessageType" />
+      <s:element name="PreparedAfterTimeout" type="tns:TestMessageType" />
+      <s:element name="LostCommitted" type="tns:TestMessageType" />       
+    </s:schema>
+  </types>
+  <message name="CompletionCommit">
+    <part name="parameters" element="tns:CompletionCommit" />
+  </message>
+  <message name="CompletionRollback">
+    <part name="parameters" element="tns:CompletionRollback" />
+  </message>
+  <message name="Commit">
+    <part name="parameters" element="tns:Commit" />
+  </message>
+  <message name="Rollback">
+    <part name="parameters" element="tns:Rollback" />
+  </message>
+  <message name="Phase2Rollback">
+    <part name="parameters" element="tns:Phase2Rollback" />
+  </message>
+  <message name="Readonly">
+    <part name="parameters" element="tns:Readonly" />
+  </message>
+  <message name="VolatileAndDurable">
+    <part name="parameters" element="tns:VolatileAndDurable" />
+  </message>
+  <message name="EarlyReadonly">
+    <part name="parameters" element="tns:EarlyReadonly" />
+  </message>
+  <message name="EarlyAborted">
+    <part name="parameters" element="tns:EarlyAborted" />
+  </message>
+  <message name="ReplayCommit">
+    <part name="parameters" element="tns:ReplayCommit" />
+  </message>
+  <message name="RetryPreparedCommit">
+    <part name="parameters" element="tns:RetryPreparedCommit" />
+  </message>
+  <message name="RetryPreparedAbort">
+    <part name="parameters" element="tns:RetryPreparedAbort" />
+  </message>
+  <message name="RetryCommit">
+    <part name="parameters" element="tns:RetryCommit" />
+  </message>
+  <message name="PreparedAfterTimeout">
+    <part name="parameters" element="tns:PreparedAfterTimeout" />
+  </message>
+  <message name="LostCommitted">
+    <part name="parameters" element="tns:LostCommitted" />
+  </message>
+  <message name="Response">
+    <part name="parameters" element="tns:Response" />
+  </message>
+
+  <portType name="InitiatorPortType">
+    <operation name="Response">
+      <input name="Response" message="tns:Response" />
+    </operation>
+  </portType>
+
+  <portType name="ParticipantPortType">
+    <operation name="CompletionCommit"><!-- Scenario 1.1 -->
+      <input name="CompletionCommit" message="tns:CompletionCommit" />
+    </operation>
+    <operation name="CompletionRollback"><!-- Scenario 1.2 -->
+      <input name="CompletionRollback" message="tns:CompletionRollback" />
+    </operation>
+    <operation name="Commit"><!-- Scenario 2.1 -->
+      <input name="Commit" message="tns:Commit" />
+    </operation>
+    <operation name="Rollback"><!-- Scenario 2.2 -->
+      <input name="Rollback" message="tns:Rollback" />
+    </operation>
+    <operation name="Phase2Rollback"><!-- Scenario 3.1 -->
+      <input name="Phase2Rollback" message="tns:Phase2Rollback" />
+    </operation>
+    <operation name="Readonly"><!-- Scenario 3.2 -->
+      <input name="Readonly" message="tns:Readonly" />
+    </operation>
+    <operation name="VolatileAndDurable"><!-- Scenario 3.3 -->
+      <input name="VolatileAndDurable" message="tns:VolatileAndDurable" />
+    </operation>
+    <operation name="EarlyReadonly"><!-- Scenario 4.1 -->
+      <input name="EarlyReadonly" message="tns:EarlyReadonly" />
+    </operation>
+    <operation name="EarlyAborted"><!-- Scenario 4.2 -->
+      <input name="EarlyAborted" message="tns:EarlyAborted" />
+    </operation>
+    <operation name="ReplayCommit"><!-- Scenario 5.1 -->
+      <input name="ReplayCommit" message="tns:ReplayCommit" />
+    </operation>
+    <operation name="RetryPreparedCommit"><!-- Scenario 5.2 -->
+      <input name="RetryPreparedCommit" message="tns:RetryPreparedCommit" />
+    </operation>
+    <operation name="RetryPreparedAbort"><!-- Scenario 5.3 -->
+      <input name="RetryPreparedAbort" message="tns:RetryPreparedAbort" />
+    </operation>    
+    <operation name="RetryCommit"><!-- Scenario 5.4 -->
+      <input name="RetryCommit" message="tns:RetryCommit" />
+    </operation>
+    <operation name="PreparedAfterTimeout"><!-- Scenario 5.5 -->
+      <input name="PreparedAfterTimeout" message="tns:PreparedAfterTimeout" />
+    </operation>
+    <operation name="LostCommitted"><!-- Scenario 5.6 -->
+      <input name="LostCommitted" message="tns:LostCommitted" />
+    </operation>
+  </portType>
+
+  <binding name="sc007InitiatorBinding" type="tns:InitiatorPortType">
+    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+    <operation name="Response">
+      <soap:operation soapAction="http://www.wstf.org/docs/scenarios/sc007/Response"/>
+      <input> <soap:body use="literal"/> </input>
+    </operation>
+  </binding>
+
+  <binding name="sc007ParticipantBinding" type="tns:ParticipantPortType">
+    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+    <operation name="CompletionCommit">
+      <soap:operation soapAction="http://www.wstf.org/docs/scenarios/sc007/CompletionCommit"/>
+      <input> <soap:body use="literal"/> </input>
+    </operation>
+    <operation name="CompletionRollback">
+      <soap:operation soapAction="http://www.wstf.org/docs/scenarios/sc007/CompletionRollback"/>
+      <input> <soap:body use="literal"/> </input>
+    </operation>
+    <operation name="Commit">
+      <soap:operation soapAction="http://www.wstf.org/docs/scenarios/sc007/Commit"/>
+      <input> <soap:body use="literal"/> </input>
+    </operation>
+    <operation name="Rollback">
+      <soap:operation soapAction="http://www.wstf.org/docs/scenarios/sc007/Rollback"/>
+      <input> <soap:body use="literal"/> </input>
+    </operation>
+    <operation name="Phase2Rollback">
+      <soap:operation soapAction="http://www.wstf.org/docs/scenarios/sc007/Phase2Rollback"/>
+      <input> <soap:body use="literal"/> </input>
+    </operation>
+    <operation name="Readonly">
+      <soap:operation soapAction="http://www.wstf.org/docs/scenarios/sc007/Readonly"/>
+      <input> <soap:body use="literal"/> </input>
+    </operation>
+    <operation name="VolatileAndDurable">
+      <soap:operation soapAction="http://www.wstf.org/docs/scenarios/sc007/VolatileAndDurable"/>
+      <input> <soap:body use="literal"/> </input>
+    </operation>
+    <operation name="EarlyReadonly">
+      <soap:operation soapAction="http://www.wstf.org/docs/scenarios/sc007/EarlyReadonly"/>
+      <input> <soap:body use="literal"/> </input>
+    </operation>
+    <operation name="EarlyAborted">
+      <soap:operation soapAction="http://www.wstf.org/docs/scenarios/sc007/EarlyAborted"/>
+      <input> <soap:body use="literal"/> </input>
+    </operation>
+    <operation name="ReplayCommit">
+      <soap:operation soapAction="http://www.wstf.org/docs/scenarios/sc007/ReplayCommit"/>
+      <input> <soap:body use="literal"/> </input>
+    </operation>
+    <operation name="RetryPreparedCommit">
+      <soap:operation soapAction="http://www.wstf.org/docs/scenarios/sc007/RetryPreparedCommit"/>
+      <input> <soap:body use="literal"/> </input>
+    </operation>
+    <operation name="RetryPreparedAbort">
+      <soap:operation soapAction="http://www.wstf.org/docs/scenarios/sc007/RetryPreparedAbort"/>
+      <input> <soap:body use="literal"/> </input>
+    </operation>
+    <operation name="RetryCommit">
+      <soap:operation soapAction="http://www.wstf.org/docs/scenarios/sc007/RetryCommit"/>
+      <input> <soap:body use="literal"/> </input>
+    </operation>
+    <operation name="PreparedAfterTimeout">
+      <soap:operation soapAction="http://www.wstf.org/docs/scenarios/sc007/PreparedAfterTimeout"/>
+      <input> <soap:body use="literal"/> </input>
+    </operation>
+    <operation name="LostCommitted">
+      <soap:operation soapAction="http://www.wstf.org/docs/scenarios/sc007/LostCommitted"/>
+      <input> <soap:body use="literal"/> </input>
+    </operation>
+  </binding>
+
+  <service name="sc007Service">
+    <port name="sc007InitiatorPort" binding="tns:sc007InitiatorBinding">
+      <soap:address location="http://www.wstf.org/sc007/sc007"/>
+    </port>
+    <port name="sc007ParticipantPort" binding="tns:sc007ParticipantBinding">
+      <soap:address location="http://www.wstf.org/sc007/sc007"/>
+    </port>
+  </service>
+
+</definitions>

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/lib/commons-logging.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/interop/WSTFSC07-interop/lib/commons-logging.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/lib/jaxrpc.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/interop/WSTFSC07-interop/lib/jaxrpc.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/lib/junit.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/interop/WSTFSC07-interop/lib/junit.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/lib/saaj-api.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/interop/WSTFSC07-interop/lib/saaj-api.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/lib/saxon.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/interop/WSTFSC07-interop/lib/saxon.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/InteropTestCase.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/InteropTestCase.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/InteropTestCase.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,162 @@
+package com.jboss.transaction.wstf.interop;
+
+import junit.framework.TestCase;
+import junit.framework.TestResult;
+
+import com.jboss.transaction.wstf.proxy.ProxyConversation;
+
+/**
+ * Base class for interop tests.
+ * @author kevin
+ */
+public class InteropTestCase extends TestCase
+{
+    /**
+     * The log message prefix start.
+     */
+    private static final String LOG_MESSAGE_PREFIX_START = "<log:message testcase=\"" ;
+    /**
+     * The log message prefix centre.
+     */
+    private static final String LOG_MESSAGE_PREFIX_CENTRE = "\" message=\"" ;
+    /**
+     * The log message prefix end.
+     */
+    private static final String LOG_MESSAGE_PREFIX_END = "\"><log:content>" ;
+    /**
+     * The log message suffix.
+     */
+    private static final String LOG_MESSAGE_SUFFIX = "</log:content></log:message>" ;
+    
+    /**
+     * The URI of the participant.
+     */
+    private String participantURI ;
+    
+    /**
+     * The conversation id for the test.
+     */
+    private String conversationId ;
+    
+    /**
+     * The test timeout value.
+     */
+    private long testTimeout ;
+    /**
+     * The asynchronous test flag.
+     */
+    private boolean asyncTest ;
+    
+    /**
+     * Set the participant URI.
+     * @param participantURI The participant URI.
+     */
+    public void setParticipantURI(final String participantURI)
+    {
+        this.participantURI = participantURI ;
+    }
+    
+    /**
+     * Get the participant URI.
+     * @return The participant URI.
+     */
+    protected String getParticipantURI()
+    {
+        return participantURI ;
+    }
+    
+    /**
+     * Set the test timeout value.
+     * testTimeout The test timeout value.
+     */
+    public void setTestTimeout(final long testTimeout)
+    {
+        this.testTimeout = testTimeout ;
+    }
+    
+    /**
+     * Get the asynchronous test flag.
+     * @return The asynchronous test flag.
+     */
+    protected boolean getAsyncTest()
+    {
+        return asyncTest ;
+    }
+    
+    /**
+     * Set the asynchronous test flag.
+     * asyncTest The asynchronous test flag.
+     */
+    public void setAsyncTest(final boolean asyncTest)
+    {
+        this.asyncTest = asyncTest ;
+    }
+    
+    /**
+     * Get the test timeout value.
+     * @return The test timeout value.
+     */
+    protected long getTestTimeout()
+    {
+        return testTimeout ;
+    }
+    
+    /**
+     * Get the conversation id.
+     * @return The conversation id.
+     */
+    protected String getConversationId()
+    {
+        return conversationId ;
+    }
+    
+    /**
+     * Wraps the run method to include logging of message interactions.
+     * @param result The test result. 
+     */
+    public void run(final TestResult result)
+    {
+        // get a conversation id, start the log, clear it on finish.
+        conversationId = ProxyConversation.createConversation() ;
+        try
+        {
+            super.run(result) ;
+        }
+        finally
+        {
+            final String[] messages = ProxyConversation.removeConversation(conversationId) ;
+            conversationId = null ;
+            if (messages != null)
+            {
+                final int numMessages = messages.length ;
+                final StringBuffer buffer = new StringBuffer() ;
+                int count = 0 ;
+                while(count < numMessages)
+                {
+                    final String message = messages[count] ;
+                    count++ ;
+                    if (message != null)
+                    {
+                        buffer.append(LOG_MESSAGE_PREFIX_START) ;
+                        buffer.append(getName()) ;
+                        buffer.append(LOG_MESSAGE_PREFIX_CENTRE) ;
+                        buffer.append(count) ;
+                        buffer.append(LOG_MESSAGE_PREFIX_END) ;
+                        buffer.append(message) ;
+                        buffer.append(LOG_MESSAGE_SUFFIX) ;
+                    }
+                }
+                MessageLogging.appendThreadLog(buffer.toString()) ;
+            }
+        }
+    }
+    
+    /**
+     * Return the string represenation of this test.
+     * @return the string representation.
+     */
+    public String toString()
+    {
+        return getName() ;
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/InteropTestSuite.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/InteropTestSuite.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/InteropTestSuite.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,111 @@
+package com.jboss.transaction.wstf.interop;
+
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * Interop testsuite to initialise the participant uri on addition.
+ * @author kevin
+ */
+public class InteropTestSuite extends TestSuite
+{
+    /**
+     * The participant URI for this test.
+     */
+    private final String participantURI ;
+    /**
+     * The test timeout.
+     */
+    private final long testTimeout ;
+    /**
+     * The asynchronous test flag.
+     */
+    private final boolean asyncTest ;
+    
+    /**
+     * Construct an empty test suite with the specified participant URI.
+     * @param testTimeout The test timeout.
+     * @param participantURI The participant URI.
+     */
+    public InteropTestSuite(final String participantURI, final long testTimeout, final boolean asyncTest)
+    {
+        super() ;
+        this.participantURI = participantURI ;
+        this.testTimeout = testTimeout ;
+        this.asyncTest = asyncTest ;
+    }
+    
+    /**
+     * Construct an empty test suite with the specified participant URI and name.
+     * @param participantURI The participant URI.
+     * @param testTimeout The test timeout.
+     * @param name The name of the test suite.
+     */
+    public InteropTestSuite(final String participantURI, final long testTimeout, final boolean asyncTest, final String name)
+    {
+        super(name) ;
+        this.participantURI = participantURI ;
+        this.testTimeout = testTimeout ;
+        this.asyncTest = asyncTest ;
+    }
+
+    /**
+     * Constructs a TestSuite from the given class using the specified participant URI.
+     * @param participantURI The participant URI.
+     * @param testTimeout The test timeout.
+     * @param clazz The class containing the tests.
+     */
+    public InteropTestSuite(final String participantURI, final long testTimeout, final boolean asyncTest, final Class clazz)
+    {
+        super(clazz) ;
+        this.participantURI = participantURI ;
+        this.testTimeout = testTimeout ;
+        this.asyncTest = asyncTest ;
+        final int numTests = countTestCases() ;
+        for(int count = 0 ; count < numTests ; count++)
+        {
+            initialiseTest(testAt(count)) ;
+        }
+    }
+    
+    /**
+     * Constructs a TestSuite from the given class using the specified participant URI and name.
+     * @param participantURI The participant URI.
+     * @param testTimeout The test timeout.
+     * @param clazz The class containing the tests.
+     * @param name The name of the test suite.
+     */
+    public InteropTestSuite(final String participantURI, final long testTimeout, final boolean asyncTest, final Class clazz, final String name)
+    {
+        super(clazz, name) ;
+        this.participantURI = participantURI ;
+        this.testTimeout = testTimeout ;
+        this.asyncTest = asyncTest ;
+    }
+
+    /**
+     * Add a test to the test suite.
+     * @param test The test to add.
+     */
+    public void addTest(final Test test)
+    {
+        initialiseTest(test) ;
+        super.addTest(test) ;
+    }
+    
+    /**
+     * Perform initialisation on the test.
+     * @param test The test to initialise.
+     */
+    private void initialiseTest(final Test test)
+    {
+        if (test instanceof InteropTestCase)
+        {
+            final InteropTestCase interopTestCase = (InteropTestCase)test ;
+            interopTestCase.setParticipantURI(participantURI) ;
+            interopTestCase.setTestTimeout(testTimeout) ;
+            interopTestCase.setAsyncTest(asyncTest) ;
+        }
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/MessageLogging.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/MessageLogging.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/MessageLogging.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,51 @@
+package com.jboss.transaction.wstf.interop;
+
+/**
+ * Class providing test message logging.
+ * @author kevin
+ */
+public class MessageLogging
+{
+    /**
+     * The thread local message log.
+     */
+    private static final ThreadLocal MESSAGE_LOG = new ThreadLocal() ;
+    
+    /**
+     * Clear the log for the current thread.
+     */
+    public static void clearThreadLog()
+    {
+        MESSAGE_LOG.set(null) ;
+    }
+    
+    /**
+     * Get the thread log.
+     * @return The thread log.
+     */
+    public static String getThreadLog()
+    {
+        final Object value = MESSAGE_LOG.get() ;
+        return (value == null ? "" : value.toString()) ;
+    }
+    
+    /**
+     * Append a message to the thread log.
+     * @param message The thread message to append.
+     */
+    public static void appendThreadLog(final String message)
+    {
+        final Object value = MESSAGE_LOG.get() ;
+        final StringBuffer buffer ;
+        if (value == null)
+        {
+            buffer = new StringBuffer(message) ;
+            MESSAGE_LOG.set(buffer) ;
+        }
+        else
+        {
+            buffer = (StringBuffer)value ;
+            buffer.append(message) ;
+        }
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/Sc007TestCase.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/Sc007TestCase.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/Sc007TestCase.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,520 @@
+package com.jboss.transaction.wstf.interop;
+
+import com.arjuna.webservices11.wsat.AtomicTransactionConstants;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.webservices11.ServiceRegistry;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import com.arjuna.wst.CompletionCoordinatorParticipant;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.TransactionRolledBackException;
+import com.jboss.transaction.wstf.interop.states.Sc007PreparedAfterTimeoutState;
+import com.jboss.transaction.wstf.interop.states.Sc007RetryPreparedAbortState;
+import com.jboss.transaction.wstf.interop.states.Sc007RetryPreparedCommitState;
+import com.jboss.transaction.wstf.interop.states.InteropWaitState;
+import com.jboss.transaction.wstf.proxy.ProxyConversation;
+import com.jboss.transaction.wstf.proxy.ProxyURIRewriting;
+import com.jboss.transaction.wstf.webservices.InteropConstants;
+import com.jboss.transaction.wstf.webservices.sc007.InteropUtil;
+import com.jboss.transaction.wstf.webservices.sc007.ParticipantStub;
+import com.jboss.transaction.wstf.webservices.sc007.*;
+import com.jboss.transaction.wstf.webservices.sc007.SyncParticipantStub;
+
+/**
+ * The AT endpoint test case
+ * @author kevin
+ */
+public class Sc007TestCase extends InteropTestCase
+{
+    /**
+     * The coordinator URI of the source.
+     */
+    private static final String SOURCE_COORDINATOR_URI ;
+    /**
+     * The service URI of the participant.
+     */
+    private static final String SOURCE_PARTICIPANT_URI ;
+    
+    /**
+     * Construct the named test case.
+     */
+    public Sc007TestCase()
+    {
+        // Default the service to the local service.
+        setParticipantURI(getSourceParticipantURI()) ;
+        setTestTimeout(120000) ;
+        setAsyncTest(true) ;
+    }
+
+    /**
+     * test1_1 - 1.1 CompletionCommit
+     * Participant creates and commits a transaction using the initiator's coordinator.
+     * @throws Exception on failure.
+     */
+    public void test1_1()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        final InteropWaitState state = new InteropWaitState(AtomicTransactionConstants.WSAT_ACTION_COMMITTED) ;
+        ProxyConversation.setConversationState(conversationId, state) ;
+        try
+        {
+            final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String coordinatorURI = ProxyURIRewriting.rewriteURI(ProxyConversation.getAlternateConversationId(conversationId), getSourceCoordinatorURI()) ;
+            getParticipantStub().completionCommit(serviceURI, coordinatorURI) ;
+            state.waitForCompletion(getTestTimeout()) ;
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+        assertTrue("Conversation did not complete successfully", state.isSuccessful()) ;
+    }
+
+    /**
+     * test1_2 - 1.2 CompletionRollback
+     * Participant creates and rolls back a transaction using the initiator's coordinator.
+     * @throws Exception on failure.
+     */
+    public void test1_2()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        final InteropWaitState state = new InteropWaitState(AtomicTransactionConstants.WSAT_ACTION_ABORTED) ;
+        ProxyConversation.setConversationState(conversationId, state) ;
+        try
+        {
+            final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String coordinatorURI = ProxyURIRewriting.rewriteURI(ProxyConversation.getAlternateConversationId(conversationId), getSourceCoordinatorURI()) ;
+            getParticipantStub().completionRollback(serviceURI, coordinatorURI) ;
+            state.waitForCompletion(getTestTimeout()) ;
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+        assertTrue("Conversation did not complete successfully", state.isSuccessful()) ;
+    }
+
+    /**
+     * testAT2_1 - 2.1 Commit
+     * Participant registers for Durable2PC, initiator commits, transaction commits successfully.
+     * @throws Exception on failure.
+     */
+    public void test2_1()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        final InteropWaitState state = new InteropWaitState(AtomicTransactionConstants.WSAT_ACTION_COMMITTED) ;
+        ProxyConversation.setConversationState(conversationId, state) ;
+        try
+        {
+            final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final CoordinationContextType context = InteropUtil.createCoordinationContext(getSourceCoordinatorURI()) ;
+            getParticipantStub().commit(serviceURI, context) ;
+            
+            final CompletionCoordinatorParticipant participant = InteropUtil.registerCompletion(context, context.getIdentifier().getValue()) ;
+            participant.commit() ;
+            
+            state.waitForCompletion(0) ;
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+        assertTrue("Conversation did not complete successfully", state.isSuccessful()) ;
+    }
+
+    /**
+     * test2_2 - 2.2 Rollback
+     * Participant registers for Durable2PC, initiator rolls back.
+     * @throws Exception on failure.
+     */
+    public void test2_2()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        final InteropWaitState state = new InteropWaitState(AtomicTransactionConstants.WSAT_ACTION_ABORTED) ;
+        ProxyConversation.setConversationState(conversationId, state) ;
+        try
+        {
+            final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final CoordinationContextType context = InteropUtil.createCoordinationContext(getSourceCoordinatorURI()) ;
+            getParticipantStub().rollback(serviceURI, context) ;
+            
+            final CompletionCoordinatorParticipant participant = InteropUtil.registerCompletion(context, context.getIdentifier().getValue()) ;
+            participant.rollback() ;
+            
+            state.waitForCompletion(0) ;
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+        assertTrue("Conversation did not complete successfully", state.isSuccessful()) ;
+    }
+
+    /**
+     * test3_1 - 3.1 Phase2Rollback
+     * Coordinator aborts the transaction due to an Aborted vote during the prepare phase. 
+     * @throws Exception on failure.
+     */
+    public void test3_1()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        final InteropWaitState state = new InteropWaitState(AtomicTransactionConstants.WSAT_ACTION_ABORTED, 2) ;
+        ProxyConversation.setConversationState(conversationId, state) ;
+        try
+        {
+            final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final CoordinationContextType context = InteropUtil.createCoordinationContext(getSourceCoordinatorURI()) ;
+            getParticipantStub().phase2Rollback(serviceURI, context) ;
+            
+            final CompletionCoordinatorParticipant participant = InteropUtil.registerCompletion(context, context.getIdentifier().getValue()) ;
+            participant.commit() ;
+            fail("Transaction rollback expected") ;
+        }
+        catch (final TransactionRolledBackException trbe)
+        {
+            state.waitForCompletion(0) ;
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+        assertTrue("Conversation did not complete successfully", state.isSuccessful()) ;
+    }
+
+    /**
+     * test3_2 - 3.2 Readonly
+     * Tests coordinator committing a transaction with a read only participant. 
+     * @throws Exception on failure.
+     */
+    public void test3_2()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        final InteropWaitState state = new InteropWaitState(AtomicTransactionConstants.WSAT_ACTION_COMMITTED) ;
+        ProxyConversation.setConversationState(conversationId, state) ;
+        try
+        {
+            final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final CoordinationContextType context = InteropUtil.createCoordinationContext(getSourceCoordinatorURI()) ;
+            getParticipantStub().readonly(serviceURI, context) ;
+            
+            final CompletionCoordinatorParticipant participant = InteropUtil.registerCompletion(context, context.getIdentifier().getValue()) ;
+            participant.commit() ;
+            
+            state.waitForCompletion(0) ;
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+        assertTrue("Conversation did not complete successfully", state.isSuccessful()) ;
+    }
+
+    /**
+     * test3_3 - 3.3 VolatileAndDurable
+     * Tests registration during the volatile prepare phase. 
+     * @throws Exception on failure.
+     */
+    public void test3_3()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        final InteropWaitState state = new InteropWaitState(AtomicTransactionConstants.WSAT_ACTION_COMMITTED) ;
+        ProxyConversation.setConversationState(conversationId, state) ;
+        try
+        {
+            final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final CoordinationContextType context = InteropUtil.createCoordinationContext(getSourceCoordinatorURI()) ;
+            getParticipantStub().volatileAndDurable(serviceURI, context) ;
+            
+            final CompletionCoordinatorParticipant participant = InteropUtil.registerCompletion(context, context.getIdentifier().getValue()) ;
+            participant.commit() ;
+            
+            state.waitForCompletion(0) ;
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+        assertTrue("Conversation did not complete successfully", state.isSuccessful()) ;
+    }
+
+    /**
+     * test4_1 - 4.1 EarlyReadonly
+     * Tests the case of a participant initiated ReadOnly message occurring prior to the prepare phase. 
+     * @throws Exception on failure.
+     */
+    public void test4_1()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        final InteropWaitState state = new InteropWaitState(AtomicTransactionConstants.WSAT_ACTION_COMMITTED) ;
+        ProxyConversation.setConversationState(conversationId, state) ;
+        try
+        {
+            final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final CoordinationContextType context = InteropUtil.createCoordinationContext(getSourceCoordinatorURI()) ;
+            getParticipantStub().earlyReadonly(serviceURI, context) ;
+            
+            final CompletionCoordinatorParticipant participant = InteropUtil.registerCompletion(context, context.getIdentifier().getValue()) ;
+            participant.commit() ;
+            
+            state.waitForCompletion(0) ;
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+        assertTrue("Conversation did not complete successfully", state.isSuccessful()) ;
+    }
+
+    /**
+     * test4_2 - 4.2 EarlyAborted
+     * Tests the case of a participant initiated Aborted message occurring prior to the prepare phase. 
+     * @throws Exception on failure.
+     */
+    public void test4_2()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        final InteropWaitState state = new InteropWaitState(AtomicTransactionConstants.WSAT_ACTION_ABORTED, 2) ;
+        ProxyConversation.setConversationState(conversationId, state) ;
+        try
+        {
+            final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final CoordinationContextType context = InteropUtil.createCoordinationContext(getSourceCoordinatorURI()) ;
+            getParticipantStub().earlyAborted(serviceURI, context) ;
+            
+            final CompletionCoordinatorParticipant participant = InteropUtil.registerCompletion(context, context.getIdentifier().getValue()) ;
+            participant.commit() ;
+            fail("Transaction rollback expected") ;
+        }
+        catch (final TransactionRolledBackException trbe)
+        {
+            state.waitForCompletion(0) ;
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+        assertTrue("Conversation did not complete successfully", state.isSuccessful()) ;
+    }
+
+    /**
+     * test5_1 - 5.1 ReplayCommit
+     * Participant registers for Durable2PC, initator initiates commit, participant fails after prepared, recovers and resends prepared. Transaction commits normally.
+     * @throws Exception on failure.
+     */
+    public void test5_1()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        final InteropWaitState state = new InteropWaitState(AtomicTransactionConstants.WSAT_ACTION_COMMITTED) ;
+        ProxyConversation.setConversationState(conversationId, state) ;
+        try
+        {
+            final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final CoordinationContextType context = InteropUtil.createCoordinationContext(getSourceCoordinatorURI()) ;
+            getParticipantStub().replayCommit(serviceURI, context) ;
+            
+            final CompletionCoordinatorParticipant participant = InteropUtil.registerCompletion(context, context.getIdentifier().getValue()) ;
+            participant.commit() ;
+            
+            state.waitForCompletion(0) ;
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+        assertTrue("Conversation did not complete successfully", state.isSuccessful()) ;
+    }
+
+    /**
+     * test5_2 - 5.2 RetryPreparedCommit
+     * Tests recovery from a communication failure during the prepare phase. Transaction commits normally.
+     * @throws Exception on failure.
+     */
+    public void test5_2()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        final Sc007RetryPreparedCommitState state = new Sc007RetryPreparedCommitState() ;
+        ProxyConversation.setConversationState(conversationId, state) ;
+        try
+        {
+            final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final CoordinationContextType context = InteropUtil.createCoordinationContext(getSourceCoordinatorURI()) ;
+            getParticipantStub().retryPreparedCommit(serviceURI, context) ;
+            
+            final CompletionCoordinatorParticipant participant = InteropUtil.registerCompletion(context, context.getIdentifier().getValue()) ;
+            participant.commit() ;
+            
+            state.waitForCompletion(0) ;
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+        assertTrue("Conversation did not complete successfully", state.isSuccessful()) ;
+    }
+
+    /**
+     * test5_3 - 5.3 RetryPreparedAbort
+     * Tests recovery from a communication failure during the prepare phase. Transaction times out.
+     * @throws Exception on failure.
+     */
+    public void test5_3()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        final Sc007RetryPreparedAbortState state = new Sc007RetryPreparedAbortState() ;
+        ProxyConversation.setConversationState(conversationId, state) ;
+        try
+        {
+            final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final CoordinationContextType context = InteropUtil.createCoordinationContext(getSourceCoordinatorURI()) ;
+            getParticipantStub().retryPreparedAbort(serviceURI, context) ;
+            
+            final CompletionCoordinatorParticipant participant = InteropUtil.registerCompletion(context, context.getIdentifier().getValue()) ;
+            participant.commit() ;
+            fail("Transaction rollback expected") ;
+        }
+        catch (final TransactionRolledBackException trbe)
+        {
+            state.waitForCompletion(getTestTimeout()) ;
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+        assertTrue("Conversation did not complete successfully", state.isSuccessful()) ;
+    }
+
+    /**
+     * test5_4 - 5.4 RetryCommit
+     * Tests recovery from a communication failure during the commit phase. Transaction commits normally.
+     * @throws Exception on failure.
+     */
+    public void test5_4()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        final InteropWaitState state = new InteropWaitState(AtomicTransactionConstants.WSAT_ACTION_COMMITTED) ;
+        ProxyConversation.setConversationState(conversationId, state) ;
+        try
+        {
+            final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final CoordinationContextType context = InteropUtil.createCoordinationContext(getSourceCoordinatorURI()) ;
+            getParticipantStub().retryCommit(serviceURI, context) ;
+            
+            final CompletionCoordinatorParticipant participant = InteropUtil.registerCompletion(context, context.getIdentifier().getValue()) ;
+            participant.commit() ;
+            
+            state.waitForCompletion(0) ;
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+        assertTrue("Conversation did not complete successfully", state.isSuccessful()) ;
+    }
+
+    /**
+     * test5_5 - 5.5 PreparedAfterTimeout
+     * Tests recovery from a communication failure during the prepare phase. Transaction times out. Two participants, volatile and durable.
+     * @throws Exception on failure.
+     */
+    public void test5_5()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        final Sc007PreparedAfterTimeoutState state = new Sc007PreparedAfterTimeoutState() ;
+        ProxyConversation.setConversationState(conversationId, state) ;
+        try
+        {
+            final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final CoordinationContextType context = InteropUtil.createCoordinationContext(getSourceCoordinatorURI()) ;
+            getParticipantStub().preparedAfterTimeout(serviceURI, context) ;
+            
+            final CompletionCoordinatorParticipant participant = InteropUtil.registerCompletion(context, context.getIdentifier().getValue()) ;
+            participant.commit() ;
+            fail("Transaction rollback expected") ;
+        }
+        catch (final TransactionRolledBackException trbe)
+        {
+            state.waitForCompletion(getTestTimeout()) ;
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+        assertTrue("Conversation did not complete successfully", state.isSuccessful()) ;
+    }
+
+    /**
+     * test5_6 - 5.6 LostCommitted
+     * Tests the effect of a lost Committed message.
+     * @throws Exception on failure.
+     */
+    public void test5_6()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        final InteropWaitState state = new InteropWaitState(AtomicTransactionConstants.WSAT_ACTION_COMMITTED) ;
+        ProxyConversation.setConversationState(conversationId, state) ;
+        try
+        {
+            final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final CoordinationContextType context = InteropUtil.createCoordinationContext(getSourceCoordinatorURI()) ;
+            getParticipantStub().lostCommitted(serviceURI, context) ;
+            
+            final CompletionCoordinatorParticipant participant = InteropUtil.registerCompletion(context, context.getIdentifier().getValue()) ;
+            participant.commit() ;
+            
+            state.waitForCompletion(0) ;
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+        assertTrue("Conversation did not complete successfully", state.isSuccessful()) ;
+    }
+    
+    /**
+     * Get the source coordinator URI.
+     * @return The source coordinator uri.
+     */
+    protected static String getSourceCoordinatorURI()
+    {
+        return SOURCE_COORDINATOR_URI ;
+    }
+    
+    /**
+     * Get the source participant URI.
+     * @return The source participant uri.
+     */
+    protected static String getSourceParticipantURI()
+    {
+        return SOURCE_PARTICIPANT_URI ;
+    }
+    
+    /**
+     * Get the participant stub for the test.
+     * @return The participant stub.
+     */
+    private ParticipantStub getParticipantStub()
+    {
+        return (getAsyncTest() ? AsyncParticipantStub.getParticipantStub() : SyncParticipantStub.getParticipantStub()) ;
+    }
+    
+    static
+    {
+        final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+        SOURCE_PARTICIPANT_URI = serviceRegistry.getServiceURI(InteropConstants.SERVICE_PARTICIPANT) ;
+        SOURCE_COORDINATOR_URI = serviceRegistry.getServiceURI(CoordinationConstants.ACTIVATION_SERVICE_NAME) ;
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/states/BaseState.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/states/BaseState.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/states/BaseState.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,97 @@
+package com.jboss.transaction.wstf.interop.states;
+
+import org.xml.sax.ContentHandler;
+
+import com.jboss.transaction.wstf.proxy.ProxyConversationState;
+
+/**
+ * The base state class for proxy conversations.
+ */
+abstract class BaseState implements ProxyConversationState
+{
+    /**
+     * The complete flag.
+     */
+    private boolean complete ;
+    /**
+     * The success flag.
+     */
+    private boolean success ;
+    
+    /**
+     * Mark the conversation as successfully completed.
+     */
+    protected synchronized void success()
+    {
+        if (!complete)
+        {
+            System.out.println("KEV: success!") ;
+            complete = true ;
+            success = true ;
+            notifyAll() ;
+        }
+        else
+        {
+            System.out.println("KEV: AAAAAARRRRRRRGGGGGGGHHHHHHHHH, multiple successes called for conversation!") ;
+        }
+    }
+    
+    /**
+     * Wait a specified period for the conversation to complete.
+     * @param timeout The timeout period of the conversation.
+     */
+    public synchronized void waitForCompletion(final long timeout)
+    {
+        if (!complete && (timeout > 0))
+        {
+            final long end = System.currentTimeMillis() + timeout ;
+            do
+            {
+                final long delay = end - System.currentTimeMillis() ;
+                if (delay > 0)
+                {
+                    try
+                    {
+                        wait(delay) ;
+                    }
+                    catch (final InterruptedException ie) {} // ignore
+                }
+                else
+                {
+                    break ;
+                }
+            }
+            while(!complete) ;
+        }
+        
+        complete = true ;
+    }
+    
+    /**
+     * Has the conversation complete?
+     * @return true if the conversation has complete, false otherwise.
+     */
+    public synchronized boolean isComplete()
+    {
+        return complete ;
+    }
+    
+    /**
+     * Was the conversation successful?
+     * @return true if the conversation was successful, false otherwise.
+     */
+    public synchronized boolean isSuccessful()
+    {
+        return success ;
+    }
+
+    /**
+     * Get the Handler for rewriting the XML.
+     * @param nextHandler The next handler in the sequence.
+     * @return The handler or null if no rewriting required.
+     */
+    public ContentHandler getHandler(final ContentHandler nextHandler)
+    {
+	return null ;
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/states/InteropWaitState.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/states/InteropWaitState.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/states/InteropWaitState.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,54 @@
+package com.jboss.transaction.wstf.interop.states;
+
+/**
+ * A conversation state that waits for a specified action before completing.
+ */
+public class InteropWaitState extends BaseState
+{
+    /**
+     * The last action.
+     */
+    private final String lastAction ;
+    /**
+     * The action count.
+     */
+    private int count ;
+    
+    /**
+     * Construct the conversation state.
+     * @param lastAction The last action of the conversation.
+     */
+    public InteropWaitState(final String lastAction)
+    {
+        this(lastAction, 1) ;
+    }
+    
+    /**
+     * Construct the conversation state.
+     * @param lastAction The last action of the conversation.
+     * @param count The occurrance to trigger on.
+     */
+    public InteropWaitState(final String lastAction, final int count)
+    {
+        this.lastAction = lastAction ;
+        this.count = count ;
+    }
+    
+    /**
+     * Handle the next action in the sequence.
+     * @param action The SOAP action.
+     * @param identifier The identifier associated with the endpoint.
+     * @return true if the message should be dropped, false otherwise.
+     */
+    public boolean handleAction(final String action, final String identifier)
+    {
+        if (lastAction.equals(action))
+        {
+            if (--count == 0)
+            {
+                success() ;
+            }
+        }
+        return false ;
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/states/Sc007PreparedAfterTimeoutState.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/states/Sc007PreparedAfterTimeoutState.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/states/Sc007PreparedAfterTimeoutState.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,70 @@
+package com.jboss.transaction.wstf.interop.states;
+
+import com.arjuna.webservices11.wsat.AtomicTransactionConstants;
+
+/**
+ * A conversation state for prepare after timeout test.
+ */
+public class Sc007PreparedAfterTimeoutState extends BaseState
+{
+    /**
+     * The prepared count.
+     */
+    private int preparedCount ;
+    /**
+     * The rollback count.
+     */
+    private int rollbackCount ;
+    /**
+     * Are we dropping other messages?
+     */
+    private boolean drop ;
+    /**
+     * Aborted flag.
+     */
+    private boolean aborted ;
+    /**
+     * Soap Fault flag.
+     */
+    private boolean soapFault ;
+    
+    /**
+     * Handle the next action in the sequence.
+     * @param action The SOAP action.
+     * @param identifier The identifier associated with the endpoint.
+     * @return true if the message should be dropped, false otherwise.
+     */
+    public boolean handleAction(final String action, final String identifier)
+    {
+        if (AtomicTransactionConstants.WSAT_ACTION_PREPARED.equals(action))
+        {
+            if (++preparedCount == 2)
+            {
+                drop = true ;
+            }
+        }
+        else if (AtomicTransactionConstants.WSAT_ACTION_ROLLBACK.equals(action))
+        {
+            if (++rollbackCount == 2)
+            {
+                drop = false ;
+                return true ;
+            }
+        }
+        else if (AtomicTransactionConstants.WSAT_ACTION_ABORTED.equals(action))
+        {
+            aborted = true ;
+        }
+        else if (AtomicTransactionConstants.WSAT_ACTION_FAULT.equals(action))
+        {
+            soapFault = true ;
+        }
+        
+        if (aborted && soapFault)
+        {
+            success() ;
+        }
+        
+        return drop ;
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/states/Sc007RetryPreparedAbortState.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/states/Sc007RetryPreparedAbortState.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/states/Sc007RetryPreparedAbortState.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,51 @@
+package com.jboss.transaction.wstf.interop.states;
+
+import com.arjuna.webservices11.wsat.AtomicTransactionConstants;
+
+/**
+ * A conversation state for retry prepared abort test.
+ */
+public class Sc007RetryPreparedAbortState extends BaseState
+{
+    /**
+     * Have we had the first prepare?
+     */
+    private boolean firstPrepare ;
+    /**
+     * Are we dropping other messages?
+     */
+    private boolean drop ;
+    
+    /**
+     * Handle the next action in the sequence.
+     * @param action The SOAP action.
+     * @param identifier The identifier associated with the endpoint.
+     * @return true if the message should be dropped, false otherwise.
+     */
+    public boolean handleAction(final String action, final String identifier)
+    {
+        if (AtomicTransactionConstants.WSAT_ACTION_PREPARE.equals(action))
+        {
+            if (!firstPrepare)
+            {
+                firstPrepare = true ;
+                drop = true ;
+                return false ;
+            }
+            return true ;
+        }
+        if (AtomicTransactionConstants.WSAT_ACTION_ROLLBACK.equals(action))
+        {
+            if (drop)
+            {
+                drop = false ;
+                return true ;
+            }
+        }
+        else if (AtomicTransactionConstants.WSAT_ACTION_ABORTED.equals(action))
+        {
+            success() ;
+        }
+        return drop ;
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/states/Sc007RetryPreparedCommitState.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/states/Sc007RetryPreparedCommitState.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/interop/states/Sc007RetryPreparedCommitState.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,60 @@
+package com.jboss.transaction.wstf.interop.states;
+
+import com.arjuna.webservices11.wsat.AtomicTransactionConstants;
+
+/**
+ * A conversation state for retry prepared commit state.
+ */
+public class Sc007RetryPreparedCommitState extends BaseState
+{
+    /**
+     * The prepared count.
+     */
+    private int preparedCount ;
+    /**
+     * The committed count.
+     */
+    private int committedCount ;
+    /**
+     * The first identifier.
+     */
+    private String firstIdentifier ;
+    /**
+     * Are we dropping other messages?
+     */
+    private boolean drop ;
+    
+    /**
+     * Handle the next action in the sequence.
+     * @param action The SOAP action.
+     * @param identifier The identifier associated with the endpoint.
+     * @return true if the message should be dropped, false otherwise.
+     */
+    public boolean handleAction(final String action, final String identifier)
+    {
+        if (AtomicTransactionConstants.WSAT_ACTION_PREPARED.equals(action))
+        {
+            preparedCount++ ;
+            if (preparedCount == 1)
+            {
+                firstIdentifier = identifier ;
+            }
+            else if (preparedCount == 2)
+            {
+                drop = true ;
+            }
+            else if (firstIdentifier.equals(identifier))
+            {
+                drop = false ;
+            }
+        }
+        else if (AtomicTransactionConstants.WSAT_ACTION_COMMITTED.equals(action))
+        {
+            if (++committedCount == 2)
+            {
+                success() ;
+            }
+        }
+        return drop ;
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/AddressingConstants.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/AddressingConstants.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/AddressingConstants.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,308 @@
+package com.jboss.transaction.wstf.proxy;
+
+import javax.xml.namespace.QName;
+
+/**
+ * constants used in WS Addressing 2005/08
+ */
+public class AddressingConstants {
+    /**
+     * The Namespace.
+     */
+    public static String WSA_NAMESPACE = "http://www.w3.org/2005/08/addressing" ;
+    /**
+     * The Attribute Namespace.
+     */
+    public static String WSA_ATTRIBUTE_NAMESPACE = "" ;
+    /**
+     * The namespace prefix.
+     */
+    public static String WSA_PREFIX = "wsa" ;
+    /**
+     * The attribute namespace prefix.
+     */
+    public static String WSA_ATTRIBUTE_PREFIX = "" ;
+
+    /**
+     * The Action element.
+     */
+    public static String WSA_ELEMENT_ACTION = "Action" ;
+    /**
+     * The Action QName.
+     */
+    public static QName WSA_ELEMENT_QNAME_ACTION = new QName(WSA_NAMESPACE, WSA_ELEMENT_ACTION, WSA_PREFIX) ;
+    /**
+     * The Endpoint Reference element.
+     */
+    public static String WSA_ELEMENT_ENDPOINT_REFERENCE = "EndpointReference" ;
+    /**
+     * The Endpoint Reference QName.
+     */
+    public static QName WSA_ELEMENT_QNAME_ENDPOINT_REFERENCE = new QName(WSA_NAMESPACE, WSA_ELEMENT_ENDPOINT_REFERENCE, WSA_PREFIX) ;
+    /**
+     * The Fault To element.
+     */
+    public static String WSA_ELEMENT_FAULT_TO = "FaultTo" ;
+    /**
+     * The Fault To QName.
+     */
+    public static QName WSA_ELEMENT_QNAME_FAULT_TO = new QName(WSA_NAMESPACE, WSA_ELEMENT_FAULT_TO, WSA_PREFIX) ;
+    /**
+     * The From element.
+     */
+    public static String WSA_ELEMENT_FROM = "From" ;
+    /**
+     * The From QName.
+     */
+    public static QName WSA_ELEMENT_QNAME_FROM = new QName(WSA_NAMESPACE, WSA_ELEMENT_FROM, WSA_PREFIX) ;
+    /**
+     * The Message ID element.
+     */
+    public static String WSA_ELEMENT_MESSAGE_ID = "MessageID" ;
+    /**
+     * The Message ID QName.
+     */
+    public static QName WSA_ELEMENT_QNAME_MESSAGE_ID = new QName(WSA_NAMESPACE, WSA_ELEMENT_MESSAGE_ID, WSA_PREFIX) ;
+    /**
+     * The Relates To element.
+     */
+    public static String WSA_ELEMENT_RELATES_TO = "RelatesTo" ;
+    /**
+     * The Relates To QName.
+     */
+    public static QName WSA_ELEMENT_QNAME_RELATES_TO = new QName(WSA_NAMESPACE, WSA_ELEMENT_RELATES_TO, WSA_PREFIX) ;
+    /**
+     * The Reply To element.
+     */
+    public static String WSA_ELEMENT_REPLY_TO = "ReplyTo" ;
+    /**
+     * The Reply To QName.
+     */
+    public static QName WSA_ELEMENT_QNAME_REPLY_TO = new QName(WSA_NAMESPACE, WSA_ELEMENT_REPLY_TO, WSA_PREFIX) ;
+    /**
+     * The To element.
+     */
+    public static String WSA_ELEMENT_TO = "To" ;
+    /**
+     * The To QName.
+     */
+    public static QName WSA_ELEMENT_QNAME_TO = new QName(WSA_NAMESPACE, WSA_ELEMENT_TO, WSA_PREFIX) ;
+    /**
+     * The Address element.
+     */
+    public static String WSA_ELEMENT_ADDRESS = "Address" ;
+    /**
+     * The Address QName.
+     */
+    public static QName WSA_ELEMENT_QNAME_ADDRESS = new QName(WSA_NAMESPACE, WSA_ELEMENT_ADDRESS, WSA_PREFIX) ;
+    /**
+     * The Reference Parameters element.
+     */
+    public static String WSA_ELEMENT_REFERENCE_PARAMETERS = "ReferenceParameters" ;
+    /**
+     * The Reference Parameters QName.
+     */
+    public static QName WSA_ELEMENT_QNAME_REFERENCE_PARAMETERS = new QName(WSA_NAMESPACE, WSA_ELEMENT_REFERENCE_PARAMETERS, WSA_PREFIX) ;
+    /**
+     * The Metadata element.
+     */
+    public static String WSA_ELEMENT_METADATA = "Metadata" ;
+    /**
+     * The Metadata QName.
+     */
+    public static QName WSA_ELEMENT_QNAME_METADATA = new QName(WSA_NAMESPACE, WSA_ELEMENT_METADATA, WSA_PREFIX) ;
+
+    /**
+     * The Relationship Type attribute.
+     */
+    public static String WSA_ATTRIBUTE_RELATIONSHIP_TYPE = "RelationshipType" ;
+    /**
+     * The Relationship Type QName.
+     */
+    public static QName WSA_ATTRIBUTE_QNAME_RELATIONSHIP_TYPE = new QName(WSA_ATTRIBUTE_NAMESPACE, WSA_ATTRIBUTE_RELATIONSHIP_TYPE, WSA_ATTRIBUTE_PREFIX) ;
+
+    /**
+     * The value of the Action element for faults.
+     */
+    public static String WSA_ACTION_FAULT = WSA_NAMESPACE + "/fault" ;
+    /**
+     * The value of the Action element for SOAP faults.
+     */
+    public static String WSA_ACTION_SOAP_FAULT = WSA_NAMESPACE + "/soap/fault" ;
+
+    /**
+     * The unspecified Message ID for use in relationships.
+     * KEV check
+     */
+    public static String WSA_MESSAGE_ID_UNSPECIFIED = WSA_NAMESPACE + "/unspecified" ;
+
+    /**
+     * The address URI representing an anonymous endpoint.
+     */
+    public static String WSA_ADDRESS_ANONYMOUS = WSA_NAMESPACE + "/anonymous" ;
+    /**
+     * The address URI representing the none endpoint.
+     */
+    public static String WSA_ADDRESS_NONE = WSA_NAMESPACE + "/none" ;
+
+    /**
+     * The relates to reply URI.
+     */
+    public static String WSA_RELATES_TO_REPLY = WSA_NAMESPACE + "/reply" ;
+
+    /**
+     * The Is Reference Parameter attribute.
+     */
+    public static String WSA_ATTRIBUTE_IS_REFERENCE_PARAMETER = "IsReferenceParameter" ;
+    /**
+     * The Is Reference Parameter QName.
+     */
+    public static QName WSA_ATTRIBUTE_QNAME_IS_REFERENCE_PARAMETER = new QName(WSA_NAMESPACE, WSA_ATTRIBUTE_IS_REFERENCE_PARAMETER, WSA_PREFIX) ;
+
+    /**
+     * The Fault Detail element.
+     */
+    public static String WSA_ELEMENT_FAULT_DETAIL = "FaultDetail" ;
+    /**
+     * The Fault Detail QName.
+     */
+    public static QName WSA_ELEMENT_QNAME_FAULT_DETAIL = new QName(WSA_NAMESPACE, WSA_ELEMENT_FAULT_DETAIL, WSA_PREFIX) ;
+
+    /**
+     * The Invalid Addressing Header fault code.
+     */
+    public static String WSA_FAULT_CODE_INVALID_ADDRESSING_HEADER = "InvalidAddressingHeader" ;
+    /**
+     * The Invalid Addressing Header fault code QName.
+     */
+    public static QName WSA_FAULT_CODE_QNAME_INVALID_ADDRESSING_HEADER = new QName(WSA_NAMESPACE, WSA_FAULT_CODE_INVALID_ADDRESSING_HEADER, WSA_PREFIX) ;
+    /**
+     * The Invalid Address fault code.
+     */
+    public static String WSA_FAULT_CODE_INVALID_ADDRESS = "InvalidAddress" ;
+    /**
+     * The Invalid Address fault code QName.
+     */
+    public static QName WSA_FAULT_CODE_QNAME_INVALID_ADDRESS = new QName(WSA_NAMESPACE, WSA_FAULT_CODE_INVALID_ADDRESS, WSA_PREFIX) ;
+    /**
+     * The Invalid EPR fault code.
+     */
+    public static String WSA_FAULT_CODE_INVALID_EPR = "InvalidEPR" ;
+    /**
+     * The Invalid EPR fault code QName.
+     */
+    public static QName WSA_FAULT_CODE_QNAME_INVALID_EPR = new QName(WSA_NAMESPACE, WSA_FAULT_CODE_INVALID_EPR, WSA_PREFIX) ;
+    /**
+     * The Invalid Cardinality fault code.
+     */
+    public static String WSA_FAULT_CODE_INVALID_CARDINALITY = "InvalidCardinality" ;
+    /**
+     * The Invalid Cardinality fault code QName.
+     */
+    public static QName WSA_FAULT_CODE_QNAME_INVALID_CARDINALITY = new QName(WSA_NAMESPACE, WSA_FAULT_CODE_INVALID_CARDINALITY, WSA_PREFIX) ;
+    /**
+     * The Missing Address In EPR fault code.
+     */
+    public static String WSA_FAULT_CODE_MISSING_ADDRESS_IN_EPR = "MissingAddressInEPR" ;
+    /**
+     * The Missing Address In EPR fault code QName.
+     */
+    public static QName WSA_FAULT_CODE_QNAME_MISSING_ADDRESS_IN_EPR = new QName(WSA_NAMESPACE, WSA_FAULT_CODE_MISSING_ADDRESS_IN_EPR, WSA_PREFIX) ;
+    /**
+     * The Duplicate Message ID fault code.
+     */
+    public static String WSA_FAULT_CODE_DUPLICATE_MESSAGE_ID = "DuplicateMessageID" ;
+    /**
+     * The Duplicate Message ID fault code QName.
+     */
+    public static QName WSA_FAULT_CODE_QNAME_DUPLICATE_MESSAGE_ID = new QName(WSA_NAMESPACE, WSA_FAULT_CODE_DUPLICATE_MESSAGE_ID, WSA_PREFIX) ;
+    /**
+     * The Action Mismatch fault code.
+     */
+    public static String WSA_FAULT_CODE_ACTION_MISMATCH = "ActionMismatch" ;
+    /**
+     * The Action Mismatch fault code QName.
+     */
+    public static QName WSA_FAULT_CODE_QNAME_ACTION_MISMATCH = new QName(WSA_NAMESPACE, WSA_FAULT_CODE_ACTION_MISMATCH, WSA_PREFIX) ;
+    /**
+     * The Message Addressing Header Required fault code.
+     */
+    public static String WSA_FAULT_CODE_MESSAGING_ADDRESSING_HEADER_REQUIRED = "MessageAddressingHeaderRequired" ;
+    /**
+     * The Message Addressing Header Required fault code QName.
+     */
+    public static QName WSA_FAULT_CODE_QNAME_MESSAGING_ADDRESSING_HEADER_REQUIRED = new QName(WSA_NAMESPACE, WSA_FAULT_CODE_MESSAGING_ADDRESSING_HEADER_REQUIRED, WSA_PREFIX) ;
+    /**
+     * The Destination Unreachable fault code.
+     */
+    public static String WSA_FAULT_CODE_DESTINATION_UNREACHABLE = "DestinationUnreachable" ;
+    /**
+     * The Destination Unreachable fault code QName.
+     */
+    public static QName WSA_FAULT_CODE_QNAME_DESTINATION_UNREACHABLE = new QName(WSA_NAMESPACE, WSA_FAULT_CODE_DESTINATION_UNREACHABLE, WSA_PREFIX) ;
+    /**
+     * The Action Not Supported fault code.
+     */
+    public static String WSA_FAULT_CODE_ACTION_NOT_SUPPORTED = "ActionNotSupported" ;
+    /**
+     * The Action Not Supported fault code QName.
+     */
+    public static QName WSA_FAULT_CODE_QNAME_ACTION_NOT_SUPPORTED = new QName(WSA_NAMESPACE, WSA_FAULT_CODE_ACTION_NOT_SUPPORTED, WSA_PREFIX) ;
+    /**
+     * The Endpoint Unavailable fault code.
+     */
+    public static String WSA_FAULT_CODE_ENDPOINT_UNAVAILABLE = "EndpointUnavailable" ;
+    /**
+     * The Endpoint Unavailable fault code QName.
+     */
+    public static QName WSA_FAULT_CODE_QNAME_ENDPOINT_UNAVAILABLE = new QName(WSA_NAMESPACE, WSA_FAULT_CODE_ENDPOINT_UNAVAILABLE, WSA_PREFIX) ;
+
+    /**
+     * The Problem Header element.
+     */
+    public static String WSA_ELEMENT_PROBLEM_HEADER = "ProblemHeader" ;
+    /**
+     * The Problem Header QName.
+     */
+    public static QName WSA_ELEMENT_QNAME_PROBLEM_HEADER = new QName(WSA_NAMESPACE, WSA_ELEMENT_PROBLEM_HEADER, WSA_PREFIX) ;
+    /**
+     * The Problem Header QName element.
+     */
+    public static String WSA_ELEMENT_PROBLEM_HEADER_QNAME = "ProblemHeaderQName" ;
+    /**
+     * The Problem Header QName QName.
+     */
+    public static QName WSA_ELEMENT_QNAME_PROBLEM_HEADER_QNAME = new QName(WSA_NAMESPACE, WSA_ELEMENT_PROBLEM_HEADER_QNAME, WSA_PREFIX) ;
+    /**
+     * The Problem IRI element.
+     */
+    public static String WSA_ELEMENT_PROBLEM_IRI = "ProblemIRI" ;
+    /**
+     * The Problem IRI QName.
+     */
+    public static QName WSA_ELEMENT_QNAME_PROBLEM_IRI = new QName(WSA_NAMESPACE, WSA_ELEMENT_PROBLEM_IRI, WSA_PREFIX) ;
+    /**
+     * The Problem Action element.
+     */
+    public static String WSA_ELEMENT_PROBLEM_ACTION = "ProblemAction" ;
+    /**
+     * The Problem Action QName.
+     */
+    public static QName WSA_ELEMENT_QNAME_PROBLEM_ACTION = new QName(WSA_NAMESPACE, WSA_ELEMENT_PROBLEM_ACTION, WSA_PREFIX) ;
+    /**
+     * The Soap Action element.
+     */
+    public static String WSA_ELEMENT_SOAP_ACTION = "SoapAction" ;
+    /**
+     * The Soap Action QName.
+     */
+    public static QName WSA_ELEMENT_QNAME_SOAP_ACTION = new QName(WSA_NAMESPACE, WSA_ELEMENT_SOAP_ACTION, WSA_PREFIX) ;
+    /**
+     * The Retry After element.
+     */
+    public static String WSA_ELEMENT_RETRY_AFTER = "RetryAfter" ;
+    /**
+     * The Retry After QName.
+     */
+    public static QName WSA_ELEMENT_QNAME_RETRY_AFTER = new QName(WSA_NAMESPACE, WSA_ELEMENT_METADATA, WSA_PREFIX) ;
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/AddressingProxySAXHandler.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/AddressingProxySAXHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/AddressingProxySAXHandler.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,177 @@
+/*
+ * Created on 20-Jan-2005
+ */
+package com.jboss.transaction.wstf.proxy;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+
+import com.jboss.transaction.wstf.proxy.AddressingConstants;
+import com.arjuna.webservices.wsarj.ArjunaConstants;
+
+/**
+ * Sax parser for rewriting the XML via the proxy.
+ * @author kevin
+ */
+public class AddressingProxySAXHandler extends BaseHandler
+{
+    /**
+     * The WS-Addressing namespace URI.
+     */
+    private static final String WSA_NAMESPACE_URI = AddressingConstants.WSA_NAMESPACE ;
+    /**
+     * The WS-Addressing To element.
+     */
+    private static final String WSA_ELEMENT_TO = AddressingConstants.WSA_ELEMENT_TO ;
+    /**
+     * The WS-Addressing Address element.
+     */
+    private static final String WSA_ELEMENT_ADDRESS = AddressingConstants.WSA_ELEMENT_ADDRESS ;
+    
+    /**
+     * Are we in a rewrite element?
+     */
+    private boolean inRewriteElement ;
+    /**
+     * Are we in a to element?
+     */
+    private boolean inToElement ;
+    /**
+     * Are we in an identifier element?
+     */
+    private boolean inIdentifierElement ;
+    /**
+     * The to address.
+     */
+    private String toAddress ;
+    /**
+     * The identifier.
+     */
+    private String identifier ;
+    /**
+     * The string buffer for text element content.
+     */
+    private StringBuffer characterContent = new StringBuffer() ;
+    
+    /**
+     * The current conversation identifier.
+     */
+    private final String conversationIdentifier ;
+    
+    /**
+     * Construct the SAX handler with the output writer.
+     * @param nextHandler The next content handler.
+     * @param conversationIdentifier The conversation identifier.
+     */
+    public AddressingProxySAXHandler(final ContentHandler nextHandler, final String conversationIdentifier)
+    {
+	super(nextHandler) ;
+        this.conversationIdentifier = conversationIdentifier ;
+    }
+    
+    /**
+     * Start an element.
+     * @param uri The uri.
+     * @param localName The local name.
+     * @param qName The qualified name.
+     * @param attributes The element attributes.
+     * @throws SAXException for any errors.
+     */
+    public void startElement(final String uri, final String localName, final String qName,
+        final Attributes attributes)
+    	throws SAXException
+    {
+        if (WSA_NAMESPACE_URI.equals(uri))
+        {
+            if (WSA_ELEMENT_ADDRESS.equals(localName))
+            {
+                inRewriteElement = true ;
+            }
+            else if (WSA_ELEMENT_TO.equals(localName))
+            {
+                inRewriteElement = true ;
+                inToElement = true ;
+            }
+        }
+        else if (ArjunaConstants.WSARJ_NAMESPACE.equals(uri) && ArjunaConstants.WSARJ_ELEMENT_INSTANCE_IDENTIFIER.equals(localName)
+            && (attributes.getValue(WSA_NAMESPACE_URI, AddressingConstants.WSA_ATTRIBUTE_IS_REFERENCE_PARAMETER) != null))
+        {
+            inIdentifierElement = true ;
+        }
+        
+        getNextHandler().startElement(uri, localName, qName, attributes) ;
+    }
+    
+    /**
+     * End an element.
+     * @param uri The uri.
+     * @param localName The local name.
+     * @param qName The qualified name.
+     * @throws SAXException for any errors.
+     */
+    public void endElement(final String uri, final String localName, final String qName)
+        throws SAXException
+    {
+        if (characterContent.length() > 0)
+        {
+            if (inRewriteElement)
+            {
+                final String newValue = ProxyURIRewriting.rewriteURI(conversationIdentifier, characterContent.toString().trim()) ;
+                getNextHandler().characters(newValue.toCharArray(), 0, newValue.length()) ;
+                if (inToElement)
+                {
+                    toAddress = newValue ;
+                    inToElement = false;
+                }
+                inRewriteElement = false;
+            }
+            else if (inIdentifierElement)
+            {
+                identifier = characterContent.toString() ;
+                getNextHandler().characters(identifier.toCharArray(), 0, identifier.length()) ;
+                inIdentifierElement = false;
+            }
+            characterContent.setLength(0) ;
+        }
+        getNextHandler().endElement(uri, localName, qName) ;
+    }
+    
+    /**
+     * Process character text.
+     * @param chars The character array.
+     * @param start The start index.
+     * @param length The length of this section.
+     * @throws SAXException for any errors.
+     */
+    public void characters(char[] chars, int start, int length)
+        throws SAXException
+    {
+        if (inRewriteElement || inIdentifierElement)
+        {
+            characterContent.append(chars, start, length) ;
+        }
+        else
+        {
+            getNextHandler().characters(chars, start, length) ;
+        }
+    }
+    
+    /**
+     * Return the to address from the processing.
+     * @return The to address.
+     */
+    public String getToAddress()
+    {
+        return toAddress ;
+    }
+    
+    /**
+     * Return the identifier from the processing.
+     * @return The identifier.
+     */
+    public String getIdentifier()
+    {
+        return identifier ;
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/BaseHandler.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/BaseHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/BaseHandler.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,167 @@
+/*
+ * Created on 20-Jan-2005
+ */
+package com.jboss.transaction.wstf.proxy;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+
+/**
+ * Sax parser for rewriting the XML via the proxy.
+ * @author kevin
+ */
+public class BaseHandler implements ContentHandler
+{
+    /**
+     * The next handler in the sequence.
+     */
+    private final ContentHandler nextHandler ;
+    
+    /**
+     * Construct the base handler.
+     * @param nextHandler The next content handler.
+     */
+    protected BaseHandler(final ContentHandler nextHandler)
+    {
+	this.nextHandler = nextHandler ;
+    }
+    
+    /**
+     * Set the document locator.
+     * @param locator The document locator.
+     */
+    public void setDocumentLocator(final Locator locator)
+    {
+	nextHandler.setDocumentLocator(locator) ;
+    }
+    
+    /**
+     * Handle the procesing instruction.
+     * @param target The pi target.
+     * @param data The pi data.
+     * @throws SAXException for any errors.
+     */
+    public void processingInstruction(final String target, final String data)
+        throws SAXException
+    {
+	nextHandler.processingInstruction(target, data) ;
+    }
+    
+    /**
+     * Start the document.
+     * @throws SAXException for any errors.
+     */
+    public void startDocument()
+    	throws SAXException
+    {
+	nextHandler.startDocument() ;
+    }
+    
+    /**
+     * End the document.
+     * @throws SAXException for any errors.
+     */
+    public void endDocument()
+    	throws SAXException
+    {
+	nextHandler.endDocument() ;
+    }
+    
+    /**
+     * Start a prefix mapping.
+     * @param prefix The namespace prefix.
+     * @param uri The namespace uri.
+     * @throws SAXException for any errors.
+     */
+    public void startPrefixMapping(final String prefix, final String uri)
+        throws SAXException
+    {
+	nextHandler.startPrefixMapping(prefix, uri) ;
+    }
+    
+    /**
+     * End the prefix mapping.
+     * @param prefix The namespace prefix.
+     * @throws SAXException for any errors.
+     */
+    public void endPrefixMapping(final String prefix)
+    	throws SAXException
+    {
+	nextHandler.endPrefixMapping(prefix) ;
+    }
+    
+    /**
+     * Start an element.
+     * @param uri The uri.
+     * @param localName The local name.
+     * @param qName The qualified name.
+     * @param attributes The element attributes.
+     * @throws SAXException for any errors.
+     */
+    public void startElement(final String uri, final String localName, final String qName,
+        final Attributes attributes)
+    	throws SAXException
+    {
+	nextHandler.startElement(uri, localName, qName, attributes) ;
+    }
+    
+    /**
+     * End an element.
+     * @param uri The uri.
+     * @param localName The local name.
+     * @param qName The qualified name.
+     * @throws SAXException for any errors.
+     */
+    public void endElement(final String uri, final String localName, final String qName)
+        throws SAXException
+    {
+	nextHandler.endElement(uri, localName, qName) ;
+    }
+    
+    /**
+     * Process character text.
+     * @param chars The character array.
+     * @param start The start index.
+     * @param length The length of this section.
+     * @throws SAXException for any errors.
+     */
+    public void characters(char[] chars, int start, int length)
+        throws SAXException
+    {
+	nextHandler.characters(chars, start, length) ;
+    }
+    
+    /**
+     * Process ignorable white space.
+     * @param chars The character array.
+     * @param start The start index.
+     * @param length The length of this section.
+     * @throws SAXException for any errors.
+     */
+    public void ignorableWhitespace(char[] chars, int start, int length)
+        throws SAXException
+    {
+	nextHandler.ignorableWhitespace(chars, start, length) ;
+    }
+    
+    /**
+     * Skip an entity.
+     * @throws SAXException for any errors.
+     */
+    public void skippedEntity(final String name)
+    	throws SAXException
+    {
+	nextHandler.skippedEntity(name) ;
+    }
+    
+    /**
+     * Get the next handler.
+     * @return The next handler.
+     */
+    protected final ContentHandler getNextHandler()
+    {
+	return nextHandler ;
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/ProxyConversation.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/ProxyConversation.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/ProxyConversation.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,145 @@
+package com.jboss.transaction.wstf.proxy;
+
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.TreeMap;
+
+/**
+ * Message logging via the proxy.
+ */
+public class ProxyConversation
+{
+    /**
+     * The conversation id.
+     */
+    private static int currentConversationId ;
+    /**
+     * The conversation map.
+     */
+    private static Map conversationMap = new TreeMap() ;
+    /**
+     * The conversation state map.
+     */
+    private static Map conversationStateMap = new TreeMap() ;
+    
+    /**
+     * The marker for an internal id.
+     */
+    private static final char INTERNAL_ID = 'c' ;
+    /**
+     * The marker for an external id.
+     */
+    private static final char EXTERNAL_ID = 'C' ;
+    
+    /**
+     * Create a conversation.
+     * @return The id of the conversation. 
+     */
+    public static synchronized String createConversation()
+    {
+        final String conversationId = INTERNAL_ID + Integer.toString(++currentConversationId) ;
+        conversationMap.put(mapConversationId(conversationId), new ArrayList()) ;
+System.out.println("KEV: created conversation " + conversationId) ;        
+        return conversationId ;
+    }
+
+    /**
+     * Remove the conversation.
+     * @param conversationId The conversation id.
+     * @return The conversation messages in sequence.
+     */
+    public static synchronized String[] removeConversation(final String conversationId)
+    {
+        final ArrayList list = (ArrayList)conversationMap.remove(mapConversationId(conversationId)) ;
+System.out.println("KEV: removed conversation " + conversationId) ;        
+        return (list == null ? new String[0] : (String[])list.toArray(new String[list.size()])) ;
+    }
+    
+    /**
+     * Append a message to the conversation.
+     * @param conversationId The conversation id.
+     * @param message The message to append to the conversation.
+     */
+    public static synchronized void appendConversation(final String conversationId, final String message)
+    {
+        final ArrayList list = (ArrayList)conversationMap.get(mapConversationId(conversationId)) ;
+        if (list != null)
+        {
+            list.add(message) ;
+        }
+    }
+    
+    /**
+     * Set the conversation state for the specified conversation.
+     * @param conversationId The conversation id.
+     * @param conversationState The conversation state.
+     */
+    public static synchronized void setConversationState(final String conversationId, final ProxyConversationState conversationState)
+    {
+        conversationStateMap.put(mapConversationId(conversationId), conversationState) ;
+    }
+    
+    /**
+     * Get the conversation state for the specified conversation.
+     * @param conversationId The conversation id.
+     * @return The conversation state or null.
+     */
+    public static synchronized ProxyConversationState getConversationState(final String conversationId)
+    {
+        return (ProxyConversationState)conversationStateMap.get(mapConversationId(conversationId)) ;
+    }
+    
+    /**
+     * Clear the conversation state for the specified conversation.
+     * @param conversationId The conversation id.
+     */
+    public static synchronized void clearConversationState(final String conversationId)
+    {
+        conversationStateMap.remove(mapConversationId(conversationId)) ;
+    }
+    
+    /**
+     * Is the conversation id an internal id?
+     * @param conversationId The conversation id.
+     * @return True if the conversation id is internal, false if it is external.
+     */
+    public static boolean isInternalConversationId(final String conversationId)
+    {
+        return ((conversationId != null) && (conversationId.length() != 0) && (conversationId.charAt(0) == INTERNAL_ID)) ;
+    }
+    
+    /**
+     * Get the alternate conversation id.
+     * @param conversationId The current conversation id.
+     * @return The alternate conversation id.
+     */
+    public static String getAlternateConversationId(final String conversationId)
+    {
+        if ((conversationId == null) || (conversationId.length() == 0))
+        {
+            return conversationId ;
+        }
+        if (conversationId.charAt(0) == INTERNAL_ID)
+        {
+            return EXTERNAL_ID + mapConversationId(conversationId) ;
+        }
+        else
+        {
+            return INTERNAL_ID + mapConversationId(conversationId) ;
+        }
+    }
+    
+    /**
+     * Get the map conversation id.
+     * @param conversationId The full conversation id.
+     * @return The conversation id for the map.
+     */
+    private static String mapConversationId(final String conversationId)
+    {
+        if ((conversationId == null) || (conversationId.length() == 0))
+        {
+            return conversationId ;
+        }
+        return conversationId.substring(1) ;
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/ProxyConversationState.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/ProxyConversationState.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/ProxyConversationState.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,24 @@
+package com.jboss.transaction.wstf.proxy;
+
+import org.xml.sax.ContentHandler;
+
+/**
+ * Interface representing a conversation state.
+ */
+public interface ProxyConversationState
+{
+    /**
+     * Handle the next action in the sequence.
+     * @param action The SOAP action.
+     * @param identifier The identifier associated with the endpoint.
+     * @return true if the message should be dropped, false otherwise.
+     */
+    public boolean handleAction(final String action, final String identifier) ;
+
+    /**
+     * Get the Handler for rewriting the XML.
+     * @param nextHandler The next handler in the sequence.
+     * @return The handler or null if no rewriting required.
+     */
+    public ContentHandler getHandler(final ContentHandler nextHandler) ;
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/ProxyListenerService.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/ProxyListenerService.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/ProxyListenerService.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,412 @@
+/*
+ * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
+ *
+ * $Id: DummyListenerService.java,v 1.2 2004/06/24 13:52:53 nmcl Exp $
+ */
+
+package com.jboss.transaction.wstf.proxy;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.StringWriter;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.Enumeration;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.xml.sax.ContentHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.XMLReaderFactory;
+
+public class ProxyListenerService extends HttpServlet
+{
+    /**
+     * The SOAP 1.1 content type.
+     */
+    private static final String SOAP_11_CONTENT_TYPE = "text/xml" ;
+    /**
+     * The SOAP 1.2 content type.
+     */
+    private static final String SOAP_12_CONTENT_TYPE = "application/soap+xml" ;
+    /**
+     * The name of the SOAP Action header.
+     */
+    public static final String SOAP_ACTION_HEADER = "SOAPAction" ;
+    /**
+     * The name of the Transfer encoding header.
+     */
+    public static final String TRANSFER_ENCODING_HEADER = "transfer-encoding" ;
+    /**
+     * The name of the SOAP Action header.
+     */
+    public static final String TRANSFER_ENCODING_VALUE_CHUNKED = "chunked" ;
+    /**
+     * The default data size.
+     */
+    private static final int DEFAULT_DATA_SIZE = 256 ;
+    
+    /**
+     * Initialise the servlet.
+     * @param config The servlet configuration.
+     */
+    public void init(final ServletConfig config)
+        throws ServletException
+    {
+        super.init(config);
+        
+        // Initialise the local host:port/urlstub for the proxy.
+        final String proxyServiceURI = config.getInitParameter("proxyServiceURI") ;
+        if (proxyServiceURI == null)
+        {
+            throw new ServletException("Proxy service URI missing") ;
+        }
+        ProxyURIRewriting.setProxyURI(proxyServiceURI) ;
+    }
+    
+    /**
+     * Handle the post request.
+     * @param httpServletRequest The current HTTP servlet request.
+     * @param httpServletResponse The current HTTP servlet response.
+     */
+    public void doPost(final HttpServletRequest httpServletRequest, final HttpServletResponse httpServletResponse)
+        throws ServletException, IOException
+    {
+        final String conversationIdentifier = getConversationIdentifier(httpServletRequest) ;
+        
+        final byte[] requestContents = getContents(httpServletRequest.getInputStream()) ;
+        final String soapAction = httpServletRequest.getHeader(SOAP_ACTION_HEADER) ;
+        final boolean jbossClient = ProxyConversation.isInternalConversationId(conversationIdentifier) ;
+        final String alternateConversationIdentifier = ProxyConversation.getAlternateConversationId(conversationIdentifier) ;
+        
+        final ProxyConversationState state = ProxyConversation.getConversationState(conversationIdentifier) ;
+
+System.out.println("KEV: processing SOAP action " + trimAction(soapAction)) ;
+        // Search header for wsa:To and wsa:Address elements, changing their URL parts as we go.
+        // Get the target URL from the to.
+        try
+        {
+            final StringWriter newMessageWriter = new StringWriter() ;
+            final WriterSAXHandler writerHandler = new WriterSAXHandler(newMessageWriter) ;
+            final AddressingProxySAXHandler addressingHandler = new AddressingProxySAXHandler(writerHandler, alternateConversationIdentifier) ;
+            
+            ContentHandler stateHandler = (state == null ? null : state.getHandler(addressingHandler)) ;
+            ContentHandler parserHandler = (stateHandler == null ? addressingHandler : stateHandler) ;
+            
+            final XMLReader xmlReader = XMLReaderFactory.createXMLReader() ;
+            xmlReader.setContentHandler(parserHandler) ;
+            xmlReader.parse(new InputSource(new ByteArrayInputStream(requestContents))) ;
+            
+            final StringBuffer newMessageBuffer = newMessageWriter.getBuffer() ;
+            final StringBuffer messageBuffer = (jbossClient ? newMessageBuffer : new StringBuffer(new String(requestContents))) ;
+            
+            ProxyConversation.appendConversation(conversationIdentifier, checkForXMLDecl(messageBuffer)) ;
+
+            final String identifier = addressingHandler.getIdentifier() ;
+            if ((state != null) && state.handleAction(trimAction(soapAction), identifier))  
+            {
+                httpServletResponse.setStatus(HttpServletResponse.SC_ACCEPTED) ;
+                httpServletResponse.flushBuffer() ;
+                return ;
+            }
+            
+            // parse input stream
+            
+            final URL destURL = new URL(addressingHandler.getToAddress()) ;
+            final HttpURLConnection destConnection = (HttpURLConnection)destURL.openConnection() ;
+            try
+            {
+                destConnection.setDoOutput(true) ;
+                destConnection.setUseCaches(false) ;
+                
+                // copy the headers
+                final Enumeration headerNameEnum = httpServletRequest.getHeaderNames() ;
+                while(headerNameEnum.hasMoreElements())
+                {
+                    final String name = (String)headerNameEnum.nextElement() ;
+                    if (name.equalsIgnoreCase(TRANSFER_ENCODING_HEADER))
+                    {
+                        // any messages we send are not chunked!
+                        final String value = httpServletRequest.getHeader(name) ;
+                        if (!value.equalsIgnoreCase(TRANSFER_ENCODING_VALUE_CHUNKED))
+                        {
+                            // this may actually cause a problem depending upon the encoding but try it anyway
+                            destConnection.setRequestProperty(name, value) ;
+                        }
+                    }
+                    else
+                    {
+                        final String value = httpServletRequest.getHeader(name) ;
+                        destConnection.setRequestProperty(name, value) ;
+                    }
+                }
+                
+                // Set content length
+                destConnection.setRequestProperty("Content-Length", Integer.toString(newMessageBuffer.length())) ;
+        		final int port = destURL.getPort() ;
+        		final String host = (port > 0 ? destURL.getHost() + ":" + port : destURL.getHost()) ;
+                destConnection.setRequestProperty("Host", host) ;
+                destConnection.setRequestMethod("POST") ;
+                // Connect
+                destConnection.connect() ;
+                // Write the new request
+                final OutputStream os = destConnection.getOutputStream() ;
+                os.write(newMessageBuffer.toString().getBytes()) ;
+                os.flush() ;
+                os.close() ;
+                
+                final int responseCode = destConnection.getResponseCode() ;
+                final String fullContentType = destConnection.getContentType() ;
+                final String contentType = getContentType(fullContentType) ;
+                switch (responseCode)
+                {
+                    case HttpServletResponse.SC_OK:
+                    case HttpServletResponse.SC_ACCEPTED:
+                        if ((contentType != null) && !(SOAP_11_CONTENT_TYPE.equals(contentType) ||
+                            SOAP_12_CONTENT_TYPE.equals(contentType)))
+                        {
+                            httpServletResponse.setStatus(HttpServletResponse.SC_ACCEPTED) ;
+                            httpServletResponse.flushBuffer() ;
+                            break ;
+                        }
+                        // FALL THRU
+                    default:
+                        // Pass the response back.
+                        httpServletResponse.setStatus(destConnection.getResponseCode()) ;
+                        if (fullContentType != null)
+                        {
+                            httpServletResponse.setContentType(fullContentType) ;
+                        }
+                        
+                        // Copy data
+                        final int datasize = DEFAULT_DATA_SIZE ;
+                        final char[] data = new char[datasize] ;
+                        int readCount ;
+                        
+                        final InputStream is ;
+                        if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR)
+                        {
+                            is = destConnection.getErrorStream() ;
+                        }
+                        else
+                        {
+                            is = destConnection.getInputStream() ;
+                        }
+                        if (is != null) {
+                            final byte[] responseBytes = getContents(is) ;
+                            if (responseBytes.length > 0) {
+                                try
+                                {
+                                    final StringWriter newResponseWriter = new StringWriter() ;
+                                    final WriterSAXHandler responseWriterHandler = new WriterSAXHandler(newResponseWriter) ;
+                                    final AddressingProxySAXHandler responseAddressingHandler = new AddressingProxySAXHandler(responseWriterHandler, alternateConversationIdentifier) ;
+
+                                    // refetch the state handler so it gets a chance to go away
+                                    stateHandler = (state == null ? null : state.getHandler(responseAddressingHandler)) ;
+                                    parserHandler = (stateHandler == null ? responseAddressingHandler : stateHandler) ;
+
+                                    // always use the standard handler for replies?
+                                    final XMLReader responseXmlReader = XMLReaderFactory.createXMLReader() ;
+                                    responseXmlReader.setContentHandler(parserHandler) ;
+                                    responseXmlReader.parse(new InputSource(new ByteArrayInputStream(responseBytes))) ;
+
+                                    final StringBuffer newResponseBuffer = newResponseWriter.getBuffer() ;
+                                    final String newResponseString = newResponseBuffer.toString();
+
+                                    final String responseString = (jbossClient ? newResponseString : new String(responseBytes));
+                                    if ((contentType != null) && !(SOAP_11_CONTENT_TYPE.equals(contentType) ||
+                                            SOAP_12_CONTENT_TYPE.equals(contentType)))
+                                    {
+                                        ProxyConversation.appendConversation(conversationIdentifier, escapeContents(responseString)) ;
+                                    }
+                                    else
+                                    {
+                                        ProxyConversation.appendConversation(conversationIdentifier, responseString) ;
+                                    }
+                                    final ServletOutputStream sos = httpServletResponse.getOutputStream() ;
+                                    sos.print(newResponseString) ;
+                                    sos.flush() ;
+                                    httpServletResponse.setContentLength(newResponseString.length()) ;
+                                }
+                                finally
+                                {
+                                    is.close() ;
+                                }
+                            } else {
+                                httpServletResponse.setContentLength(0) ;
+                            }
+                        } else {
+                            httpServletResponse.setContentLength(0) ;
+                        }
+                        break ;
+                }
+            }
+            finally
+            {
+                destConnection.disconnect() ;
+            }
+        }
+        catch (Exception exception)
+        {
+            System.err.println("Proxy Listener Service: " + exception);
+            exception.printStackTrace() ;
+        }
+        catch (Error error)
+        {
+            System.err.println("Proxy Listener Service: " + error);
+            error.printStackTrace() ;
+        }
+    }
+    
+    /**
+     * Trim quotes from the action.
+     * @param action The action.
+     * @return The trimmed action.
+     */
+    private static String trimAction(final String action)
+    {
+        final int length = (action == null ? 0 : action.length()) ;
+        if ((length < 2) || (action.charAt(0) != '"') || (action.charAt(length-1) != '"'))
+        {
+            return action ;
+        }
+        return action.substring(1, length-1) ;
+    }
+
+    /**
+     * Get the content type part.
+     * @param fullContentType The full content type.
+     * @return The content type.
+     */
+    private static String getContentType(final String fullContentType)
+    {
+        if (fullContentType == null)
+        {
+            return null ;
+        }
+        final int separatorIndex = fullContentType.indexOf(';') ;
+        return (separatorIndex == -1 ? fullContentType : fullContentType.substring(0, separatorIndex)) ;
+    }
+
+    /**
+     * Get the conversation identifier from the request.
+     * @return The conversation identifier.
+     */
+    private static String getConversationIdentifier(final HttpServletRequest httpServletRequest)
+    {
+        final String pathInfo = httpServletRequest.getPathInfo() ;
+        final int separator = pathInfo.indexOf('/', 1) ;
+        return pathInfo.substring(1, separator) ;
+    }
+    
+    /**
+     * Get the contents of the input stream
+     * @param is The input stream.
+     * @return The contents.
+     * @throws IOException for errors.
+     */
+    private byte[] getContents(final InputStream is)
+    	throws IOException
+    {
+        final ByteArrayOutputStream baos = new ByteArrayOutputStream() ;
+        final byte[] buffer = new byte[1024] ;
+        int readCount ;
+        do
+        {
+            readCount = is.read(buffer, 0, buffer.length) ;
+            if (readCount > 0)
+            {
+                baos.write(buffer, 0, readCount) ;
+            }
+        }
+        while(readCount > 0) ;
+        return baos.toByteArray() ;
+    }
+    
+    /**
+     * Check for the XML declaration and remove.
+     * This method is only used if we are intending to log the SOAP message so that it is easy to combine the XML without creating invalid documents.
+     * @param contents The current stream contents.
+     * @return The stream contents as a string.
+     */
+    private static String checkForXMLDecl(final StringBuffer contents)
+    {
+        int count = 0 ;
+        try
+        {
+            while(Character.isWhitespace(contents.charAt(count))) count++ ;
+            if (contents.charAt(count) == '<')
+            {
+                if (contents.charAt(count+1) == '?')
+                {
+                    count+=2 ;
+                    while(contents.charAt(count++) != '>') ;
+                }
+            }
+            if (count > 0)
+            {
+                contents.delete(0, count) ;
+            }
+        }
+        catch (final StringIndexOutOfBoundsException sioobe) {}
+        
+        return contents.toString() ;
+    }
+    
+    /**
+     * Escape the contents of the string.
+     * @param contents The original contents.
+     * @return The escaped contents.
+     */
+    private static String escapeContents(final String contents)
+    {
+        final int length = contents.length() ;
+        StringWriter escapedContents = null ;
+        
+        for(int count = 0 ; count < length ; count++)
+        {
+            final char ch = contents.charAt(count) ;
+            if ((ch == '<') || (ch == '>') || (ch == '&') || (ch == '"'))
+            {
+                if (escapedContents == null)
+                {
+                    escapedContents = new StringWriter(length) ;
+                    if (count > 0)
+                    {
+                        escapedContents.write(contents, 0, count-1) ;
+                    }
+                }
+                if (ch == '<')
+                {
+                    escapedContents.write("&lt;") ;
+                }
+                else if (ch == '>')
+                {
+                    escapedContents.write("&gt;") ;
+                }
+                else if (ch == '&')
+                {
+                    escapedContents.write("&amp;") ;
+                }
+                else if (ch == '"')
+                {
+                    escapedContents.write("&quot;") ;
+                }
+            }
+            else if (escapedContents != null)
+            {
+                escapedContents.write(ch) ;
+            }
+        }
+        return (escapedContents == null ? contents : escapedContents.toString()) ;
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/ProxyURIRewriting.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/ProxyURIRewriting.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/ProxyURIRewriting.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,139 @@
+package com.jboss.transaction.wstf.proxy;
+
+
+/**
+ * @author kevin
+ */
+public class ProxyURIRewriting
+{
+    /**
+     * The base URI of the proxy.
+     */
+    private static String PROXY_URI ;
+    
+    /**
+     * Set the proxy URI.
+     * @param proxyURI The proxy URI.
+     */
+    public static synchronized void setProxyURI(final String proxyURI)
+    {
+        PROXY_URI = proxyURI ;
+    }
+    
+    /**
+     * Get the proxy URI.
+     * @return The proxy URI.
+     */
+    public static synchronized String getProxyURI()
+    {
+        return PROXY_URI ;
+    }
+    
+    /**
+     * Rewrite the URI.
+     * @param conversationIdentifier The conversation identifier.
+     * @param uri The uri to be rewritten.
+     * @return The replacement URI.
+     */
+    public static String rewriteURI(final String conversationIdentifier, final String uri)
+    {
+        final String proxyURI = getProxyURI() ;
+        
+        if (uri != null)
+        {
+            if (uri.startsWith(proxyURI))
+            {
+                final int separatorIndex = uri.indexOf('/', proxyURI.length()+1) ;
+                final String remainder = uri.substring(separatorIndex+1) ;
+                return decodeURI(remainder) ;
+            }
+            else if (!uri.startsWith("http://www.w3.org/"))
+            {
+                return proxyURI + "/" + conversationIdentifier + "/" + encodeURI(uri) ;
+            }
+        }
+        return uri ;
+    }
+    
+    /**
+     * Decode a URI that has been encoded.
+     * @param uri The encoded URI.
+     * @return The decoded URI.
+     */
+    public static String decodeURI(final String uri)
+    {
+        if (uri == null)
+        {
+            return null ;
+        }
+        final StringBuffer result = new StringBuffer() ;
+        final int length = uri.length() ;
+        int separatorCount = 0 ;
+        for(int count = 0 ; count < length ; count++)
+        {
+            final char ch = uri.charAt(count) ;
+            if (separatorCount < 3)
+            {
+                if (ch == '-')
+                {
+                    result.append("/") ;
+                    separatorCount++ ;
+                    continue ;
+                }
+                else if (ch == '_')
+                {
+                    result.append(":") ;
+                    continue ;
+                }
+                result.append(ch) ;
+            }
+            else
+            {
+                result.append(ch) ;
+            }
+        }
+        return result.toString() ;
+    }
+    
+    /**
+     * Encode a URI.
+     * @param uri The URI.
+     * @return The encoded URI.
+     */
+    public static String encodeURI(final String uri)
+    {
+        if (uri == null)
+        {
+            return "" ;
+        }
+        
+        final StringBuffer result = new StringBuffer() ;
+        final int length = uri.length() ;
+        int separatorCount = 0 ;
+        for(int count = 0 ; count < length ; count++)
+        {
+            final char ch = uri.charAt(count) ;
+            if (separatorCount < 3)
+            {
+                if (ch == '/')
+                {
+                    separatorCount++ ;
+                    result.append("-") ;
+                }
+                else if (ch == ':')
+                {
+                    result.append("_") ;
+                }
+                else
+                {
+                    result.append(ch) ;
+                }
+            }
+            else
+            {
+                result.append(ch) ;
+            }
+        }
+        return result.toString() ;
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/WriterSAXHandler.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/WriterSAXHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/WriterSAXHandler.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,394 @@
+/*
+ * Created on 20-Jan-2005
+ */
+package com.jboss.transaction.wstf.proxy;
+
+import java.io.PrintWriter;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Stack;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+
+/**
+ * Sax parser for rewriting the XML via the proxy.
+ * @author kevin
+ */
+public class WriterSAXHandler implements ContentHandler
+{
+    /**
+     * Do we need to end the start tag?
+     */
+    private boolean endStartTag ;
+    /**
+     * The to address.
+     */
+    private String toAddress ;
+    /**
+     * The identifier.
+     */
+    private String identifier ;
+    /**
+     * The string buffer for text element content.
+     */
+    private StringBuffer characterContent = new StringBuffer() ;
+    /**
+     * The new namespaces.
+     */
+    private List newNamespaces = new ArrayList() ;
+    /**
+     * The stack of active namespaces.
+     */
+    private Stack namespaceStack = new Stack() ;
+    /**
+     * The active namespaces.
+     */
+    private Map activeNamespaces = new HashMap() ;
+    
+    /**
+     * The writer for output.
+     */
+    private final PrintWriter printWriter ;
+    
+    /**
+     * Construct the SAX handler with the output writer.
+     * @param writer The writer for output.
+     */
+    public WriterSAXHandler(final Writer writer)
+    {
+        this.printWriter = new PrintWriter(writer) ;
+    }
+    
+    /**
+     * Set the document locator.
+     * @param locator The document locator.
+     */
+    public void setDocumentLocator(final Locator locator)
+    {
+    }
+    
+    /**
+     * Handle the procesing instruction.
+     * @param target The pi target.
+     * @param data The pi data.
+     * @throws SAXException for any errors.
+     */
+    public void processingInstruction(final String target, final String data)
+        throws SAXException
+    {
+    }
+    
+    /**
+     * Start the document.
+     * @throws SAXException for any errors.
+     */
+    public void startDocument()
+    	throws SAXException
+    {
+    }
+    
+    /**
+     * End the document.
+     * @throws SAXException for any errors.
+     */
+    public void endDocument()
+    	throws SAXException
+    {
+        printWriter.flush() ;
+    }
+    
+    /**
+     * Start a prefix mapping.
+     * @param prefix The namespace prefix.
+     * @param uri The namespace uri.
+     * @throws SAXException for any errors.
+     */
+    public void startPrefixMapping(final String prefix, final String uri)
+        throws SAXException
+    {
+        newNamespaces.add(new NamespaceInfo(prefix, uri)) ;
+    }
+    
+    /**
+     * End the prefix mapping.
+     * @param prefix The namespace prefix.
+     * @throws SAXException for any errors.
+     */
+    public void endPrefixMapping(final String prefix)
+    	throws SAXException
+    {
+    }
+    
+    /**
+     * Start an element.
+     * @param uri The uri.
+     * @param localName The local name.
+     * @param qName The qualified name.
+     * @param attributes The element attributes.
+     * @throws SAXException for any errors.
+     */
+    public void startElement(final String uri, final String localName, final String qName,
+        final Attributes attributes)
+    	throws SAXException
+    {
+        checkEndStartTag() ;
+        
+        namespaceStack.push(activeNamespaces) ;
+        final Iterator newNamespacesIter = newNamespaces.iterator() ;
+        final String namespaces ;
+        if (newNamespacesIter.hasNext())
+        {
+            final HashMap newActiveNamespaces = new HashMap(activeNamespaces) ;
+            final StringBuffer namespacesValue = new StringBuffer() ;
+            do
+            {
+                final NamespaceInfo namespaceInfo = (NamespaceInfo)newNamespacesIter.next() ;
+                final String namespacePrefix = namespaceInfo.getPrefix() ;
+                final String namespaceURI = namespaceInfo.getURI() ;
+                newActiveNamespaces.put(namespaceURI, namespacePrefix) ;
+               
+                namespacesValue.append(" xmlns") ;
+                if ((namespacePrefix != null) && (namespacePrefix.length() > 0))
+                {
+                    namespacesValue.append(':') ;
+                    namespacesValue.append(namespacePrefix) ;
+                }
+                namespacesValue.append("=\"") ;
+                namespacesValue.append(namespaceURI) ;
+                namespacesValue.append('"') ;
+            }
+            while(newNamespacesIter.hasNext()) ;
+            newNamespaces.clear() ;
+            activeNamespaces = newActiveNamespaces ;
+            namespaces = namespacesValue.toString() ;
+        }
+        else
+        {
+            namespaces = null ;
+        }
+        
+        printWriter.write('<') ;
+        printWriter.write(getQName(uri, localName, qName)) ;
+        if (namespaces != null)
+        {
+            printWriter.write(namespaces) ;
+        }
+        
+        final int numAttributes = attributes.getLength() ;
+        if (numAttributes > 0)
+        {
+            for(int count = 0 ; count < numAttributes ; count++)
+            {
+                printWriter.write(' ') ;
+                final String attributeQName = getQName(attributes.getURI(count), attributes.getLocalName(count), attributes.getQName(count)) ;
+                printWriter.write(attributeQName) ;
+                printWriter.write("=\"") ;
+                final String value = attributes.getValue(count) ;
+                escapeTextContent(value.toCharArray(), 0, value.length()) ;
+                printWriter.write('"') ;
+            }
+        }
+        
+        endStartTag = true ;
+    }
+    
+    /**
+     * End an element.
+     * @param uri The uri.
+     * @param localName The local name.
+     * @param qName The qualified name.
+     * @throws SAXException for any errors.
+     */
+    public void endElement(final String uri, final String localName, final String qName)
+        throws SAXException
+    {
+        characterContent.setLength(0) ;
+        if (endStartTag)
+        {
+            printWriter.write("/>") ;
+        }
+        else
+        {
+            printWriter.write("</") ;
+            printWriter.write(qName) ;
+            printWriter.write('>') ;
+        }
+        activeNamespaces = (Map)namespaceStack.pop() ;
+        endStartTag = false ;
+    }
+    
+    /**
+     * Process character text.
+     * @param chars The character array.
+     * @param start The start index.
+     * @param length The length of this section.
+     * @throws SAXException for any errors.
+     */
+    public void characters(char[] chars, int start, int length)
+        throws SAXException
+    {
+        checkEndStartTag() ;
+        escapeTextContent(chars, start, length) ;
+    }
+    
+    /**
+     * Process ignorable white space.
+     * @param chars The character array.
+     * @param start The start index.
+     * @param length The length of this section.
+     * @throws SAXException for any errors.
+     */
+    public void ignorableWhitespace(char[] chars, int start, int length)
+        throws SAXException
+    {
+        checkEndStartTag() ;
+        printWriter.write(chars, start, length) ;
+    }
+    
+    /**
+     * Skip an entity.
+     * @throws SAXException for any errors.
+     */
+    public void skippedEntity(final String name)
+    	throws SAXException
+    {
+    }
+    
+    /**
+     * Get the qualified name of the element/attribute.
+     * @param uri The qualifed namespace uri or empty string.
+     * @param localName The qualified local name.
+     * @param qName The qualified name.
+     * @return The qualified name of the element/attribute.
+     */
+    private String getQName(final String uri, final String localName, final String qName)
+    {
+        if (uri.length() > 0)
+        {
+            final String prefix = (String)activeNamespaces.get(uri) ;
+            if (prefix.length() > 0)
+            {
+                return prefix + ":" + localName ;
+            }
+            else
+            {
+                return localName ;
+            }
+        }
+        else
+        {
+            return qName ;
+        }
+    }
+    
+    /**
+     * Check to see if the end of the start tag has been processed.
+     */
+    private void checkEndStartTag()
+    {
+        if (endStartTag)
+        {
+            printWriter.write('>') ;
+            endStartTag = false ;
+        }
+    }
+    
+    /**
+     * Escape the contents of a text element.
+     * @param chars The character array.
+     * @param start The start index.
+     * @param length The length of this section.
+     */
+    private void escapeTextContent(final char[] chars, final int start, final int length)
+    {
+        final int end = start + length ;
+        for(int count = start ; count < end ; count++)
+        {
+            final char ch = chars[count] ;
+            switch(ch)
+            {
+                case '<':
+                    printWriter.print("&lt;") ;
+                    break ;
+                case '>':
+                    printWriter.print("&gt;") ;
+                    break ;
+                case '&':
+                    printWriter.print("&amp;") ;
+                    break ;
+                case '"':
+                    printWriter.print("&quot;") ;
+                    break ;
+                default:
+                    printWriter.print(ch) ;
+                    break ;
+            }
+        }
+    }
+    
+    /**
+     * Return the to address from the processing.
+     * @return The to address.
+     */
+    public String getToAddress()
+    {
+        return toAddress ;
+    }
+    
+    /**
+     * Return the identifier from the processing.
+     * @return The identifier.
+     */
+    public String getIdentifier()
+    {
+        return identifier ;
+    }
+    
+    private static final class NamespaceInfo
+    {
+        /**
+         * The namespace prefix.
+         */
+        private final String prefix ;
+        /**
+         * The namespace uri.
+         */
+        private final String uri ;
+        
+        /**
+         * Construct the namespace information.
+         * @param prefix The namespace prefix.
+         * @param uri The namespace uri.
+         */
+        NamespaceInfo(final String prefix, final String uri)
+        {
+            this.prefix = prefix ;
+            this.uri = uri ;
+        }
+        
+        /**
+         * Get the namespace prefix.
+         * @return The namespace prefix.
+         */
+        String getPrefix()
+        {
+            return prefix ;
+        }
+        
+        /**
+         * Get the namespace URI.
+         * @return The namespace URI.
+         */
+        String getURI()
+        {
+            return uri ;
+        }
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/TestConstants.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/TestConstants.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/TestConstants.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,205 @@
+package com.jboss.transaction.wstf.test ;
+
+import java.util.Map;
+import java.util.TreeMap;
+
+import com.jboss.transaction.wstf.webservices.sc007.InteropConstants;
+
+/**
+ * This class contains constants used to map the front end onto
+ * the WS-TX interop tests.
+ * @author kevin
+ */
+public class TestConstants
+{
+    /**
+     * The name of the Service URI parameter.
+     */
+    public static final String PARAM_SERVICE_URI = "serviceuri" ;
+    /**
+     * The name of the test parameter.
+     */
+    public static final String PARAM_TEST = "test" ;
+    /**
+     * The name of the test timeout parameter.
+     */
+    public static final String PARAM_TEST_TIMEOUT = "testTimeout" ;
+    /**
+     * The name of the asynchronous test flag parameter.
+     */
+    public static final String PARAM_ASYNC_TEST = "asyncTest" ;
+    
+    /**
+     * The name of the test results attribute.
+     */
+    public static final String ATTRIBUTE_TEST_RESULT = "testResult" ;
+    /**
+     * The name of the test validation attribute.
+     */
+    public static final String ATTRIBUTE_TEST_VALIDATION = "testValidation" ;
+    /**
+     * The name of the log count attribute.
+     */
+    public static final String ATTRIBUTE_LOG_COUNT = "logCount" ;
+    /**
+     * The name of the log name attribute.
+     */
+    public static final String ATTRIBUTE_LOG_NAME = "logName" ;
+    
+    /**
+     * test name for all tests
+     */
+    public static final String NAME_ALL_TESTS = "allTests" ;
+    /**
+     * The prefix for all AT tests.
+     */
+    public static final String PREFIX_TESTS = "test" ;
+    /**
+     * test name for AT Scenario 1.1
+     */
+    public static final String NAME_TEST_AT_1_1 = PREFIX_TESTS + "1_1" ;
+    /**
+     * test description for AT Scenario 1.1
+     */
+    public static final String DESCRIPTION_TEST_1_1 = "1.1 - " + InteropConstants.INTEROP_ELEMENT_COMPLETION_COMMIT ;
+    /**
+     * test name for AT Scenario 1.2
+     */
+    public static final String NAME_TEST_1_2 = PREFIX_TESTS + "1_2" ;
+    /**
+     * test description for AT Scenario 1.2
+     */
+    public static final String DESCRIPTION_TEST_1_2 = "1.2 - " + InteropConstants.INTEROP_ELEMENT_COMPLETION_ROLLBACK ;
+    /**
+     * test name for AT Scenario 2.1
+     */
+    public static final String NAME_TEST_2_1 = PREFIX_TESTS + "2_1" ;
+    /**
+     * test description for AT Scenario 2.1
+     */
+    public static final String DESCRIPTION_TEST_2_1 = "2.1 - " + InteropConstants.INTEROP_ELEMENT_COMMIT ;
+    /**
+     * test name for AT Scenario 2.2
+     */
+    public static final String NAME_TEST_2_2 = PREFIX_TESTS + "2_2" ;
+    /**
+     * test description for AT Scenario 2.2
+     */
+    public static final String DESCRIPTION_TEST_2_2 = "2.2 - " + InteropConstants.INTEROP_ELEMENT_ROLLBACK ;
+    /**
+     * test name for AT Scenario 3.1
+     */
+    public static final String NAME_TEST_3_1 = PREFIX_TESTS + "3_1" ;
+    /**
+     * test description for AT Scenario 3.1
+     */
+    public static final String DESCRIPTION_TEST_3_1 = "3.1 - " + InteropConstants.INTEROP_ELEMENT_PHASE_2_ROLLBACK ;
+    /**
+     * test name for AT Scenario 3.2
+     */
+    public static final String NAME_TEST_3_2 = PREFIX_TESTS + "3_2" ;
+    /**
+     * test description for AT Scenario 3.2
+     */
+    public static final String DESCRIPTION_TEST_3_2 = "3.2 - " + InteropConstants.INTEROP_ELEMENT_READONLY ;
+    /**
+     * test name for AT Scenario 3.3
+     */
+    public static final String NAME_TEST_3_3 = PREFIX_TESTS + "3_3" ;
+    /**
+     * test description for AT Scenario 3.3
+     */
+    public static final String DESCRIPTION_TEST_3_3 = "3.3 - " + InteropConstants.INTEROP_ELEMENT_VOLATILE_AND_DURABLE ;
+    /**
+     * test name for AT Scenario 4.1
+     */
+    public static final String NAME_TEST_4_1 = PREFIX_TESTS + "4_1" ;
+    /**
+     * test description for AT Scenario 4.1
+     */
+    public static final String DESCRIPTION_TEST_4_1 = "4.1 - " + InteropConstants.INTEROP_ELEMENT_EARLY_READONLY ;
+    /**
+     * test name for AT Scenario 4.2
+     */
+    public static final String NAME_TEST_4_2 = PREFIX_TESTS + "4_2" ;
+    /**
+     * test description for AT Scenario 4.2
+     */
+    public static final String DESCRIPTION_TEST_4_2 = "4.2 - " + InteropConstants.INTEROP_ELEMENT_EARLY_ABORTED ;
+    /**
+     * test name for AT Scenario 5.1
+     */
+    public static final String NAME_TEST_5_1 = PREFIX_TESTS + "5_1" ;
+    /**
+     * test description for AT Scenario 5.1
+     */
+    public static final String DESCRIPTION_TEST_5_1 = "5.1 - " + InteropConstants.INTEROP_ELEMENT_REPLAY_COMMIT ;
+    /**
+     * test name for AT Scenario 5.2
+     */
+    public static final String NAME_TEST_5_2 = PREFIX_TESTS + "5_2" ;
+    /**
+     * test description for AT Scenario 5.2
+     */
+    public static final String DESCRIPTION_TEST_5_2 = "5.2 - " + InteropConstants.INTEROP_ELEMENT_RETRY_PREPARED_COMMIT ;
+    /**
+     * test name for AT Scenario 5.3
+     */
+    public static final String NAME_TEST_5_3 = PREFIX_TESTS + "5_3" ;
+    /**
+     * test description for AT Scenario 5.3
+     */
+    public static final String DESCRIPTION_TEST_5_3 = "5.3 - " + InteropConstants.INTEROP_ELEMENT_RETRY_PREPARED_ABORT ;
+    /**
+     * test name for AT Scenario 5.4
+     */
+    public static final String NAME_TEST_5_4 = PREFIX_TESTS + "5_4" ;
+    /**
+     * test description for AT Scenario 5.4
+     */
+    public static final String DESCRIPTION_TEST_5_4 = "5.4 - " + InteropConstants.INTEROP_ELEMENT_RETRY_COMMIT ;
+    /**
+     * test name for AT Scenario 5.5
+     */
+    public static final String NAME_TEST_5_5 = PREFIX_TESTS + "5_5" ;
+    /**
+     * test description for AT Scenario 5.5
+     */
+    public static final String DESCRIPTION_TEST_5_5 = "5.5 - " + InteropConstants.INTEROP_ELEMENT_PREPARED_AFTER_TIMEOUT ;
+    /**
+     * test name for AT Scenario 5.6
+     */
+    public static final String NAME_TEST_5_6 = PREFIX_TESTS + "5_6" ;
+    /**
+     * test description for AT Scenario 5.6
+     */
+    public static final String DESCRIPTION_TEST_5_6 = "5.6 - " + InteropConstants.INTEROP_ELEMENT_LOST_COMMITTED ;
+
+    /**
+     * The name to description map.
+     */
+    public static final Map DESCRIPTIONS ;
+    
+    static
+    {
+        final TreeMap descriptions = new TreeMap() ;
+        
+        descriptions.put(NAME_TEST_AT_1_1, DESCRIPTION_TEST_1_1) ;
+        descriptions.put(NAME_TEST_1_2, DESCRIPTION_TEST_1_2) ;
+        descriptions.put(NAME_TEST_2_1, DESCRIPTION_TEST_2_1) ;
+        descriptions.put(NAME_TEST_2_2, DESCRIPTION_TEST_2_2) ;
+        descriptions.put(NAME_TEST_3_1, DESCRIPTION_TEST_3_1) ;
+        descriptions.put(NAME_TEST_3_2, DESCRIPTION_TEST_3_2) ;
+        descriptions.put(NAME_TEST_3_3, DESCRIPTION_TEST_3_3) ;
+        descriptions.put(NAME_TEST_4_1, DESCRIPTION_TEST_4_1) ;
+        descriptions.put(NAME_TEST_4_2, DESCRIPTION_TEST_4_2) ;
+        descriptions.put(NAME_TEST_5_1, DESCRIPTION_TEST_5_1) ;
+        descriptions.put(NAME_TEST_5_2, DESCRIPTION_TEST_5_2) ;
+        descriptions.put(NAME_TEST_5_3, DESCRIPTION_TEST_5_3) ;
+        descriptions.put(NAME_TEST_5_4, DESCRIPTION_TEST_5_4) ;
+        descriptions.put(NAME_TEST_5_5, DESCRIPTION_TEST_5_5) ;
+        descriptions.put(NAME_TEST_5_6, DESCRIPTION_TEST_5_6) ;
+
+        DESCRIPTIONS = descriptions ;
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/TestLogController.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/TestLogController.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/TestLogController.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,84 @@
+package com.jboss.transaction.wstf.test;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+
+/**
+ * The test log controller.
+ * @author kevin
+ */
+public class TestLogController
+{
+    /**
+     * The base directory for logs, hardcoded for now.
+     */
+    private static File baseDir ;
+    
+    static
+    {
+        final String userHome = System.getProperty("user.home") ;
+        baseDir = new File(userHome, "logs") ;
+        if (!baseDir.exists())
+        {
+            baseDir.mkdir() ;
+        }
+    }
+
+    /**
+     * Read the contents of the specified log.
+     * @param logName The log to retrieve.
+     * @return The log contents.
+     * @throws IOException for reading errors.
+     */
+    public static String readLog(final String logName)
+        throws IOException
+    {
+        final File logFile = new File(baseDir, logName) ;
+        if (logFile.exists() && logFile.canRead())
+        {
+            final FileReader reader = new FileReader(logFile) ;
+            try
+            {
+                final StringBuffer buffer = new StringBuffer() ;
+                final char[] charBuffer = new char[256] ;
+                while(reader.ready())
+                {
+                    final int count = reader.read(charBuffer) ;
+                    if (count > 0)
+                    {
+                        buffer.append(charBuffer, 0, count) ;
+                    }
+                }
+                return buffer.toString() ;
+            }
+            finally
+            {
+                reader.close() ;
+            }
+        }
+        throw new IOException("Cannot read log file: " + logName) ;
+    }
+
+    /**
+     * Write the contents of the specified log.
+     * @param logName The log to write.
+     * @param contents The log contents.
+     * @throws IOException for reading errors.
+     */
+    public static void writeLog(final String logName, final String contents)
+        throws IOException
+    {
+        final File logFile = new File(baseDir, logName) ;
+        final FileWriter writer = new FileWriter(logFile) ;
+        try
+        {
+            writer.write(contents) ;
+        }
+        finally
+        {
+            writer.close() ;
+        }
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/TestLogServlet.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/TestLogServlet.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/TestLogServlet.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,96 @@
+package com.jboss.transaction.wstf.test;
+
+import java.io.IOException;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import com.arjuna.webservices.util.ClassLoaderHelper;
+
+/**
+ * The test servlet.
+ * @author kevin
+ */
+public class TestLogServlet extends HttpServlet
+{
+    /**
+     * The servlet serial version UID.
+     */
+    private static final long serialVersionUID = 2566877081747112520L ;
+    
+    /**
+     * The not found HTML page.
+     */
+    private String notFoundResponse ;
+    /**
+     * The directory contents HTML page.
+     */
+    private String directoryContents ;
+    
+    /**
+     * Initialise the servlet.
+     * @param servletConfig The servlet configuration.
+     */
+    public void init(final ServletConfig servletConfig)
+        throws ServletException
+    {
+        super.init(servletConfig) ;
+        try
+        {
+            notFoundResponse = ClassLoaderHelper.getResourceAsString(TestLogServlet.class, "notFoundResponse.html") ;
+            directoryContents = ClassLoaderHelper.getResourceAsString(TestLogServlet.class, "directoryContents.html") ;
+        }
+        catch (final IOException ioe)
+        {
+            throw new ServletException("Failed to load HTML pages", ioe) ;
+        }
+    }
+    
+    /**
+     * Return the specified logs
+     * @param request The HTTP servlet request.
+     * @param response The HTTP servlet response.
+     */
+    protected void doGet(final HttpServletRequest request, final HttpServletResponse response)
+        throws ServletException, IOException
+    {
+        final String logName = request.getPathInfo() ;
+        if ((logName == null) || (logName.length() == 0))
+        {
+            response.sendRedirect("logs/") ;
+            return ;
+        }
+        else if ("/".equals(logName))
+        {
+            response.setContentType("text/html") ;
+            response.setStatus(HttpServletResponse.SC_OK) ;
+            response.setContentLength(directoryContents.length()) ;
+            response.getOutputStream().print(directoryContents) ;
+        }
+        else
+        {
+            final String contents ;
+            try
+            {
+                contents = TestLogController.readLog(logName) ;
+            }
+            catch (final Throwable th)
+            {
+                log("Error reading log file", th) ;
+                response.setContentType("text/html") ;
+                response.setStatus(HttpServletResponse.SC_NOT_FOUND) ;
+                response.setContentLength(notFoundResponse.length()) ;
+                response.getOutputStream().print(notFoundResponse) ;
+                return ;
+            }
+            
+            response.setContentType("text/xml") ;
+            response.setStatus(HttpServletResponse.SC_OK) ;
+            response.setContentLength(contents.length()) ;
+            response.getOutputStream().print(contents) ;
+        }
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/TestRunner.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/TestRunner.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/TestRunner.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,109 @@
+package com.jboss.transaction.wstf.test;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestResult;
+import junit.framework.TestSuite;
+
+import com.jboss.transaction.wstf.interop.Sc007TestCase;
+import com.jboss.transaction.wstf.interop.InteropTestCase;
+import com.jboss.transaction.wstf.interop.InteropTestSuite;
+import com.jboss.transaction.wstf.interop.MessageLogging;
+
+/**
+ * Class responsible for executing the appropriate JUnit test.
+ * @author kevin
+ */
+public class TestRunner
+{
+    /**
+     * The log message prefix.
+     */
+    private static final String LOG_MESSAGE_PREFIX = "<log:log xmlns:log=\"http://docs.oasis-open.org/ws-tx/logs/\">" ;
+    /**
+     * The log message suffix.
+     */
+    private static final String LOG_MESSAGE_SUFFIX = "</log:log>";
+    
+    /**
+     * The AT test class.
+     */
+    private static final Class SC007_TEST_CLASS = Sc007TestCase.class ;
+
+    /**
+     * Execute the specific test against the specified participant.
+     * @param participantURI The URI of the participant.
+     * @param testTimeout The test timeout.
+     * @param asyncTest The asynchronous test flag.
+     * @param testName The name of the test to execute.
+     * @return The test result.
+     */
+    public static TestResult execute(final String participantURI, final long testTimeout, final boolean asyncTest, final String testName)
+    {
+        MessageLogging.clearThreadLog() ;
+        final Test test ;
+        if (TestConstants.NAME_ALL_TESTS.equals(testName))
+        {
+            final TestSuite testSuite = new TestSuite() ;
+            testSuite.addTest(new InteropTestSuite(participantURI, testTimeout, asyncTest, SC007_TEST_CLASS)) ;
+            test = testSuite ;
+        }
+        else if (testName.startsWith(TestConstants.PREFIX_TESTS))
+        {
+            final Class testClass = SC007_TEST_CLASS;
+            try
+            {
+                test = createTest(testClass, participantURI, testTimeout, asyncTest, testName) ;
+            }
+            catch (final Throwable th)
+            {
+                System.err.println("Unexpected error instantiating test class: " + th) ;
+                return null ;
+            }
+        }
+        else
+        {
+            System.err.println("Unidentified test name: " + testName) ;
+            return null ;
+        }
+        MessageLogging.appendThreadLog(LOG_MESSAGE_PREFIX) ;
+        final TestResult testResult = new TestResult() ;
+        test.run(testResult) ;
+        MessageLogging.appendThreadLog(LOG_MESSAGE_SUFFIX) ;
+        return testResult ;
+    }
+    
+    /**
+     * Create the test instance.
+     * @param testClass The test class name.
+     * @param participantURI The participant URI.
+     * @param testTimeout The test timeout.
+     * @param asyncTest The asynchronous test flag.
+     * @param testName The test name.
+     * @return The test instance.
+     * @throws IllegalAccessException For access exception instantiating the test class.
+     * @throws InstantiationException For errors instantiating the test class.
+     * @throws IllegalArgumentException For an invalid test class.
+     */
+    private static TestCase createTest(final Class testClass, final String participantURI, final long testTimeout, final boolean asyncTest, final String testName)
+        throws IllegalAccessException, InstantiationException, IllegalArgumentException
+    {
+        final Object testObject = testClass.newInstance() ;
+        if (testObject instanceof InteropTestCase)
+        {
+            final InteropTestCase interopTestCase = (InteropTestCase)testObject ;
+            interopTestCase.setParticipantURI(participantURI) ; 
+            interopTestCase.setTestTimeout(testTimeout) ; 
+            interopTestCase.setAsyncTest(asyncTest) ; 
+            interopTestCase.setName(testName) ;
+            return interopTestCase ;
+        }
+        else if (testObject instanceof TestCase)
+        {
+            final TestCase test = (TestCase)testObject ;
+            test.setName(testName) ;
+            return test ;
+        }
+        throw new IllegalArgumentException("Invalid class: " + testClass.getName()) ;
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/TestServlet.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/TestServlet.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/TestServlet.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,200 @@
+package com.jboss.transaction.wstf.test;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Templates;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import junit.framework.TestResult;
+
+import com.arjuna.webservices.util.ClassLoaderHelper;
+import com.jboss.transaction.wstf.interop.MessageLogging;
+
+/**
+ * The test servlet.
+ * @author kevin
+ */
+public class TestServlet extends HttpServlet
+{
+    /**
+     * The servlet serial version UID.
+     */
+    private static final long serialVersionUID = 6764303043215036856L ;
+    
+    /**
+     * The validation templates.
+     */
+    private Templates validationTemplates ;
+    
+    /**
+     * Initialise the servlet.
+     * @param config The servlet configuration.
+     */
+    public void init(final ServletConfig config)
+        throws ServletException
+    {
+        super.init(config) ;
+        
+        final InputStream is = ClassLoaderHelper.getResourceAsStream(getClass(), "processor.xsl") ;
+        if (is == null)
+        {
+            throw new ServletException("Cannot locate transformation stylesheet") ;
+        }
+        final TransformerFactory factory = TransformerFactory.newInstance() ;
+        try
+        {
+            validationTemplates = factory.newTemplates(new StreamSource(is)) ;
+        }
+        catch (final TransformerConfigurationException tce)
+        {
+            throw new ServletException("Error creating transformation template!", tce) ;
+        }
+    }
+    
+    /**
+     * Execute the test
+     * @param request The HTTP servlet request.
+     * @param response The HTTP servlet response.
+     */
+    protected void doPost(final HttpServletRequest request, final HttpServletResponse response)
+        throws ServletException, IOException
+    {
+        final String serviceURI = request.getParameter(TestConstants.PARAM_SERVICE_URI) ;
+        final String test = request.getParameter(TestConstants.PARAM_TEST) ;
+        final String testTimeoutValue = request.getParameter(TestConstants.PARAM_TEST_TIMEOUT) ;
+        // final String asyncTestValue = request.getParameter(TestConstants.PARAM_ASYNC_TEST) ;
+
+        final int serviceURILength = (serviceURI == null ? 0 : serviceURI.length()) ;
+        final int testLength = (test == null ? 0 : test.length()) ;
+        
+        long testTimeout = 0 ;
+        
+        boolean testTimeoutValid = false ;
+        if ((testTimeoutValue != null) && (testTimeoutValue.length() > 0))
+        {
+            try
+            {
+                testTimeout = Long.parseLong(testTimeoutValue) ;
+                testTimeoutValid = true ;
+            }
+            catch (final NumberFormatException nfe) {} // ignore
+        }
+        
+        // final boolean asyncTest = (asyncTestValue != null) ;
+        final boolean asyncTest = true ;
+
+        if ((serviceURILength == 0) || (testLength == 0) || !testTimeoutValid)
+        {
+            final RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/invalidParameters.html") ;
+            dispatcher.forward(request, response) ;
+            return ;
+        }
+        
+        final HttpSession session = request.getSession() ;
+        final String id = session.getId() ;
+        final int logCount = getLogCount(session) ;
+        final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss") ;
+        final String date = format.format(new Date()) ;
+        final String logName = date + "-" + id + "-" + logCount ;
+
+        session.setAttribute(TestConstants.ATTRIBUTE_TEST_RESULT, null) ;
+        session.setAttribute(TestConstants.ATTRIBUTE_TEST_VALIDATION, null) ;
+        session.setAttribute(TestConstants.ATTRIBUTE_LOG_NAME, null) ;
+
+        final String threadLog ;
+        try
+        {
+            final TestResult result = TestRunner.execute(serviceURI, testTimeout, asyncTest, test) ;
+            if (result != null)
+            {
+                session.setAttribute(TestConstants.ATTRIBUTE_TEST_RESULT, result) ;
+                
+                threadLog = MessageLogging.getThreadLog() ;
+                
+                try
+                {
+                    TestLogController.writeLog(logName, threadLog) ;
+                    session.setAttribute(TestConstants.ATTRIBUTE_LOG_NAME, logName) ;
+                }
+                catch (final IOException ioe)
+                {
+                    log("Unexpected IOException writing message log", ioe) ;
+                }
+            }
+            else
+            {
+                threadLog = null ;
+            }
+        }
+        finally
+        {
+            MessageLogging.clearThreadLog() ;
+        }
+        
+        if ((threadLog != null) && (threadLog.length() > 0))
+        {
+            try
+            {
+                final String testValidation = transform(threadLog) ;
+                session.setAttribute(TestConstants.ATTRIBUTE_TEST_VALIDATION, testValidation) ;
+            }
+            catch (final Throwable th)
+            {
+                log("Unexpected throwable transforming message log", th) ;
+            }
+        }
+        
+        final RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/results.jsp") ;
+        dispatcher.forward(request, response) ;
+    }
+    
+    /**
+     * Get the log count from the session, incrementing afterwards.
+     * @param session The current HTTP session.
+     * @return The log count.
+     */
+    private int getLogCount(final HttpSession session)
+    {
+        final Object logCountObject = session.getAttribute(TestConstants.ATTRIBUTE_LOG_COUNT) ;
+        final int logCount = (logCountObject == null ? 1 : ((Integer)logCountObject).intValue() + 1) ;
+        session.setAttribute(TestConstants.ATTRIBUTE_LOG_COUNT, new Integer(logCount)) ;
+        return logCount ;
+    }
+    
+    /**
+     * Transform the specified message log.
+     * @param messageLog The specified message log.
+     * @return The transformed result.
+     * @throws TransformerConfigurationException For transformer configuration errors.
+     * @throws TransformerException The transformation errors.
+     */
+    private String transform(final String messageLog)
+        throws TransformerConfigurationException, TransformerException
+    {
+        final Source source = new StreamSource(new StringReader(messageLog)) ;
+        final Transformer transformer = validationTemplates.newTransformer() ;
+        final StringWriter writer = new StringWriter() ;
+        final Result result = new StreamResult(writer) ;
+        transformer.transform(source, result) ;
+        return writer.toString() ;
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/directoryContents.html
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/directoryContents.html	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/directoryContents.html	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,25 @@
+<html>
+  <head>
+    <title>JBoss Transaction WS-TX interop results</title>
+  </head>
+  <body>
+    <h1>WS-TX Interop results</h1>
+    <!--
+    <p>These log files are the results of executing the JBoss Transaction WS-TX Interop client against public endpoints</p>
+    <table>
+    <thead>
+    <tr><td>Endpoint</td><td>Log file</td></tr>
+    </thead>
+    <tbody>
+    <tr><td>JBoss</td><td><a href="jboss-jboss.xml">jboss-jboss.xml</a></td></tr>
+    <tr><td>IBM</td><td><a href="jboss-ibm.xml">jboss-ibm.xml</a></td></tr>
+    <tr><td>Sun</td><td><a href="jboss-sun.xml">jboss-sun.xml</a></td></tr>
+    <tr><td>Microsoft</td><td><a href="jboss-msft.xml">jboss-msft.xml</a></td></tr>
+    <tr><td>Apache</td><td><a href="jboss-apache.xml">jboss-apache.xml</a></td></tr>
+    <tr><td>WSO2</td><td><a href="jboss-wso2.xml">jboss-wso2.xml</a></td></tr>
+    </tbody>
+    </table>
+    -->
+    <p>Please send any queries to the <a href="mailto:adinn at redhat.com?subject=Log%20results%20query">wstf test contact</a></p>
+  </body>
+</html>

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/notFoundResponse.html
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/notFoundResponse.html	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/notFoundResponse.html	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,9 @@
+<html>
+  <head>
+    <title>Log file not found</title>
+  </head>
+  <body>
+    <h1>Log file not found</h1>
+    Requested log file could not be found
+  </body>
+</html>

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/processor.xsl
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/processor.xsl	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/test/processor.xsl	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,3 @@
+<xsl:transform
+  id = "empty" version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+</xsl:transform>
\ No newline at end of file

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/CoordinationContextManager.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/CoordinationContextManager.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/CoordinationContextManager.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,59 @@
+package com.jboss.transaction.wstf.webservices;
+
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+
+import javax.xml.ws.handler.MessageContext;
+
+/**
+ * Helper class for passing a coordination context in a SOAP header when using JaxWS
+ */
+public class CoordinationContextManager {
+    /**
+     * The key used for the coordination context within a message exchange.
+     */
+    private static final String COORDINATION_CONTEXT_PROPERTY = "org.jboss.xts.message.context.coordination.context.property";
+
+    /**
+     * The coordination context associated with the thread.
+     */
+    private static final ThreadLocal THREAD_CONTEXT = new ThreadLocal() ;
+
+    /**
+     * Get the coordination context from the message context if present.
+     * @param messageContext The message context.
+     * @return The coordination context or null if not present.
+     */
+    public static CoordinationContextType getContext(final MessageContext messageContext)
+    {
+        return (CoordinationContextType)messageContext.get(COORDINATION_CONTEXT_PROPERTY) ;
+    }
+
+    /**
+     * Set the coordination context for the message context.
+     * @param messageContext The message context.
+     * @param coordinationContext The coordination context.
+     */
+    public static void setContext(final MessageContext messageContext, final CoordinationContextType coordinationContext)
+    {
+        messageContext.put(COORDINATION_CONTEXT_PROPERTY, coordinationContext) ;
+        messageContext.setScope(COORDINATION_CONTEXT_PROPERTY, MessageContext.Scope.APPLICATION);
+    }
+
+    /**
+     * Get the coordination context from the current thread if present.
+     * @return The coordination context or null if not present.
+     */
+    public static CoordinationContextType getThreadContext()
+    {
+        return (CoordinationContextType)THREAD_CONTEXT.get() ;
+    }
+
+    /**
+     * Set the coordination context for the current thread.
+     * @param coordinationContext The coordination context.
+     */
+    public static void setThreadContext(final CoordinationContextType coordinationContext)
+    {
+        THREAD_CONTEXT.set(coordinationContext) ;
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/InteropConstants.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/InteropConstants.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/InteropConstants.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,12 @@
+package com.jboss.transaction.wstf.webservices;
+
+/**
+ * Interface containing WS-TX Interop constants.
+ */
+public interface InteropConstants
+{
+    /**
+     * The interop test participant service name.
+     */
+    public String SERVICE_PARTICIPANT = "Participant" ;
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/handlers/CoordinationContextHandler.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/handlers/CoordinationContextHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/handlers/CoordinationContextHandler.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,202 @@
+package com.jboss.transaction.wstf.webservices.handlers;
+
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.jboss.transaction.wstf.webservices.CoordinationContextManager;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.ProtocolException;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPHeader;
+import javax.xml.soap.SOAPHeaderElement;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.Marshaller;
+import java.util.Set;
+import java.util.Iterator;
+import java.util.Collections;
+
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+
+/**
+ * Handler to serialise and deserialise a coordination context to/from a SOAP header.
+ */
+public class CoordinationContextHandler implements SOAPHandler<SOAPMessageContext> {
+    /**
+     * Gets the header blocks that can be processed by this Handler
+     * instance.
+     *
+     * @return Set of QNames of header blocks processed by this
+     *         handler instance. <code>QName</code> is the qualified
+     *         name of the outermost element of the Header block.
+     */
+    public Set<QName> getHeaders()
+    {
+        return headers;
+    }
+
+    /**
+     * Handle an outgoing message by inserting any current arjuna context attached to the context into the message
+     * headers and handle an incoming message by retrieving the context from the headers and attaching it to the
+     * context,
+     *
+     * @param context the message context.
+     * @return Always return true
+     * @throws RuntimeException               Causes the JAX-WS runtime to cease
+     *                                        handler processing and generate a fault.
+     * @throws javax.xml.ws.ProtocolException Causes the JAX-WS runtime to switch to
+     *                                        fault message processing.
+     */
+    public boolean handleMessage(SOAPMessageContext context) throws ProtocolException
+    {
+        final boolean outbound = (Boolean)context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+        if (outbound) {
+            return handleMessageOutbound(context);
+        } else {
+            return handlemessageInbound(context);
+        }
+    }
+
+    /**
+     * check for an arjuna context attached to the message context and, if found, install its identifier as the value
+     * of a soap message header element
+     * @param context
+     * @return
+     * @throws ProtocolException
+     */
+    protected boolean handleMessageOutbound(SOAPMessageContext context) throws ProtocolException
+    {
+        try {
+            CoordinationContextType coordinationContext = CoordinationContextManager.getThreadContext();
+            if (coordinationContext != null) {
+                final JAXBContext jaxbCtx = getJaxbContext();
+
+                // insert a header into the current message containing the coordination context
+                final SOAPMessage soapMessage = context.getMessage();
+                final SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
+                SOAPHeader soapHeader = soapEnvelope.getHeader() ;
+                if (soapHeader == null)
+                {
+                    soapHeader = soapEnvelope.addHeader() ;
+                }
+                /*
+                 * this does not work but it is what we want!!
+                 *
+                 * The problem here is that the marshaller creates plain old elements and inserts them top
+                 * down as it goes along. but the soap header add child method checks its argument and
+                 * replaces plain elements with soap header elements before inserting them. it copies the
+                 * inserted element substructure into the rpelacement but since it does not exist at
+                 * copy time the chiuldren get lost
+                Marshaller marshaller = jaxbCtx.createMarshaller();
+                marshaller.marshal(coordinationContext, soapHeader);
+                 */
+                /*
+                 * ok, here's the workaround -- marshall the object as a child of a dummy header, detach it and
+                 * then insert it as a header element.
+                 */
+                SOAPHeaderElement headerElement = soapHeader.addHeaderElement(getDummyQName());
+                Marshaller marshaller = jaxbCtx.createMarshaller();
+                marshaller.marshal(coordinationContext, headerElement);
+                soapHeader.replaceChild(headerElement.getChildNodes().item(0), headerElement);
+                // ok, now we need to locate the inserted node and set the mustunderstand attribute
+                Iterator<SOAPHeaderElement> iterator = soapHeader.examineAllHeaderElements();
+                while (iterator.hasNext()) {
+                    headerElement = iterator.next();
+                    if (CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT_QNAME.equals(headerElement.getElementQName())) {
+                        headerElement.setMustUnderstand(true);
+                        break;
+                    }
+                }
+            }
+        } catch (Exception se) {
+            throw new ProtocolException(se);
+        }
+
+        return true;
+    }
+
+    /**
+     * check for an arjuna instance identifier element embedded in the soap message headesr and, if found, use it to
+     * label an arjuna context attached to the message context
+     * @param context
+     * @return
+     * @throws ProtocolException
+     */
+    private boolean handlemessageInbound(SOAPMessageContext context)  throws ProtocolException
+    {
+        try {
+            final SOAPMessage soapMessage = context.getMessage();
+            final SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
+            Iterator<SOAPHeaderElement> iterator = soapEnvelope.getHeader().examineAllHeaderElements();
+            while (iterator.hasNext()) {
+                final SOAPHeaderElement headerElement = iterator.next();
+                if (CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT_QNAME.equals(headerElement.getElementQName())) {
+                    // found it - clear the must understand flag, retrieve the value and store an arjuna
+                    // context in the message context
+                    headerElement.setMustUnderstand(false);
+                    final JAXBContext jaxbCtx = getJaxbContext();
+                    final JAXBElement<CoordinationContextType> elt = jaxbCtx.createUnmarshaller().unmarshal(headerElement, CoordinationContextType.class);
+                    final CoordinationContextType coordinationContext = elt.getValue();
+                    CoordinationContextManager.setContext(context, coordinationContext);
+                }
+            }
+        } catch (Exception se) {
+            throw new ProtocolException(se);
+        }
+
+        return true;
+    }
+
+    /**
+     * this handler ignores faults but allows other handlers to deal with them
+     *
+     * @param context the message context
+     * @return true to allow fault handling to continue
+     */
+
+    public boolean handleFault(SOAPMessageContext context)
+    {
+        return true;
+    }
+
+    /**
+     * this hanlder ignores close messages
+     *
+     * @param context the message context
+     */
+    public void close(javax.xml.ws.handler.MessageContext context)
+    {
+    }
+
+    /**
+     * a singleton set containing the only header this handler is interested in
+     */
+    private static Set<QName> headers = Collections.singleton(CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT_QNAME);
+
+    private static JAXBContext jaxbContext;
+    private synchronized JAXBContext getJaxbContext()
+    {
+        if (jaxbContext == null) {
+            try {
+                jaxbContext = JAXBContext.newInstance("org.oasis_open.docs.ws_tx.wscoor._2006._06");
+            } catch (JAXBException e) {
+                // TODO log error here
+            }
+        }
+
+        return jaxbContext;
+    }
+    private static QName dummyQName = null;
+    private synchronized QName getDummyQName()
+    {
+        if (dummyQName == null) {
+            dummyQName = new QName("http://transactions.jboss.com/xts/dummy/", "DummyElement", "dummy");
+        }
+
+        return dummyQName;
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/AsyncParticipantStub.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/AsyncParticipantStub.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/AsyncParticipantStub.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,545 @@
+package com.jboss.transaction.wstf.webservices.sc007;
+
+import java.io.IOException;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapFaultType;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import com.arjuna.wsc11.messaging.MessageId;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.SoapFault11;
+import com.jboss.transaction.wstf.webservices.sc007.client.AsyncParticipantClient;
+import com.jboss.transaction.wstf.webservices.sc007.processors.InitiatorCallback;
+import com.jboss.transaction.wstf.webservices.sc007.processors.InitiatorProcessor;
+import com.jboss.transaction.wstf.webservices.sc007.ParticipantStub;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+/**
+ * The participant stub.
+ */
+public class AsyncParticipantStub implements ParticipantStub
+{
+    /***
+     * The participant stub singletong.
+     */
+    private static final ParticipantStub PARTICIPANT_STUB = new AsyncParticipantStub() ;
+    
+    /**
+     * Get the participant stub singleton.
+     * @return The participant stub singleton.
+     */
+    public static ParticipantStub getParticipantStub()
+    {
+        return PARTICIPANT_STUB ;
+    }
+    
+    /**
+     * Send a completion commit request.
+     * @param serviceURI The target service URI.
+     * @param coordinatorURI The coordinator URI.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void completionCommit(final String serviceURI, final String coordinatorURI)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+        
+        final RequestCallback callback = new RequestCallback() ;
+        final InitiatorProcessor initiator = InitiatorProcessor.getInitiator() ;
+        initiator.registerCallback(messageId, callback) ;
+        try
+        {
+            AsyncParticipantClient.getClient().sendCompletionCommit(addressingProperties, coordinatorURI) ;
+            callback.waitUntilTriggered(15000) ;
+        }
+        finally
+        {
+            initiator.removeCallback(messageId) ;
+        }
+        
+        handleCallback(callback) ;
+    }
+
+    /**
+     * Send a completion rollback request.
+     * @param serviceURI The target service URI.
+     * @param coordinatorURI The coordinator URI.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void completionRollback(final String serviceURI, final String coordinatorURI)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+        final RequestCallback callback = new RequestCallback() ;
+        final InitiatorProcessor initiator = InitiatorProcessor.getInitiator() ;
+        initiator.registerCallback(messageId, callback) ;
+        try
+        {
+            AsyncParticipantClient.getClient().sendCompletionRollback(addressingProperties, coordinatorURI) ;
+            callback.waitUntilTriggered(15000) ;
+        }
+        finally
+        {
+            initiator.removeCallback(messageId) ;
+        }
+        
+        handleCallback(callback) ;
+    }
+
+    /**
+     * Send a commit request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void commit(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+        final RequestCallback callback = new RequestCallback() ;
+        final InitiatorProcessor initiator = InitiatorProcessor.getInitiator() ;
+        initiator.registerCallback(messageId, callback) ;
+        try
+        {
+            AsyncParticipantClient.getClient().sendCommit(coordinationContext, addressingProperties) ;
+            callback.waitUntilTriggered(15000) ;
+        }
+        finally
+        {
+            initiator.removeCallback(messageId) ;
+        }
+        
+        handleCallback(callback) ;
+    }
+
+    /**
+     * Send a rollback request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void rollback(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+        final RequestCallback callback = new RequestCallback() ;
+        final InitiatorProcessor initiator = InitiatorProcessor.getInitiator() ;
+        initiator.registerCallback(messageId, callback) ;
+        try
+        {
+            AsyncParticipantClient.getClient().sendRollback(coordinationContext, addressingProperties) ;
+            callback.waitUntilTriggered(15000) ;
+        }
+        finally
+        {
+            initiator.removeCallback(messageId) ;
+        }
+        
+        handleCallback(callback) ;
+    }
+
+    /**
+     * Send a phase2Rollback request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void phase2Rollback(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+        final RequestCallback callback = new RequestCallback() ;
+        final InitiatorProcessor initiator = InitiatorProcessor.getInitiator() ;
+        initiator.registerCallback(messageId, callback) ;
+        try
+        {
+            AsyncParticipantClient.getClient().sendPhase2Rollback(coordinationContext, addressingProperties) ;
+            callback.waitUntilTriggered(15000) ;
+        }
+        finally
+        {
+            initiator.removeCallback(messageId) ;
+        }
+        
+        handleCallback(callback) ;
+    }
+
+    /**
+     * Send a readonly request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void readonly(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+        final RequestCallback callback = new RequestCallback() ;
+        final InitiatorProcessor initiator = InitiatorProcessor.getInitiator() ;
+        initiator.registerCallback(messageId, callback) ;
+        try
+        {
+            AsyncParticipantClient.getClient().sendReadonly(coordinationContext, addressingProperties) ;
+            callback.waitUntilTriggered(15000) ;
+        }
+        finally
+        {
+            initiator.removeCallback(messageId) ;
+        }
+        
+        handleCallback(callback) ;
+    }
+
+    /**
+     * Send a volatileAndDurable request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void volatileAndDurable(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+        final RequestCallback callback = new RequestCallback() ;
+        final InitiatorProcessor initiator = InitiatorProcessor.getInitiator() ;
+        initiator.registerCallback(messageId, callback) ;
+        try
+        {
+            AsyncParticipantClient.getClient().sendVolatileAndDurable(coordinationContext, addressingProperties) ;
+            callback.waitUntilTriggered(15000) ;
+        }
+        finally
+        {
+            initiator.removeCallback(messageId) ;
+        }
+        
+        handleCallback(callback) ;
+    }
+
+    /**
+     * Send an earlyReadonly request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void earlyReadonly(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+        final RequestCallback callback = new RequestCallback() ;
+        final InitiatorProcessor initiator = InitiatorProcessor.getInitiator() ;
+        initiator.registerCallback(messageId, callback) ;
+        try
+        {
+            AsyncParticipantClient.getClient().sendEarlyReadonly(coordinationContext, addressingProperties) ;
+            callback.waitUntilTriggered(15000) ;
+        }
+        finally
+        {
+            initiator.removeCallback(messageId) ;
+        }
+        
+        handleCallback(callback) ;
+    }
+
+    /**
+     * Send a earlyAborted request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void earlyAborted(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+        final RequestCallback callback = new RequestCallback() ;
+        final InitiatorProcessor initiator = InitiatorProcessor.getInitiator() ;
+        initiator.registerCallback(messageId, callback) ;
+        try
+        {
+            AsyncParticipantClient.getClient().sendEarlyAborted(coordinationContext, addressingProperties) ;
+            callback.waitUntilTriggered(15000) ;
+        }
+        finally
+        {
+            initiator.removeCallback(messageId) ;
+        }
+        
+        handleCallback(callback) ;
+    }
+
+    /**
+     * Send a replayCommit request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void replayCommit(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+        final RequestCallback callback = new RequestCallback() ;
+        final InitiatorProcessor initiator = InitiatorProcessor.getInitiator() ;
+        initiator.registerCallback(messageId, callback) ;
+        try
+        {
+            AsyncParticipantClient.getClient().sendReplayCommit(coordinationContext, addressingProperties) ;
+            callback.waitUntilTriggered(15000) ;
+        }
+        finally
+        {
+            initiator.removeCallback(messageId) ;
+        }
+        
+        handleCallback(callback) ;
+    }
+
+    /**
+     * Send a retryPreparedCommit request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void retryPreparedCommit(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+        final RequestCallback callback = new RequestCallback() ;
+        final InitiatorProcessor initiator = InitiatorProcessor.getInitiator() ;
+        initiator.registerCallback(messageId, callback) ;
+        try
+        {
+            AsyncParticipantClient.getClient().sendRetryPreparedCommit(coordinationContext, addressingProperties) ;
+            callback.waitUntilTriggered(15000) ;
+        }
+        finally
+        {
+            initiator.removeCallback(messageId) ;
+        }
+        
+        handleCallback(callback) ;
+    }
+
+    /**
+     * Send a retryPreparedAbort request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void retryPreparedAbort(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+        final RequestCallback callback = new RequestCallback() ;
+        final InitiatorProcessor initiator = InitiatorProcessor.getInitiator() ;
+        initiator.registerCallback(messageId, callback) ;
+        try
+        {
+            AsyncParticipantClient.getClient().sendRetryPreparedAbort(coordinationContext, addressingProperties) ;
+            callback.waitUntilTriggered(15000) ;
+        }
+        finally
+        {
+            initiator.removeCallback(messageId) ;
+        }
+        
+        handleCallback(callback) ;
+    }
+
+    /**
+     * Send a retryCommit request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void retryCommit(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+        final RequestCallback callback = new RequestCallback() ;
+        final InitiatorProcessor initiator = InitiatorProcessor.getInitiator() ;
+        initiator.registerCallback(messageId, callback) ;
+        try
+        {
+            AsyncParticipantClient.getClient().sendRetryCommit(coordinationContext, addressingProperties) ;
+            callback.waitUntilTriggered(15000) ;
+        }
+        finally
+        {
+            initiator.removeCallback(messageId) ;
+        }
+        
+        handleCallback(callback) ;
+    }
+
+    /**
+     * Send a preparedAfterTimeout request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void preparedAfterTimeout(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+        final RequestCallback callback = new RequestCallback() ;
+        final InitiatorProcessor initiator = InitiatorProcessor.getInitiator() ;
+        initiator.registerCallback(messageId, callback) ;
+        try
+        {
+            AsyncParticipantClient.getClient().sendPreparedAfterTimeout(coordinationContext, addressingProperties) ;
+            callback.waitUntilTriggered(15000) ;
+        }
+        finally
+        {
+            initiator.removeCallback(messageId) ;
+        }
+        
+        handleCallback(callback) ;
+    }
+
+    /**
+     * Send a lostCommitted request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void lostCommitted(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+        final RequestCallback callback = new RequestCallback() ;
+        final InitiatorProcessor initiator = InitiatorProcessor.getInitiator() ;
+        initiator.registerCallback(messageId, callback) ;
+        try
+        {
+            AsyncParticipantClient.getClient().sendLostCommitted(coordinationContext, addressingProperties) ;
+            callback.waitUntilTriggered(15000) ;
+        }
+        finally
+        {
+            initiator.removeCallback(messageId) ;
+        }
+        
+        handleCallback(callback) ;
+    }
+    
+    /**
+     * Handle the callback.
+     * @param callback The callback.
+     * @throws SoapFault for errors.
+     */
+    private static void handleCallback(final RequestCallback callback)
+        throws SoapFault
+    {
+        if (callback.hasFailed())
+        {
+            throw new SoapFault11(SoapFaultType.FAULT_RECEIVER, null, "Callback execution failed") ;
+        }
+        else if (!callback.hasTriggered())
+        {
+            throw new SoapFault11(SoapFaultType.FAULT_RECEIVER, null, "Callback wasn't triggered") ;
+        }
+        else if (!callback.isResponse())
+        {
+            throw callback.getSoapFault() ;
+        }
+    }
+    
+    /**
+     * The request callback class.
+     */
+    private static final class RequestCallback extends InitiatorCallback
+    {
+        /**
+         * The response flag.
+         */
+        private boolean response ;
+        /**
+         * The SOAP fault response.
+         */
+        private SoapFault soapFault ;
+        
+        /**
+         * A response.
+         * @param addressingProperties The current addressing context.
+         */
+        public void response(final AddressingProperties addressingProperties)
+        {
+            this.response = true ;
+        }
+
+        /**
+         * A SOAP fault response.
+         * @param soapFault The SOAP fault response.
+         * @param addressingProperties The current addressing context.
+         */
+        public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties)
+        {
+            this.soapFault = soapFault ;
+        }
+        
+        /**
+         * Was a response received?
+         * @return true if a response was received, false otherwise.
+         */
+        boolean isResponse()
+        {
+            return response ;
+        }
+        
+        /**
+         * Get the SOAP fault.
+         * @return The SOAP fault or null.
+         */
+        SoapFault getSoapFault()
+        {
+            return soapFault ;
+        }
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/InteropConstants.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/InteropConstants.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/InteropConstants.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,245 @@
+package com.jboss.transaction.wstf.webservices.sc007;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Interface containing WS-TX AT Interop constants.
+ */
+public interface InteropConstants
+{
+    /**
+     * The interop test initiator service name.
+     */
+    public String SERVICE_INITIATOR = "Sc007InitiatorService" ;
+
+    /**
+     * The interop test participant service name.
+     */
+    public String SERVICE_PARTICIPANT = "Sc007ParticipantService" ;
+
+    /**
+     * The interop Namespace.
+     */
+    public String INTEROP_NAMESPACE = "http://www.wstf.org/sc007" ;
+    /**
+     * The interop namespace prefix.
+     */
+    public String INTEROP_PREFIX = "sc007" ;
+    
+    /**
+     * The participant action prefix.
+     */
+    public String INTEROP_ACTION_PARTICIPANT_PREFIX = INTEROP_NAMESPACE + "/ParticipantPortType/" ;
+    /**
+     * The initiator action prefix.
+     */
+    public String INTEROP_ACTION_INITIATOR_PREFIX = INTEROP_NAMESPACE + "/InitiatorPortType/" ;
+
+    /**
+     * The completion commit element.
+     */
+    public String INTEROP_ELEMENT_COMPLETION_COMMIT = "CompletionCommit" ;
+    /**
+     * The completion commit QName.
+     */
+    public QName INTEROP_ELEMENT_QNAME_COMPLETION_COMMIT = new QName(INTEROP_NAMESPACE, INTEROP_ELEMENT_COMPLETION_COMMIT, INTEROP_PREFIX) ;
+    /**
+     * The completion commit Action.
+     */
+    public String INTEROP_ACTION_COMPLETION_COMMIT = INTEROP_ACTION_PARTICIPANT_PREFIX + INTEROP_ELEMENT_COMPLETION_COMMIT ;
+    
+    /**
+     * The completion rollback element.
+     */
+    public String INTEROP_ELEMENT_COMPLETION_ROLLBACK = "CompletionRollback" ;
+    /**
+     * The completion rollback QName.
+     */
+    public QName INTEROP_ELEMENT_QNAME_COMPLETION_ROLLBACK = new QName(INTEROP_NAMESPACE, INTEROP_ELEMENT_COMPLETION_ROLLBACK, INTEROP_PREFIX) ;
+    /**
+     * The completion rollback Action.
+     */
+    public String INTEROP_ACTION_COMPLETION_ROLLBACK = INTEROP_ACTION_PARTICIPANT_PREFIX + INTEROP_ELEMENT_COMPLETION_ROLLBACK ;
+    
+    /**
+     * The commit element.
+     */
+    public String INTEROP_ELEMENT_COMMIT = "Commit" ;
+    /**
+     * The commit QName.
+     */
+    public QName INTEROP_ELEMENT_QNAME_COMMIT = new QName(INTEROP_NAMESPACE, INTEROP_ELEMENT_COMMIT, INTEROP_PREFIX) ;
+    /**
+     * The commit Action.
+     */
+    public String INTEROP_ACTION_COMMIT = INTEROP_ACTION_PARTICIPANT_PREFIX + INTEROP_ELEMENT_COMMIT ;
+    
+    /**
+     * The rollback element.
+     */
+    public String INTEROP_ELEMENT_ROLLBACK = "Rollback" ;
+    /**
+     * The rollback QName.
+     */
+    public QName INTEROP_ELEMENT_QNAME_ROLLBACK = new QName(INTEROP_NAMESPACE, INTEROP_ELEMENT_ROLLBACK, INTEROP_PREFIX) ;
+    /**
+     * The rollback Action.
+     */
+    public String INTEROP_ACTION_ROLLBACK = INTEROP_ACTION_PARTICIPANT_PREFIX + INTEROP_ELEMENT_ROLLBACK ;
+    
+    /**
+     * The phase 2 rollback element.
+     */
+    public String INTEROP_ELEMENT_PHASE_2_ROLLBACK = "Phase2Rollback" ;
+    /**
+     * The phase 2 rollback QName.
+     */
+    public QName INTEROP_ELEMENT_QNAME_PHASE_2_ROLLBACK = new QName(INTEROP_NAMESPACE, INTEROP_ELEMENT_PHASE_2_ROLLBACK, INTEROP_PREFIX) ;
+    /**
+     * The phase 2 rollback Action.
+     */
+    public String INTEROP_ACTION_PHASE_2_ROLLBACK = INTEROP_ACTION_PARTICIPANT_PREFIX + INTEROP_ELEMENT_PHASE_2_ROLLBACK ;
+    
+    /**
+     * The readonly element.
+     */
+    public String INTEROP_ELEMENT_READONLY = "Readonly" ;
+    /**
+     * The readonly QName.
+     */
+    public QName INTEROP_ELEMENT_QNAME_READONLY = new QName(INTEROP_NAMESPACE, INTEROP_ELEMENT_READONLY, INTEROP_PREFIX) ;
+    /**
+     * The readonly Action.
+     */
+    public String INTEROP_ACTION_READONLY = INTEROP_ACTION_PARTICIPANT_PREFIX + INTEROP_ELEMENT_READONLY ;
+    
+    /**
+     * The volatile and durable element.
+     */
+    public String INTEROP_ELEMENT_VOLATILE_AND_DURABLE = "VolatileAndDurable" ;
+    /**
+     * The volatile and durable QName.
+     */
+    public QName INTEROP_ELEMENT_QNAME_VOLATILE_AND_DURABLE = new QName(INTEROP_NAMESPACE, INTEROP_ELEMENT_VOLATILE_AND_DURABLE, INTEROP_PREFIX) ;
+    /**
+     * The volatile and durable Action.
+     */
+    public String INTEROP_ACTION_VOLATILE_AND_DURABLE = INTEROP_ACTION_PARTICIPANT_PREFIX + INTEROP_ELEMENT_VOLATILE_AND_DURABLE ;
+    
+    /**
+     * The early readonly element.
+     */
+    public String INTEROP_ELEMENT_EARLY_READONLY = "EarlyReadonly" ;
+    /**
+     * The early readonly QName.
+     */
+    public QName INTEROP_ELEMENT_QNAME_EARLY_READONLY = new QName(INTEROP_NAMESPACE, INTEROP_ELEMENT_EARLY_READONLY, INTEROP_PREFIX) ;
+    /**
+     * The early readonly Action.
+     */
+    public String INTEROP_ACTION_EARLY_READONLY = INTEROP_ACTION_PARTICIPANT_PREFIX + INTEROP_ELEMENT_EARLY_READONLY ;
+    
+    /**
+     * The early aborted element.
+     */
+    public String INTEROP_ELEMENT_EARLY_ABORTED = "EarlyAborted" ;
+    /**
+     * The early aborted QName.
+     */
+    public QName INTEROP_ELEMENT_QNAME_EARLY_ABORTED = new QName(INTEROP_NAMESPACE, INTEROP_ELEMENT_EARLY_ABORTED, INTEROP_PREFIX) ;
+    /**
+     * The early aborted Action.
+     */
+    public String INTEROP_ACTION_EARLY_ABORTED = INTEROP_ACTION_PARTICIPANT_PREFIX + INTEROP_ELEMENT_EARLY_ABORTED ;
+    
+    /**
+     * The replay commit element.
+     */
+    public String INTEROP_ELEMENT_REPLAY_COMMIT = "ReplayCommit" ;
+    /**
+     * The replay commit QName.
+     */
+    public QName INTEROP_ELEMENT_QNAME_REPLAY_COMMIT = new QName(INTEROP_NAMESPACE, INTEROP_ELEMENT_REPLAY_COMMIT, INTEROP_PREFIX) ;
+    /**
+     * The replay commit Action.
+     */
+    public String INTEROP_ACTION_REPLAY_COMMIT = INTEROP_ACTION_PARTICIPANT_PREFIX + INTEROP_ELEMENT_REPLAY_COMMIT ;
+    
+    /**
+     * The retry prepared commit element.
+     */
+    public String INTEROP_ELEMENT_RETRY_PREPARED_COMMIT = "RetryPreparedCommit" ;
+    /**
+     * The retry prepared commit QName.
+     */
+    public QName INTEROP_ELEMENT_QNAME_RETRY_PREPARED_COMMIT = new QName(INTEROP_NAMESPACE, INTEROP_ELEMENT_RETRY_PREPARED_COMMIT, INTEROP_PREFIX) ;
+    /**
+     * The retry prepared commit Action.
+     */
+    public String INTEROP_ACTION_RETRY_PREPARED_COMMIT = INTEROP_ACTION_PARTICIPANT_PREFIX + INTEROP_ELEMENT_RETRY_PREPARED_COMMIT ;
+    
+    /**
+     * The retry prepared abort element.
+     */
+    public String INTEROP_ELEMENT_RETRY_PREPARED_ABORT = "RetryPreparedAbort" ;
+    /**
+     * The retry prepared abort QName.
+     */
+    public QName INTEROP_ELEMENT_QNAME_RETRY_PREPARED_ABORT = new QName(INTEROP_NAMESPACE, INTEROP_ELEMENT_RETRY_PREPARED_ABORT, INTEROP_PREFIX) ;
+    /**
+     * The retry prepared abort Action.
+     */
+    public String INTEROP_ACTION_RETRY_PREPARED_ABORT = INTEROP_ACTION_PARTICIPANT_PREFIX + INTEROP_ELEMENT_RETRY_PREPARED_ABORT ;
+    
+    /**
+     * The retry commit element.
+     */
+    public String INTEROP_ELEMENT_RETRY_COMMIT = "RetryCommit" ;
+    /**
+     * The retry commit QName.
+     */
+    public QName INTEROP_ELEMENT_QNAME_RETRY_COMMIT = new QName(INTEROP_NAMESPACE, INTEROP_ELEMENT_RETRY_COMMIT, INTEROP_PREFIX) ;
+    /**
+     * The retry commit Action.
+     */
+    public String INTEROP_ACTION_RETRY_COMMIT = INTEROP_ACTION_PARTICIPANT_PREFIX + INTEROP_ELEMENT_RETRY_COMMIT ;
+    
+    /**
+     * The prepared after timeout element.
+     */
+    public String INTEROP_ELEMENT_PREPARED_AFTER_TIMEOUT = "PreparedAfterTimeout" ;
+    /**
+     * The prepared after timeout QName.
+     */
+    public QName INTEROP_ELEMENT_QNAME_PREPARED_AFTER_TIMEOUT = new QName(INTEROP_NAMESPACE, INTEROP_ELEMENT_PREPARED_AFTER_TIMEOUT, INTEROP_PREFIX) ;
+    /**
+     * The prepared after timeout Action.
+     */
+    public String INTEROP_ACTION_PREPARED_AFTER_TIMEOUT = INTEROP_ACTION_PARTICIPANT_PREFIX + INTEROP_ELEMENT_PREPARED_AFTER_TIMEOUT ;
+    
+    /**
+     * The lost committed element.
+     */
+    public String INTEROP_ELEMENT_LOST_COMMITTED = "LostCommitted" ;
+    /**
+     * The lost committed QName.
+     */
+    public QName INTEROP_ELEMENT_QNAME_LOST_COMMITTED = new QName(INTEROP_NAMESPACE, INTEROP_ELEMENT_LOST_COMMITTED, INTEROP_PREFIX) ;
+    /**
+     * The lost committed Action.
+     */
+    public String INTEROP_ACTION_LOST_COMMITTED = INTEROP_ACTION_PARTICIPANT_PREFIX + INTEROP_ELEMENT_LOST_COMMITTED ;
+    
+    /**
+     * The response element.
+     */
+    public String INTEROP_ELEMENT_RESPONSE = "Response" ;
+    /**
+     * The response QName.
+     */
+    public QName INTEROP_ELEMENT_QNAME_RESPONSE = new QName(INTEROP_NAMESPACE, INTEROP_ELEMENT_RESPONSE, INTEROP_PREFIX) ;
+    /**
+     * The response Action.
+     */
+    public String INTEROP_ACTION_RESPONSE = INTEROP_ACTION_INITIATOR_PREFIX + INTEROP_ELEMENT_RESPONSE ;
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/InteropUtil.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/InteropUtil.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/InteropUtil.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,145 @@
+package com.jboss.transaction.wstf.webservices.sc007;
+
+import com.arjuna.webservices11.wsat.AtomicTransactionConstants;
+import com.arjuna.webservices11.wsat.processors.ParticipantProcessor;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.ServiceRegistry;
+import com.arjuna.wsc11.ActivationCoordinator;
+import com.arjuna.wsc11.RegistrationCoordinator;
+import com.arjuna.wsc11.messaging.MessageId;
+import com.arjuna.wst.CompletionCoordinatorParticipant;
+import com.arjuna.wst.Durable2PCParticipant;
+import com.arjuna.wst.Participant;
+import com.arjuna.wst.Volatile2PCParticipant;
+import com.arjuna.wst11.messaging.engines.ParticipantEngine;
+import com.arjuna.wst11.stub.CompletionStub;
+
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
+
+/**
+ * Utility methods
+ */
+public class InteropUtil
+{
+    /**
+     * Get a coordination context.
+     * @param coordinatorURI The coordinator URI.
+     * @return The coordination context.
+     * @throws Exception for errors.
+     */
+    public static CoordinationContextType createCoordinationContext(final String coordinatorURI)
+        throws Exception
+    {
+        return ActivationCoordinator.createCoordinationContext(coordinatorURI, MessageId.getMessageId(), AtomicTransactionConstants.WSAT_PROTOCOL, null, null) ;
+    }
+
+    /**
+     * Register for completion.
+     * @param context The coordination context.
+     * @return The endpoint for communicating with the coordinator.
+     * @throws Exception for errors.
+     */
+    public static CompletionCoordinatorParticipant registerCompletion(final CoordinationContextType context, final String id)
+        throws Exception
+    {
+        final W3CEndpointReference completionCoordinator = register(context, getCompletionParticipant(id), AtomicTransactionConstants.WSAT_SUB_PROTOCOL_COMPLETION) ;
+        return new CompletionStub(id, completionCoordinator);
+    }
+    
+    /**
+     * Register a durable participant in the specified coordination context.
+     * @param context The coordination context.
+     * @param participant The durable 2PC participant
+     * @param id The participant id.
+     * @return The participant engine.
+     * @throws Exception for errors.
+     */
+    public static ParticipantEngine registerDurable2PC(final CoordinationContextType context, final Durable2PCParticipant participant, final String id)
+        throws Exception
+    {
+        return registerParticipant(context, participant, id, AtomicTransactionConstants.WSAT_SUB_PROTOCOL_DURABLE_2PC) ;
+    }
+    
+    /**
+     * Register a volatile participant in the specified coordination context.
+     * @param context The coordination context.
+     * @param participant The volatile 2PC participant
+     * @param id The participant id.
+     * @return The participant engine.
+     * @throws Exception for errors.
+     */
+    public static ParticipantEngine registerVolatile2PC(final CoordinationContextType context, final Volatile2PCParticipant participant, final String id)
+        throws Exception
+    {
+        return registerParticipant(context, participant, id, AtomicTransactionConstants.WSAT_SUB_PROTOCOL_VOLATILE_2PC) ;
+    }
+    
+    /**
+     * Register the participant in the specified coordination context.
+     * @param context The coordination context.
+     * @param participant The participant.
+     * @param id The participant id.
+     * @param protocol The sub protocol to register for.
+     * @return The participant engine.
+     * @throws Exception for errors.
+     */
+    private static ParticipantEngine registerParticipant(final CoordinationContextType context, final Participant participant, final String id, final String protocol)
+        throws Exception
+    {
+        final W3CEndpointReference coordinator = RegistrationCoordinator.register(context, MessageId.getMessageId(),
+            getParticipant(id), protocol) ;
+        final ParticipantEngine engine = new ParticipantEngine(participant, id, coordinator) ;
+        ParticipantProcessor.getProcessor().activateParticipant(engine, id) ;
+        return engine ;
+    }
+    
+    /**
+     * Register for a sub protocol.
+     * @param context The coordination context.
+     * @param participant The participant EPR.
+     * @param protocol The protocol.
+     * @return The coordinator endpoint.
+     * @throws Exception for errors.
+     */
+    private static W3CEndpointReference register(final CoordinationContextType context, final W3CEndpointReference participant, final String protocol)
+        throws Exception
+    {
+        return RegistrationCoordinator.register(context, MessageId.getMessageId(), participant, protocol) ;
+    }
+
+    /**
+     * Get an endpoint reference for the completion initiator service.
+     * @param id The completion id.
+     * @return The endpoint reference.
+     */
+    private static W3CEndpointReference getCompletionParticipant(final String id)
+    {
+        final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+        final String serviceURI = serviceRegistry.getServiceURI(AtomicTransactionConstants.COMPLETION_INITIATOR_SERVICE_NAME) ;
+        final W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+        builder.serviceName(AtomicTransactionConstants.COMPLETION_INITIATOR_SERVICE_QNAME);
+        builder.endpointName(AtomicTransactionConstants.COMPLETION_INITIATOR_PORT_QNAME);
+        builder.address(serviceURI);
+        InstanceIdentifier.setEndpointInstanceIdentifier(builder, id) ;
+        return builder.build();
+    }
+
+    /**
+     * Get an endpoint reference for the participant service.
+     * @param id The participant id.
+     * @return The endpoint reference.
+     */
+    private static W3CEndpointReference getParticipant(final String id)
+    {
+        final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+        final String serviceURI = serviceRegistry.getServiceURI(AtomicTransactionConstants.PARTICIPANT_SERVICE_NAME) ;
+        final W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+        builder.serviceName(AtomicTransactionConstants.PARTICIPANT_SERVICE_QNAME);
+        builder.endpointName(AtomicTransactionConstants.PARTICIPANT_PORT_QNAME);
+        builder.address(serviceURI);
+        InstanceIdentifier.setEndpointInstanceIdentifier(builder, id) ;
+        return builder.build();
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/ParticipantStub.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/ParticipantStub.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/ParticipantStub.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,162 @@
+package com.jboss.transaction.wstf.webservices.sc007;
+
+import java.io.IOException;
+
+import com.arjuna.webservices.SoapFault;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+
+/**
+ * The interface for the participant stub.
+ */
+public interface ParticipantStub
+{
+    /**
+     * Send a completion commit request.
+     * @param serviceURI The target service URI.
+     * @param coordinatorURI The coordinator URI.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void completionCommit(final String serviceURI, final String coordinatorURI)
+        throws SoapFault, IOException ;
+
+    /**
+     * Send a completion rollback request.
+     * @param serviceURI The target service URI.
+     * @param coordinatorURI The coordinator URI.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void completionRollback(final String serviceURI, final String coordinatorURI)
+        throws SoapFault, IOException ;
+
+    /**
+     * Send a commit request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void commit(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException ;
+
+    /**
+     * Send a rollback request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void rollback(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException ;
+
+    /**
+     * Send a phase2Rollback request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void phase2Rollback(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException ;
+
+    /**
+     * Send a readonly request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void readonly(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException ;
+
+    /**
+     * Send a volatileAndDurable request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void volatileAndDurable(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException ;
+
+    /**
+     * Send an earlyReadonly request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void earlyReadonly(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException ;
+
+    /**
+     * Send a earlyAborted request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void earlyAborted(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException ;
+
+    /**
+     * Send a replayCommit request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void replayCommit(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException ;
+
+    /**
+     * Send a retryPreparedCommit request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void retryPreparedCommit(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException ;
+
+    /**
+     * Send a retryPreparedAbort request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void retryPreparedAbort(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException ;
+
+    /**
+     * Send a retryCommit request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void retryCommit(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException ;
+
+    /**
+     * Send a preparedAfterTimeout request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void preparedAfterTimeout(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException ;
+
+    /**
+     * Send a lostCommitted request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void lostCommitted(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException ;
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/SyncParticipantStub.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/SyncParticipantStub.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/SyncParticipantStub.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,271 @@
+package com.jboss.transaction.wstf.webservices.sc007;
+
+import java.io.IOException;
+
+import com.arjuna.webservices.SoapFault;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import com.arjuna.wsc11.messaging.MessageId;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.jboss.transaction.wstf.webservices.sc007.client.SyncParticipantClient;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+/**
+ * The participant stub.
+ */
+public class SyncParticipantStub implements ParticipantStub
+{
+    /**
+     * The participant stub singletong.
+     */
+    private static final ParticipantStub PARTICIPANT_STUB = new SyncParticipantStub() ;
+    
+    /**
+     * Get the participant stub singleton.
+     * @return The participant stub singleton.
+     */
+    public static ParticipantStub getParticipantStub()
+    {
+        return PARTICIPANT_STUB ;
+    }
+    
+    /**
+     * Send a completion commit request.
+     * @param serviceURI The target service URI.
+     * @param coordinatorURI The coordinator URI.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void completionCommit(final String serviceURI, final String coordinatorURI)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+        SyncParticipantClient.getClient().sendCompletionCommit(addressingProperties, coordinatorURI) ;
+    }
+
+    /**
+     * Send a completion rollback request.
+     * @param serviceURI The target service URI.
+     * @param coordinatorURI The coordinator URI.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void completionRollback(final String serviceURI, final String coordinatorURI)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+        SyncParticipantClient.getClient().sendCompletionRollback(addressingProperties, coordinatorURI) ;
+    }
+
+    /**
+     * Send a commit request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void commit(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+        SyncParticipantClient.getClient().sendCommit(coordinationContext, addressingProperties) ;
+    }
+
+    /**
+     * Send a rollback request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void rollback(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+        SyncParticipantClient.getClient().sendRollback(coordinationContext, addressingProperties) ;
+    }
+
+    /**
+     * Send a phase2Rollback request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void phase2Rollback(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+        SyncParticipantClient.getClient().sendPhase2Rollback(coordinationContext, addressingProperties) ;
+    }
+
+    /**
+     * Send a readonly request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void readonly(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+        SyncParticipantClient.getClient().sendReadonly(coordinationContext, addressingProperties) ;
+    }
+
+    /**
+     * Send a volatileAndDurable request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void volatileAndDurable(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+        
+        SyncParticipantClient.getClient().sendVolatileAndDurable(coordinationContext, addressingProperties) ;
+    }
+
+    /**
+     * Send an earlyReadonly request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void earlyReadonly(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+        
+        SyncParticipantClient.getClient().sendEarlyReadonly(coordinationContext, addressingProperties) ;
+    }
+
+    /**
+     * Send a earlyAborted request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void earlyAborted(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+        
+        SyncParticipantClient.getClient().sendEarlyAborted(coordinationContext, addressingProperties) ;
+    }
+
+    /**
+     * Send a replayCommit request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void replayCommit(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+        
+        SyncParticipantClient.getClient().sendReplayCommit(coordinationContext, addressingProperties) ;
+    }
+
+    /**
+     * Send a retryPreparedCommit request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void retryPreparedCommit(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+        
+        SyncParticipantClient.getClient().sendRetryPreparedCommit(coordinationContext, addressingProperties) ;
+    }
+
+    /**
+     * Send a retryPreparedAbort request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void retryPreparedAbort(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+        
+        SyncParticipantClient.getClient().sendRetryPreparedAbort(coordinationContext, addressingProperties) ;
+    }
+
+    /**
+     * Send a retryCommit request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void retryCommit(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+        
+        SyncParticipantClient.getClient().sendRetryCommit(coordinationContext, addressingProperties) ;
+    }
+
+    /**
+     * Send a preparedAfterTimeout request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void preparedAfterTimeout(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+        
+        SyncParticipantClient.getClient().sendPreparedAfterTimeout(coordinationContext, addressingProperties) ;
+    }
+
+    /**
+     * Send a lostCommitted request.
+     * @param serviceURI The target service URI.
+     * @param coordinationContext The coordination context.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void lostCommitted(final String serviceURI, final CoordinationContextType coordinationContext)
+        throws SoapFault, IOException
+    {
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+        
+        SyncParticipantClient.getClient().sendLostCommitted(coordinationContext, addressingProperties) ;
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/client/AsyncParticipantClient.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/client/AsyncParticipantClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/client/AsyncParticipantClient.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,456 @@
+package com.jboss.transaction.wstf.webservices.sc007.client;
+
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URI;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.ServiceRegistry;
+import com.jboss.transaction.wstf.webservices.CoordinationContextManager;
+import com.jboss.transaction.wstf.webservices.sc007.InteropConstants;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import com.jboss.transaction.wstf.webservices.sc007.generated.ParticipantPortType;
+
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.EndpointReference;
+import javax.xml.ws.addressing.AddressingBuilder;
+
+/**
+ * The participant client.
+ * @author kevin
+ */
+public class AsyncParticipantClient
+{
+    /**
+     * The client singleton.
+     */
+    private static final AsyncParticipantClient CLIENT = new AsyncParticipantClient() ;
+
+    /**
+     * The completion commit action.
+     */
+    private static final String completionCommitAction = InteropConstants.INTEROP_ACTION_COMPLETION_COMMIT ;
+    /**
+     * The completion rollback Action.
+     */
+    private static final String completionRollbackAction = InteropConstants.INTEROP_ACTION_COMPLETION_ROLLBACK ;
+    /**
+     * The commit Action.
+     */
+    private static final String commitAction = InteropConstants.INTEROP_ACTION_COMMIT ;
+    /**
+     * The rollback Action.
+     */
+    private static final String rollbackAction = InteropConstants.INTEROP_ACTION_ROLLBACK ;
+    /**
+     * The phase 2 rollback Action.
+     */
+    private static final String phase2RollbackAction = InteropConstants.INTEROP_ACTION_PHASE_2_ROLLBACK ;
+    /**
+     * The readonly Action.
+     */
+    private static final String readonlyAction = InteropConstants.INTEROP_ACTION_READONLY ;
+    /**
+     * The volatile and durable Action.
+     */
+    private static final String volatileAndDurableAction = InteropConstants.INTEROP_ACTION_VOLATILE_AND_DURABLE ;
+    /**
+     * The early readonly Action.
+     */
+    private static final String earlyReadonlyAction = InteropConstants.INTEROP_ACTION_EARLY_READONLY ;
+    /**
+     * The early aborted Action.
+     */
+    private static final String earlyAbortedAction = InteropConstants.INTEROP_ACTION_EARLY_ABORTED ;
+    /**
+     * The replay commit Action.
+     */
+    private static final String replayCommitAction = InteropConstants.INTEROP_ACTION_REPLAY_COMMIT ;
+    /**
+     * The retry prepared commit Action.
+     */
+    private static final String retryPreparedCommitAction = InteropConstants.INTEROP_ACTION_RETRY_PREPARED_COMMIT ;
+    /**
+     * The retry prepared abort Action.
+     */
+    private static final String retryPreparedAbortAction = InteropConstants.INTEROP_ACTION_RETRY_PREPARED_ABORT ;
+    /**
+     * The retry commit Action.
+     */
+    private static final String retryCommitAction = InteropConstants.INTEROP_ACTION_RETRY_COMMIT ;
+    /**
+     * The prepared after timeout Action.
+     */
+    private static final String preparedAfterTimeoutAction = InteropConstants.INTEROP_ACTION_PREPARED_AFTER_TIMEOUT ;
+    /**
+     * The lost committed Action.
+     */
+    private static final String lostCommittedAction = InteropConstants.INTEROP_ACTION_LOST_COMMITTED ;
+
+    /**
+     * The initiator URI for replies.
+     */
+    private EndpointReference initiator = null;
+
+    /**
+     * Construct the interop synch client.
+     */
+    private AsyncParticipantClient()
+    {
+        //final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+
+        // Add WS-Addressing
+        //AddressingPolicy.register(handlerRegistry) ;
+        // Add coordination context
+        //CoordinationContextPolicy.register(handlerRegistry) ;
+        // Add client policies
+        //ClientPolicy.register(handlerRegistry) ;
+
+        //soapService = new SoapService(handlerRegistry) ;
+        AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+        final String initiatorURIString = ServiceRegistry.getRegistry().getServiceURI(InteropConstants.SERVICE_INITIATOR) ;
+        URI uri = null;
+        try {
+            uri = new URI(initiatorURIString);
+            initiator = builder.newEndpointReference(uri);
+        } catch (URISyntaxException e) {
+            // TODO log error here
+        }
+    }
+    /**
+     * Send a completion commit request.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @param coordinatorURI The coordinator URI.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendCompletionCommit(final AddressingProperties addressingProperties, final String coordinatorURI)
+        throws SoapFault, IOException
+    {
+        addressingProperties.setReplyTo(initiator) ;
+        ParticipantPortType port = InteropClient.getParticipantPort(addressingProperties, completionCommitAction);
+        port.completionCommit(coordinatorURI);
+    }
+
+    /**
+     * Send a completion rollback request.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @param coordinatorURI The coordinator URI.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendCompletionRollback(final AddressingProperties addressingProperties, final String coordinatorURI)
+        throws SoapFault, IOException
+    {
+        addressingProperties.setReplyTo(initiator) ;
+        ParticipantPortType port = InteropClient.getParticipantPort(addressingProperties, completionRollbackAction);
+        port.completionRollback(coordinatorURI);
+    }
+
+    /**
+     * Send a commit request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendCommit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+        addressingProperties.setReplyTo(initiator) ;
+        ParticipantPortType port = InteropClient.getParticipantPort(addressingProperties, commitAction);
+        CoordinationContextManager.setThreadContext(coordinationContext) ;
+        try
+        {
+            port.commit();
+        }
+        finally
+        {
+            CoordinationContextManager.setThreadContext(null) ;
+        }
+    }
+
+    /**
+     * Send a rollback request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendRollback(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+        addressingProperties.setReplyTo(initiator) ;
+        ParticipantPortType port = InteropClient.getParticipantPort(addressingProperties, rollbackAction);
+        CoordinationContextManager.setThreadContext(coordinationContext) ;
+        try
+        {
+            port.rollback();
+        }
+        finally
+        {
+            CoordinationContextManager.setThreadContext(null) ;
+        }
+    }
+
+    /**
+     * Send a phase2Rollback request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendPhase2Rollback(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+        addressingProperties.setReplyTo(initiator) ;
+        ParticipantPortType port = InteropClient.getParticipantPort(addressingProperties, phase2RollbackAction);
+        CoordinationContextManager.setThreadContext(coordinationContext) ;
+        try
+        {
+            port.phase2Rollback();
+        }
+        finally
+        {
+            CoordinationContextManager.setThreadContext(null) ;
+        }
+    }
+
+    /**
+     * Send a readonly request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendReadonly(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+        addressingProperties.setReplyTo(initiator) ;
+        ParticipantPortType port = InteropClient.getParticipantPort(addressingProperties, readonlyAction);
+        CoordinationContextManager.setThreadContext(coordinationContext) ;
+        try
+        {
+            port.readonly();
+        }
+        finally
+        {
+            CoordinationContextManager.setThreadContext(null) ;
+        }
+    }
+
+    /**
+     * Send a volatileAndDurable request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendVolatileAndDurable(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+        addressingProperties.setReplyTo(initiator) ;
+        ParticipantPortType port = InteropClient.getParticipantPort(addressingProperties, volatileAndDurableAction);
+        CoordinationContextManager.setThreadContext(coordinationContext) ;
+        try
+        {
+            port.volatileAndDurable();
+        }
+        finally
+        {
+            CoordinationContextManager.setThreadContext(null) ;
+        }
+    }
+
+    /**
+     * Send an earlyReadonly request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendEarlyReadonly(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+        addressingProperties.setReplyTo(initiator) ;
+        ParticipantPortType port = InteropClient.getParticipantPort(addressingProperties, earlyReadonlyAction);
+        CoordinationContextManager.setThreadContext(coordinationContext) ;
+        try
+        {
+            port.earlyReadonly();
+        }
+        finally
+        {
+            CoordinationContextManager.setThreadContext(null) ;
+        }
+    }
+
+    /**
+     * Send a earlyAborted request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendEarlyAborted(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+        addressingProperties.setReplyTo(initiator) ;
+        ParticipantPortType port = InteropClient.getParticipantPort(addressingProperties, earlyAbortedAction);
+        CoordinationContextManager.setThreadContext(coordinationContext) ;
+        try
+        {
+            port.earlyAborted();
+        }
+        finally
+        {
+            CoordinationContextManager.setThreadContext(null) ;
+        }
+    }
+
+    /**
+     * Send a replayCommit request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendReplayCommit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+        addressingProperties.setReplyTo(initiator) ;
+        ParticipantPortType port = InteropClient.getParticipantPort(addressingProperties, replayCommitAction);
+        CoordinationContextManager.setThreadContext(coordinationContext) ;
+        try
+        {
+            port.replayCommit();
+        }
+        finally
+        {
+            CoordinationContextManager.setThreadContext(null) ;
+        }
+    }
+
+    /**
+     * Send a retryPreparedCommit request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendRetryPreparedCommit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+        addressingProperties.setReplyTo(initiator) ;
+        ParticipantPortType port = InteropClient.getParticipantPort(addressingProperties, retryPreparedCommitAction);
+        CoordinationContextManager.setThreadContext(coordinationContext) ;
+        try
+        {
+            port.retryPreparedCommit();
+        }
+        finally
+        {
+            CoordinationContextManager.setThreadContext(null) ;
+        }
+    }
+
+    /**
+     * Send a retryPreparedAbort request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendRetryPreparedAbort(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+        addressingProperties.setReplyTo(initiator) ;
+        ParticipantPortType port = InteropClient.getParticipantPort(addressingProperties, retryPreparedAbortAction);
+        CoordinationContextManager.setThreadContext(coordinationContext) ;
+        try
+        {
+            port.retryPreparedAbort();
+        }
+        finally
+        {
+            CoordinationContextManager.setThreadContext(null) ;
+        }
+    }
+
+    /**
+     * Send a retryCommit request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws IOException for any transport errors.
+     */
+    public void sendRetryCommit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+        addressingProperties.setReplyTo(initiator) ;
+        ParticipantPortType port = InteropClient.getParticipantPort(addressingProperties, retryCommitAction);
+        CoordinationContextManager.setThreadContext(coordinationContext) ;
+        try
+        {
+            port.retryCommit();
+        }
+        finally
+        {
+            CoordinationContextManager.setThreadContext(null) ;
+        }
+    }
+
+    /**
+     * Send a preparedAfterTimeout request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendPreparedAfterTimeout(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+        addressingProperties.setReplyTo(initiator) ;
+        ParticipantPortType port = InteropClient.getParticipantPort(addressingProperties, preparedAfterTimeoutAction);
+        CoordinationContextManager.setThreadContext(coordinationContext) ;
+        try
+        {
+            port.preparedAfterTimeout();
+        }
+        finally
+        {
+            CoordinationContextManager.setThreadContext(null) ;
+        }
+    }
+
+    /**
+     * Send a lostCommitted request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendLostCommitted(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+        addressingProperties.setReplyTo(initiator) ;
+        ParticipantPortType port = InteropClient.getParticipantPort(addressingProperties, lostCommittedAction);
+        CoordinationContextManager.setThreadContext(coordinationContext) ;
+        try
+        {
+            port.lostCommitted();
+        }
+        finally
+        {
+            CoordinationContextManager.setThreadContext(null) ;
+        }
+    }
+
+    /**
+     * Get the Interop client singleton.
+     * @return The Interop client singleton.
+     */
+    public static AsyncParticipantClient getClient()
+    {
+        return CLIENT ;
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/client/InitiatorClient.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/client/InitiatorClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/client/InitiatorClient.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,99 @@
+package com.jboss.transaction.wstf.webservices.sc007.client;
+
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.SoapFault11;
+import com.arjuna.webservices11.wsat.AtomicTransactionConstants;
+import com.arjuna.webservices11.wsaddr.client.SoapFaultClient;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.wsc11.messaging.MessageId;
+import com.jboss.transaction.wstf.webservices.sc007.InteropConstants;
+import com.jboss.transaction.wstf.webservices.sc007.generated.InitiatorPortType;
+
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.AttributedURI;
+import javax.xml.ws.addressing.AddressingBuilder;
+
+/**
+ * The initiator client.
+ * @author kevin
+ */
+public class InitiatorClient
+{
+    /**
+     * The client singleton.
+     */
+    private static final InitiatorClient CLIENT = new InitiatorClient() ;
+    
+    /**
+     * The response action.
+     */
+    private static final String responseAction = InteropConstants.INTEROP_ACTION_RESPONSE ;
+    
+    /**
+     * Construct the interop synch client.
+     */
+    private InitiatorClient()
+    {
+        //final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+        
+        // Add WS-Addressing
+        //AddressingPolicy.register(handlerRegistry) ;
+        // Add client policies
+        //ClientPolicy.register(handlerRegistry) ;
+        
+        //soapService = new SoapService(handlerRegistry) ;
+    }
+
+    /**
+     * Send a response.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendResponse(final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+        InitiatorPortType port = InteropClient.getInitiatorPort(addressingProperties, responseAction);
+        port.response();
+    }
+
+    /**
+     * Send a fault.
+     * @param addressingProperties The addressing context.
+     * @param soapFault The SOAP fault.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendSoapFault(final AddressingProperties addressingProperties, final SoapFault11 soapFault)
+        throws SoapFault, IOException
+    {
+        String soapFaultAction = soapFault.getAction() ;
+        AttributedURI actionURI = null;
+        if (soapFaultAction == null)
+        {
+            soapFaultAction = faultAction;
+        }
+        try {
+            actionURI = builder.newURI(soapFaultAction);
+        } catch (URISyntaxException e) {
+            // TODO log error here
+        }
+        AddressingProperties replyProperties = AddressingHelper.createFaultContext(addressingProperties, MessageId.getMessageId());
+        AddressingHelper.installNoneReplyTo(replyProperties);
+        SoapFaultClient.sendSoapFault(soapFault, addressingProperties, actionURI);
+    }
+
+    private static final String faultAction = AtomicTransactionConstants.WSAT_ACTION_FAULT;
+    private static final AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+    /**
+     * Get the Interop client singleton.
+     * @return The Interop client singleton.
+     */
+    public static InitiatorClient getClient()
+    {
+        return CLIENT ;
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/client/InteropClient.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/client/InteropClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/client/InteropClient.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,150 @@
+package com.jboss.transaction.wstf.webservices.sc007.client;
+
+import org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler;
+
+import javax.xml.ws.addressing.*;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.handler.Handler;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.net.URISyntaxException;
+import java.net.URI;
+
+import com.arjuna.webservices11.ServiceRegistry;
+import com.jboss.transaction.wstf.webservices.sc007.generated.Sc007Service;
+import com.jboss.transaction.wstf.webservices.sc007.generated.InitiatorPortType;
+import com.jboss.transaction.wstf.webservices.sc007.generated.ParticipantPortType;
+import com.jboss.transaction.wstf.webservices.sc007.InteropConstants;
+import com.jboss.transaction.wstf.webservices.handlers.CoordinationContextHandler;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: adinn
+ * Date: Apr 17, 2008
+ * Time: 4:18:34 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class InteropClient {
+    // TODO -- do we really need a thread local here or can we just use one service?
+    /**
+     *  thread local which maintains a per thread Sc007 service instance
+     */
+    private static ThreadLocal<Sc007Service> sc007Service = new ThreadLocal<Sc007Service>();
+
+    /**
+     *  builder used to construct addressing info for calls
+     */
+    private static AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+
+    /**
+     * fetch an Sc007 service unique to the current thread
+     * @return
+     */
+    private static synchronized Sc007Service getSc007Service()
+    {
+        if (sc007Service.get() == null) {
+            sc007Service.set(new Sc007Service());
+        }
+        return sc007Service.get();
+    }
+
+    public static InitiatorPortType getInitiatorPort(AddressingProperties addressingProperties,
+                                                       String action)
+    {
+        // TODO - we need the 2.1 verison of Service so we can specify that we want to use the WS Addressing feature
+        Sc007Service service = getSc007Service();
+        InitiatorPortType port = service.getPort(InitiatorPortType.class);
+        BindingProvider bindingProvider = (BindingProvider)port;
+        AttributedURI toUri = addressingProperties.getTo();
+        List<Handler> customHandlerChain = new ArrayList<Handler>();
+        /*
+         * we have to add the JaxWS WSAddressingClientHandler because we cannot specify the WSAddressing feature
+         */
+		customHandlerChain.add(new WSAddressingClientHandler());
+        bindingProvider.getBinding().setHandlerChain(customHandlerChain);
+
+        Map<String, Object> requestContext = bindingProvider.getRequestContext();
+        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
+	    // jbossws should do this for us . . .
+	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
+        requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, toUri.getURI().toString());
+        try {
+            addressingProperties.setAction(builder.newURI(action));
+            addressingProperties.setFrom(getParticipant());
+        } catch (URISyntaxException use) {
+            // TODO log this error
+        }
+
+        return port;
+    }
+
+    // don't think we ever need this as we get a registration port from the endpoint ref returned by
+    // the activation port request
+    public static ParticipantPortType getParticipantPort(AddressingProperties addressingProperties, String action)
+    {
+        // TODO - we need the 2.1 verison of Service so we can specify that we want to use the WS Addressing feature
+        Sc007Service service = getSc007Service();
+        ParticipantPortType port = service.getPort(ParticipantPortType.class);
+        BindingProvider bindingProvider = (BindingProvider)port;
+        AttributedURI toUri = addressingProperties.getTo();
+        List<Handler> customHandlerChain = new ArrayList<Handler>();
+        /*
+         * we need to add the coordination context handler in the case where we are passing a
+         * coordination context via a header element
+         */
+        customHandlerChain.add(new CoordinationContextHandler());
+        /*
+         * we have to add the JaxWS WSAddressingClientHandler because we cannot specify the WSAddressing feature
+         */
+		customHandlerChain.add(new WSAddressingClientHandler());
+		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
+
+        Map<String, Object> requestContext = bindingProvider.getRequestContext();
+        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
+	    // jbossws should do this for us . . .
+	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
+        requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, toUri.getURI().toString());
+        try {
+            addressingProperties.setAction(builder.newURI(action));
+            addressingProperties.setFrom(getInitiator());
+        } catch (URISyntaxException use) {
+            // TODO log this error
+        }
+
+        return port;
+    }
+
+    private static EndpointReference initiator;
+    private static EndpointReference participant;
+
+    private static synchronized EndpointReference getInitiator()
+    {
+        if (initiator == null) {
+            final String initiatorURIString =
+                ServiceRegistry.getRegistry().getServiceURI(InteropConstants.SERVICE_INITIATOR);
+            try {
+                URI initiatorURI = new URI(initiatorURIString);
+                initiator = builder.newEndpointReference(initiatorURI);
+            } catch (URISyntaxException use) {
+                // TODO - log fault and throw exception
+            }
+        }
+        return initiator;
+    }
+
+    private static synchronized EndpointReference getParticipant()
+    {
+        if (participant == null) {
+            final String participantURIString =
+                    ServiceRegistry.getRegistry().getServiceURI(InteropConstants.SERVICE_PARTICIPANT);
+            try {
+                URI participantURI = new URI(participantURIString);
+                participant = builder.newEndpointReference(participantURI);
+            } catch (URISyntaxException use) {
+                // TODO - log fault and throw exception
+            }
+        }
+        return participant;
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/client/SyncParticipantClient.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/client/SyncParticipantClient.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/client/SyncParticipantClient.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,278 @@
+package com.jboss.transaction.wstf.webservices.sc007.client;
+
+import java.io.IOException;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+import com.arjuna.webservices.*;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import com.jboss.transaction.wstf.webservices.sc007.InteropConstants;
+
+/**
+ * The participant client.
+ * @author kevin
+ */
+public class SyncParticipantClient
+{
+    /**
+     * The client singleton.
+     */
+    private static final SyncParticipantClient CLIENT = new SyncParticipantClient() ;
+    
+    /**
+     * The completion commit action.
+     */
+    private static final String completionCommitAction = InteropConstants.INTEROP_ACTION_COMPLETION_COMMIT ;
+    /**
+     * The completion rollback Action.
+     */
+    private static final String completionRollbackAction = InteropConstants.INTEROP_ACTION_COMPLETION_ROLLBACK ;
+    /**
+     * The commit Action.
+     */
+    private static final String commitAction = InteropConstants.INTEROP_ACTION_COMMIT ;
+    /**
+     * The rollback Action.
+     */
+    private static final String rollbackAction = InteropConstants.INTEROP_ACTION_ROLLBACK ;
+    /**
+     * The phase 2 rollback Action.
+     */
+    private static final String phase2RollbackAction = InteropConstants.INTEROP_ACTION_PHASE_2_ROLLBACK ;
+    /**
+     * The readonly Action.
+     */
+    private static final String readonlyAction = InteropConstants.INTEROP_ACTION_READONLY ;
+    /**
+     * The volatile and durable Action.
+     */
+    private static final String volatileAndDurableAction = InteropConstants.INTEROP_ACTION_VOLATILE_AND_DURABLE ;
+    /**
+     * The early readonly Action.
+     */
+    private static final String earlyReadonlyAction = InteropConstants.INTEROP_ACTION_EARLY_READONLY ;
+    /**
+     * The early aborted Action.
+     */
+    private static final String earlyAbortedAction = InteropConstants.INTEROP_ACTION_EARLY_ABORTED ;
+    /**
+     * The replay commit Action.
+     */
+    private static final String replayCommitAction = InteropConstants.INTEROP_ACTION_REPLAY_COMMIT ;
+    /**
+     * The retry prepared commit Action.
+     */
+    private static final String retryPreparedCommitAction = InteropConstants.INTEROP_ACTION_RETRY_PREPARED_COMMIT ;
+    /**
+     * The retry prepared abort Action.
+     */
+    private static final String retryPreparedAbortAction = InteropConstants.INTEROP_ACTION_RETRY_PREPARED_ABORT ;
+    /**
+     * The retry commit Action.
+     */
+    private static final String retryCommitAction = InteropConstants.INTEROP_ACTION_RETRY_COMMIT ;
+    /**
+     * The prepared after timeout Action.
+     */
+    private static final String preparedAfterTimeoutAction = InteropConstants.INTEROP_ACTION_PREPARED_AFTER_TIMEOUT ;
+    /**
+     * The lost committed Action.
+     */
+    private static final String lostCommittedAction = InteropConstants.INTEROP_ACTION_LOST_COMMITTED ;
+    
+    /**
+     * Construct the interop synch client.
+     */
+    private SyncParticipantClient()
+    {
+    }
+
+    /**
+     * Send a completion commit request.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @param coordinatorURI The coordinator URI.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendCompletionCommit(final AddressingProperties addressingProperties, final String coordinatorURI)
+        throws SoapFault, IOException
+    {
+    }
+
+    /**
+     * Send a completion rollback request.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @param coordinatorURI The coordinator URI.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendCompletionRollback(final AddressingProperties addressingProperties, final String coordinatorURI)
+        throws SoapFault, IOException
+    {
+    }
+
+    /**
+     * Send a commit request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendCommit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+    }
+
+    /**
+     * Send a rollback request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendRollback(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+    }
+
+    /**
+     * Send a phase2Rollback request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendPhase2Rollback(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+    }
+
+    /**
+     * Send a readonly request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendReadonly(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+    }
+
+    /**
+     * Send a volatileAndDurable request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendVolatileAndDurable(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+    }
+
+    /**
+     * Send an earlyReadonly request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendEarlyReadonly(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+    }
+
+    /**
+     * Send a earlyAborted request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendEarlyAborted(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+    }
+
+    /**
+     * Send a replayCommit request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendReplayCommit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+    }
+
+    /**
+     * Send a retryPreparedCommit request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendRetryPreparedCommit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+    }
+
+    /**
+     * Send a retryPreparedAbort request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendRetryPreparedAbort(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+    }
+
+    /**
+     * Send a retryCommit request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendRetryCommit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+    }
+
+    /**
+     * Send a preparedAfterTimeout request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendPreparedAfterTimeout(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+    }
+
+    /**
+     * Send a lostCommitted request.
+     * @param coordinationContext The coordination context.
+     * @param addressingProperties The addressing context initialised with to, message ID and relates to.
+     * @throws SoapFault For any errors.
+     * @throws IOException for any transport errors.
+     */
+    public void sendLostCommitted(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault, IOException
+    {
+    }
+    
+    /**
+     * Get the Interop client singleton.
+     * @return The Interop client singleton.
+     */
+    public static SyncParticipantClient getClient()
+    {
+        return CLIENT ;
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/generated/InitiatorPortType.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/generated/InitiatorPortType.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/generated/InitiatorPortType.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,28 @@
+
+package com.jboss.transaction.wstf.webservices.sc007.generated;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.xml.ws.RequestWrapper;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.2-hudson-182-RC1
+ * Generated source version: 2.0
+ * 
+ */
+ at WebService(name = "InitiatorPortType", targetNamespace = "http://www.wstf.org/sc007")
+public interface InitiatorPortType {
+
+
+    /**
+     * 
+     */
+    @WebMethod(operationName = "Response", action = "http://www.wstf.org/docs/scenarios/sc007/Response")
+    @Oneway
+    @RequestWrapper(localName = "Response", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.wstf.webservices.sc007.generated.TestMessageType")
+    public void response();
+
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/generated/ObjectFactory.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/generated/ObjectFactory.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/generated/ObjectFactory.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,203 @@
+
+package com.jboss.transaction.wstf.webservices.sc007.generated;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the com.jboss.transaction.wstf.webservices.sc007.generated package. 
+ * <p>An ObjectFactory allows you to programatically 
+ * construct new instances of the Java representation 
+ * for XML content. The Java representation of XML 
+ * content can consist of schema derived interfaces 
+ * and classes representing the binding of schema 
+ * type definitions, element declarations and model 
+ * groups.  Factory methods for each of these are 
+ * provided in this class.
+ * 
+ */
+ at XmlRegistry
+public class ObjectFactory {
+
+    private final static QName _Response_QNAME = new QName("http://www.wstf.org/sc007", "Response");
+    private final static QName _Readonly_QNAME = new QName("http://www.wstf.org/sc007", "Readonly");
+    private final static QName _VolatileAndDurable_QNAME = new QName("http://www.wstf.org/sc007", "VolatileAndDurable");
+    private final static QName _ReplayCommit_QNAME = new QName("http://www.wstf.org/sc007", "ReplayCommit");
+    private final static QName _EarlyReadonly_QNAME = new QName("http://www.wstf.org/sc007", "EarlyReadonly");
+    private final static QName _PreparedAfterTimeout_QNAME = new QName("http://www.wstf.org/sc007", "PreparedAfterTimeout");
+    private final static QName _Phase2Rollback_QNAME = new QName("http://www.wstf.org/sc007", "Phase2Rollback");
+    private final static QName _EarlyAborted_QNAME = new QName("http://www.wstf.org/sc007", "EarlyAborted");
+    private final static QName _Commit_QNAME = new QName("http://www.wstf.org/sc007", "Commit");
+    private final static QName _Rollback_QNAME = new QName("http://www.wstf.org/sc007", "Rollback");
+    private final static QName _CompletionCommit_QNAME = new QName("http://www.wstf.org/sc007", "CompletionCommit");
+    private final static QName _RetryCommit_QNAME = new QName("http://www.wstf.org/sc007", "RetryCommit");
+    private final static QName _RetryPreparedCommit_QNAME = new QName("http://www.wstf.org/sc007", "RetryPreparedCommit");
+    private final static QName _RetryPreparedAbort_QNAME = new QName("http://www.wstf.org/sc007", "RetryPreparedAbort");
+    private final static QName _LostCommitted_QNAME = new QName("http://www.wstf.org/sc007", "LostCommitted");
+    private final static QName _CompletionRollback_QNAME = new QName("http://www.wstf.org/sc007", "CompletionRollback");
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.jboss.transaction.wstf.webservices.sc007.generated
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link TestMessageType }
+     * 
+     */
+    public TestMessageType createTestMessageType() {
+        return new TestMessageType();
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://www.wstf.org/sc007", name = "Response")
+    public JAXBElement<TestMessageType> createResponse(TestMessageType value) {
+        return new JAXBElement<TestMessageType>(_Response_QNAME, TestMessageType.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://www.wstf.org/sc007", name = "Readonly")
+    public JAXBElement<TestMessageType> createReadonly(TestMessageType value) {
+        return new JAXBElement<TestMessageType>(_Readonly_QNAME, TestMessageType.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://www.wstf.org/sc007", name = "VolatileAndDurable")
+    public JAXBElement<TestMessageType> createVolatileAndDurable(TestMessageType value) {
+        return new JAXBElement<TestMessageType>(_VolatileAndDurable_QNAME, TestMessageType.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://www.wstf.org/sc007", name = "ReplayCommit")
+    public JAXBElement<TestMessageType> createReplayCommit(TestMessageType value) {
+        return new JAXBElement<TestMessageType>(_ReplayCommit_QNAME, TestMessageType.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://www.wstf.org/sc007", name = "EarlyReadonly")
+    public JAXBElement<TestMessageType> createEarlyReadonly(TestMessageType value) {
+        return new JAXBElement<TestMessageType>(_EarlyReadonly_QNAME, TestMessageType.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://www.wstf.org/sc007", name = "PreparedAfterTimeout")
+    public JAXBElement<TestMessageType> createPreparedAfterTimeout(TestMessageType value) {
+        return new JAXBElement<TestMessageType>(_PreparedAfterTimeout_QNAME, TestMessageType.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://www.wstf.org/sc007", name = "Phase2Rollback")
+    public JAXBElement<TestMessageType> createPhase2Rollback(TestMessageType value) {
+        return new JAXBElement<TestMessageType>(_Phase2Rollback_QNAME, TestMessageType.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://www.wstf.org/sc007", name = "EarlyAborted")
+    public JAXBElement<TestMessageType> createEarlyAborted(TestMessageType value) {
+        return new JAXBElement<TestMessageType>(_EarlyAborted_QNAME, TestMessageType.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://www.wstf.org/sc007", name = "Commit")
+    public JAXBElement<TestMessageType> createCommit(TestMessageType value) {
+        return new JAXBElement<TestMessageType>(_Commit_QNAME, TestMessageType.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://www.wstf.org/sc007", name = "Rollback")
+    public JAXBElement<TestMessageType> createRollback(TestMessageType value) {
+        return new JAXBElement<TestMessageType>(_Rollback_QNAME, TestMessageType.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://www.wstf.org/sc007", name = "CompletionCommit")
+    public JAXBElement<String> createCompletionCommit(String value) {
+        return new JAXBElement<String>(_CompletionCommit_QNAME, String.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://www.wstf.org/sc007", name = "RetryCommit")
+    public JAXBElement<TestMessageType> createRetryCommit(TestMessageType value) {
+        return new JAXBElement<TestMessageType>(_RetryCommit_QNAME, TestMessageType.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://www.wstf.org/sc007", name = "RetryPreparedCommit")
+    public JAXBElement<TestMessageType> createRetryPreparedCommit(TestMessageType value) {
+        return new JAXBElement<TestMessageType>(_RetryPreparedCommit_QNAME, TestMessageType.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://www.wstf.org/sc007", name = "RetryPreparedAbort")
+    public JAXBElement<TestMessageType> createRetryPreparedAbort(TestMessageType value) {
+        return new JAXBElement<TestMessageType>(_RetryPreparedAbort_QNAME, TestMessageType.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://www.wstf.org/sc007", name = "LostCommitted")
+    public JAXBElement<TestMessageType> createLostCommitted(TestMessageType value) {
+        return new JAXBElement<TestMessageType>(_LostCommitted_QNAME, TestMessageType.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://www.wstf.org/sc007", name = "CompletionRollback")
+    public JAXBElement<String> createCompletionRollback(String value) {
+        return new JAXBElement<String>(_CompletionRollback_QNAME, String.class, null, value);
+    }
+
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/generated/ParticipantPortType.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/generated/ParticipantPortType.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/generated/ParticipantPortType.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,148 @@
+
+package com.jboss.transaction.wstf.webservices.sc007.generated;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.RequestWrapper;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.2-hudson-182-RC1
+ * Generated source version: 2.0
+ * 
+ */
+ at WebService(name = "ParticipantPortType", targetNamespace = "http://www.wstf.org/sc007")
+public interface ParticipantPortType {
+
+
+    /**
+     * 
+     * @param parameters
+     */
+    @WebMethod(operationName = "CompletionCommit", action = "http://www.wstf.org/docs/scenarios/sc007/CompletionCommit")
+    @Oneway
+    @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+    public void completionCommit(
+        @WebParam(name = "CompletionCommit", targetNamespace = "http://www.wstf.org/sc007", partName = "parameters")
+        String parameters);
+
+    /**
+     * 
+     * @param parameters
+     */
+    @WebMethod(operationName = "CompletionRollback", action = "http://www.wstf.org/docs/scenarios/sc007/CompletionRollback")
+    @Oneway
+    @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+    public void completionRollback(
+        @WebParam(name = "CompletionRollback", targetNamespace = "http://www.wstf.org/sc007", partName = "parameters")
+        String parameters);
+
+    /**
+     * 
+     */
+    @WebMethod(operationName = "Commit", action = "http://www.wstf.org/docs/scenarios/sc007/Commit")
+    @Oneway
+    @RequestWrapper(localName = "Commit", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.wstf.webservices.sc007.generated.TestMessageType")
+    public void commit();
+
+    /**
+     * 
+     */
+    @WebMethod(operationName = "Rollback", action = "http://www.wstf.org/docs/scenarios/sc007/Rollback")
+    @Oneway
+    @RequestWrapper(localName = "Rollback", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.wstf.webservices.sc007.generated.TestMessageType")
+    public void rollback();
+
+    /**
+     * 
+     */
+    @WebMethod(operationName = "Phase2Rollback", action = "http://www.wstf.org/docs/scenarios/sc007/Phase2Rollback")
+    @Oneway
+    @RequestWrapper(localName = "Phase2Rollback", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.wstf.webservices.sc007.generated.TestMessageType")
+    public void phase2Rollback();
+
+    /**
+     * 
+     */
+    @WebMethod(operationName = "Readonly", action = "http://www.wstf.org/docs/scenarios/sc007/Readonly")
+    @Oneway
+    @RequestWrapper(localName = "Readonly", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.wstf.webservices.sc007.generated.TestMessageType")
+    public void readonly();
+
+    /**
+     * 
+     */
+    @WebMethod(operationName = "VolatileAndDurable", action = "http://www.wstf.org/docs/scenarios/sc007/VolatileAndDurable")
+    @Oneway
+    @RequestWrapper(localName = "VolatileAndDurable", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.wstf.webservices.sc007.generated.TestMessageType")
+    public void volatileAndDurable();
+
+    /**
+     * 
+     */
+    @WebMethod(operationName = "EarlyReadonly", action = "http://www.wstf.org/docs/scenarios/sc007/EarlyReadonly")
+    @Oneway
+    @RequestWrapper(localName = "EarlyReadonly", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.wstf.webservices.sc007.generated.TestMessageType")
+    public void earlyReadonly();
+
+    /**
+     * 
+     */
+    @WebMethod(operationName = "EarlyAborted", action = "http://www.wstf.org/docs/scenarios/sc007/EarlyAborted")
+    @Oneway
+    @RequestWrapper(localName = "EarlyAborted", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.wstf.webservices.sc007.generated.TestMessageType")
+    public void earlyAborted();
+
+    /**
+     * 
+     */
+    @WebMethod(operationName = "ReplayCommit", action = "http://www.wstf.org/docs/scenarios/sc007/ReplayCommit")
+    @Oneway
+    @RequestWrapper(localName = "ReplayCommit", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.wstf.webservices.sc007.generated.TestMessageType")
+    public void replayCommit();
+
+    /**
+     * 
+     */
+    @WebMethod(operationName = "RetryPreparedCommit", action = "http://www.wstf.org/docs/scenarios/sc007/RetryPreparedCommit")
+    @Oneway
+    @RequestWrapper(localName = "RetryPreparedCommit", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.wstf.webservices.sc007.generated.TestMessageType")
+    public void retryPreparedCommit();
+
+    /**
+     * 
+     */
+    @WebMethod(operationName = "RetryPreparedAbort", action = "http://www.wstf.org/docs/scenarios/sc007/RetryPreparedAbort")
+    @Oneway
+    @RequestWrapper(localName = "RetryPreparedAbort", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.wstf.webservices.sc007.generated.TestMessageType")
+    public void retryPreparedAbort();
+
+    /**
+     * 
+     */
+    @WebMethod(operationName = "RetryCommit", action = "http://www.wstf.org/docs/scenarios/sc007/RetryCommit")
+    @Oneway
+    @RequestWrapper(localName = "RetryCommit", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.wstf.webservices.sc007.generated.TestMessageType")
+    public void retryCommit();
+
+    /**
+     * 
+     */
+    @WebMethod(operationName = "PreparedAfterTimeout", action = "http://www.wstf.org/docs/scenarios/sc007/PreparedAfterTimeout")
+    @Oneway
+    @RequestWrapper(localName = "PreparedAfterTimeout", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.wstf.webservices.sc007.generated.TestMessageType")
+    public void preparedAfterTimeout();
+
+    /**
+     * 
+     */
+    @WebMethod(operationName = "LostCommitted", action = "http://www.wstf.org/docs/scenarios/sc007/LostCommitted")
+    @Oneway
+    @RequestWrapper(localName = "LostCommitted", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.wstf.webservices.sc007.generated.TestMessageType")
+    public void lostCommitted();
+
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/generated/Sc007Service.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/generated/Sc007Service.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/generated/Sc007Service.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,68 @@
+
+package com.jboss.transaction.wstf.webservices.sc007.generated;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.logging.Logger;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.2-hudson-182-RC1
+ * Generated source version: 2.0
+ * 
+ */
+ at WebServiceClient(name = "sc007Service", targetNamespace = "http://www.wstf.org/sc007", wsdlLocation = "wsdl/sc007.wsdl")
+public class Sc007Service
+    extends Service
+{
+
+    private final static URL SC007SERVICE_WSDL_LOCATION;
+    private final static Logger logger = Logger.getLogger(com.jboss.transaction.wstf.webservices.sc007.generated.Sc007Service.class.getName());
+
+    static {
+        URL url = null;
+        try {
+            URL baseUrl;
+            baseUrl = com.jboss.transaction.wstf.webservices.sc007.generated.Sc007Service.class.getResource(".");
+            url = new URL(baseUrl, "wsdl/sc007.wsdl");
+        } catch (MalformedURLException e) {
+            logger.warning("Failed to create URL for the wsdl Location: 'wsdl/sc007.wsdl', retrying as a local file");
+            logger.warning(e.getMessage());
+        }
+        SC007SERVICE_WSDL_LOCATION = url;
+    }
+
+    public Sc007Service(URL wsdlLocation, QName serviceName) {
+        super(wsdlLocation, serviceName);
+    }
+
+    public Sc007Service() {
+        super(SC007SERVICE_WSDL_LOCATION, new QName("http://www.wstf.org/sc007", "sc007Service"));
+    }
+
+    /**
+     * 
+     * @return
+     *     returns InitiatorPortType
+     */
+    @WebEndpoint(name = "sc007InitiatorPort")
+    public InitiatorPortType getSc007InitiatorPort() {
+        return super.getPort(new QName("http://www.wstf.org/sc007", "sc007InitiatorPort"), InitiatorPortType.class);
+    }
+
+    /**
+     * 
+     * @return
+     *     returns ParticipantPortType
+     */
+    @WebEndpoint(name = "sc007ParticipantPort")
+    public ParticipantPortType getSc007ParticipantPort() {
+        return super.getPort(new QName("http://www.wstf.org/sc007", "sc007ParticipantPort"), ParticipantPortType.class);
+    }
+
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/generated/TestMessageType.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/generated/TestMessageType.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/generated/TestMessageType.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,32 @@
+
+package com.jboss.transaction.wstf.webservices.sc007.generated;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for TestMessageType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="TestMessageType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "TestMessageType")
+public class TestMessageType {
+
+
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/generated/package-info.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/generated/package-info.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/generated/package-info.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,2 @@
+ at javax.xml.bind.annotation.XmlSchema(namespace = "http://www.wstf.org/sc007")
+package com.jboss.transaction.wstf.webservices.sc007.generated;

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/CommitDurable2PCParticipant.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/CommitDurable2PCParticipant.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/CommitDurable2PCParticipant.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,22 @@
+package com.jboss.transaction.wstf.webservices.sc007.participant;
+
+import com.arjuna.wst.Durable2PCParticipant;
+import com.arjuna.wst.Prepared;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.Vote;
+import com.arjuna.wst.WrongStateException;
+
+/**
+ * The commit durable 2PC participant
+ */
+public class CommitDurable2PCParticipant extends ParticipantAdapter implements Durable2PCParticipant
+{
+    /**
+     * Vote to prepare.
+     */
+    public Vote prepare()
+        throws WrongStateException, SystemException
+    {
+        return new Prepared() ;
+    }    
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/CommitFailureDurable2PCParticipant.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/CommitFailureDurable2PCParticipant.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/CommitFailureDurable2PCParticipant.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,37 @@
+package com.jboss.transaction.wstf.webservices.sc007.participant;
+
+import com.arjuna.wst.Durable2PCParticipant;
+import com.arjuna.wst.Prepared;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.Vote;
+import com.arjuna.wst.WrongStateException;
+
+/**
+ * The durable 2PC participant which fails the first call to commit.
+ */
+public class CommitFailureDurable2PCParticipant extends ParticipantAdapter implements Durable2PCParticipant
+{
+    /**
+     * The drop commit flag.
+     */
+    private boolean dropCommit ;
+    
+    /**
+     * Vote to prepare.
+     */
+    public Vote prepare()
+        throws WrongStateException, SystemException
+    {
+        return new Prepared() ;
+    }
+    
+    public void commit()
+        throws WrongStateException, SystemException
+    {
+        if (!dropCommit)
+        {
+            dropCommit = true ;
+            throw new IllegalStateException("Forced failure of commit") ;
+        }
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/CommitFailureRecoveryDurable2PCParticipant.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/CommitFailureRecoveryDurable2PCParticipant.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/CommitFailureRecoveryDurable2PCParticipant.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,69 @@
+package com.jboss.transaction.wstf.webservices.sc007.participant;
+
+import java.util.TimerTask;
+
+import com.arjuna.webservices.util.TransportTimer;
+import com.arjuna.wst.Durable2PCParticipant;
+import com.arjuna.wst.Prepared;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.Vote;
+import com.arjuna.wst.WrongStateException;
+import com.arjuna.wst11.messaging.engines.ParticipantEngine;
+
+/**
+ * The durable 2PC participant which fails the first call to commit and recovers.
+ */
+public class CommitFailureRecoveryDurable2PCParticipant extends ParticipantAdapter implements Durable2PCParticipant
+{
+    /**
+     * The participant engine.
+     */
+    private ParticipantEngine engine ;
+    /**
+     * The set recovery flag.
+     */
+    private boolean setRecovery ;
+    /**
+     * The recovering flag.
+     */
+    private boolean recovering ;
+    
+    /**
+     * Set the participant engine.
+     * @param engine The participant engine.
+     */
+    public void setEngine(final ParticipantEngine engine)
+    {
+        this.engine = engine ;
+    }
+    
+    /**
+     * Vote to prepare.
+     */
+    public Vote prepare()
+        throws WrongStateException, SystemException
+    {
+        return new Prepared() ;
+    }
+    
+    public void commit()
+        throws WrongStateException, SystemException
+    {
+        if (!setRecovery)
+        {
+            setRecovery = true ;
+            final TimerTask timerTask = new TimerTask() {
+                public void run() {
+                    recovering = true ;
+                    engine.recovery() ;
+                }
+            } ;
+            TransportTimer.getTimer().schedule(timerTask, 2000) ;
+        }
+        
+        if (!recovering)
+        {
+            throw new IllegalStateException("Forced failure of commit") ;
+        }
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/CommitVolatile2PCParticipant.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/CommitVolatile2PCParticipant.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/CommitVolatile2PCParticipant.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,22 @@
+package com.jboss.transaction.wstf.webservices.sc007.participant;
+
+import com.arjuna.wst.Prepared;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.Volatile2PCParticipant;
+import com.arjuna.wst.Vote;
+import com.arjuna.wst.WrongStateException;
+
+/**
+ * The commit volatile 2PC participant
+ */
+public class CommitVolatile2PCParticipant extends ParticipantAdapter implements Volatile2PCParticipant
+{
+    /**
+     * Vote to prepare.
+     */
+    public Vote prepare()
+        throws WrongStateException, SystemException
+    {
+        return new Prepared() ;
+    }    
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/ParticipantAdapter.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/ParticipantAdapter.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/ParticipantAdapter.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,44 @@
+package com.jboss.transaction.wstf.webservices.sc007.participant;
+
+import com.arjuna.wst.Participant;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.WrongStateException;
+
+/**
+ * The base participant adapter.
+ */
+public abstract class ParticipantAdapter implements Participant
+{
+    /**
+     * Commit the participant.
+     */
+    public void commit()
+        throws WrongStateException, SystemException
+    {
+    }
+
+    /**
+     * Rollback the participant.
+     */
+    public void rollback()
+        throws WrongStateException, SystemException
+    {
+    }
+    
+    /**
+     * Handle an error on the participant.
+     */
+    public void error()
+        throws SystemException
+    {
+    }
+
+    /**
+     * Handle an unknown on the participant.
+     */
+    public void unknown()
+        throws SystemException
+    {
+    }
+
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/ReadonlyDurable2PCParticipant.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/ReadonlyDurable2PCParticipant.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/ReadonlyDurable2PCParticipant.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,22 @@
+package com.jboss.transaction.wstf.webservices.sc007.participant;
+
+import com.arjuna.wst.Durable2PCParticipant;
+import com.arjuna.wst.ReadOnly;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.Vote;
+import com.arjuna.wst.WrongStateException;
+
+/**
+ * The readonly durable 2PC participant
+ */
+public class ReadonlyDurable2PCParticipant extends ParticipantAdapter implements Durable2PCParticipant
+{
+    /**
+     * Vote readonly.
+     */
+    public Vote prepare()
+        throws WrongStateException, SystemException
+    {
+        return new ReadOnly() ;
+    }    
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/RollbackDurable2PCParticipant.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/RollbackDurable2PCParticipant.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/RollbackDurable2PCParticipant.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,22 @@
+package com.jboss.transaction.wstf.webservices.sc007.participant;
+
+import com.arjuna.wst.Aborted;
+import com.arjuna.wst.Durable2PCParticipant;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.Vote;
+import com.arjuna.wst.WrongStateException;
+
+/**
+ * The rollback durable 2PC participant
+ */
+public class RollbackDurable2PCParticipant extends ParticipantAdapter implements Durable2PCParticipant
+{
+    /**
+     * Vote to abort.
+     */
+    public Vote prepare()
+        throws WrongStateException, SystemException
+    {
+        return new Aborted() ;
+    }    
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/VolatileAndDurableDurable2PCParticipant.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/VolatileAndDurableDurable2PCParticipant.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/VolatileAndDurableDurable2PCParticipant.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,22 @@
+package com.jboss.transaction.wstf.webservices.sc007.participant;
+
+import com.arjuna.wst.Durable2PCParticipant;
+import com.arjuna.wst.Prepared;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.Vote;
+import com.arjuna.wst.WrongStateException;
+
+/**
+ * The VolatileAndDurable durable 2PC participant
+ */
+public class VolatileAndDurableDurable2PCParticipant extends ParticipantAdapter implements Durable2PCParticipant
+{
+    /**
+     * Vote to prepare.
+     */
+    public Vote prepare()
+        throws WrongStateException, SystemException
+    {
+        return new Prepared() ;
+    }    
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/VolatileAndDurableVolatile2PCParticipant.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/VolatileAndDurableVolatile2PCParticipant.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/participant/VolatileAndDurableVolatile2PCParticipant.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,47 @@
+package com.jboss.transaction.wstf.webservices.sc007.participant;
+
+import com.arjuna.ats.arjuna.common.Uid;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import com.arjuna.wst.ReadOnly;
+import com.arjuna.wst.SystemException;
+import com.arjuna.wst.Volatile2PCParticipant;
+import com.arjuna.wst.Vote;
+import com.arjuna.wst.WrongStateException;
+import com.jboss.transaction.wstf.webservices.sc007.InteropUtil;
+
+/**
+ * The VolatileAndDurable volatile 2PC participant
+ */
+public class VolatileAndDurableVolatile2PCParticipant extends ParticipantAdapter implements Volatile2PCParticipant
+{
+    /**
+     * The current coordination context.
+     */
+    private final CoordinationContextType coordinationContext ;
+    
+    /**
+     * Construct the participant.
+     * @param coordinationContext The coordination context.
+     */
+    public VolatileAndDurableVolatile2PCParticipant(final CoordinationContextType coordinationContext)
+    {
+        this.coordinationContext = coordinationContext ;
+    }
+    
+    /**
+     * Vote to prepare.
+     */
+    public Vote prepare()
+        throws WrongStateException, SystemException
+    {
+        try
+        {
+            InteropUtil.registerDurable2PC(coordinationContext, new VolatileAndDurableDurable2PCParticipant(), new Uid().toString()) ;
+        }
+        catch (final Throwable th)
+        {
+            throw new SystemException(th.getMessage()) ;
+        }
+        return new ReadOnly() ;
+    }    
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/processors/InitiatorCallback.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/processors/InitiatorCallback.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/processors/InitiatorCallback.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.jboss.transaction.wstf.webservices.sc007.processors;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.base.processors.Callback;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+/**
+ * The callback for the initiator client.
+ * @author kevin
+ */
+public abstract class InitiatorCallback extends Callback
+{
+    /**
+     * A response.
+     * @param addressingProperties The current addressing context.
+     */
+    public abstract void response(final AddressingProperties addressingProperties) ;
+
+    /**
+     * A SOAP fault response.
+     * @param soapFault The SOAP fault response.
+     * @param addressingProperties The current addressing context.
+     */
+    public abstract void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties) ;
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/processors/InitiatorProcessor.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/processors/InitiatorProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/processors/InitiatorProcessor.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,85 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.jboss.transaction.wstf.webservices.sc007.processors;
+
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.base.processors.Callback;
+import com.arjuna.webservices11.wsaddr.processor.BaseWSAddrResponseProcessor;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+/**
+ * The Initiator processor.
+ * @author kevin
+ */
+public class InitiatorProcessor extends BaseWSAddrResponseProcessor
+{
+    /**
+     * The initiator singleton.
+     */
+    private static final InitiatorProcessor INITIATOR = new InitiatorProcessor() ;
+    
+    /**
+     * Get the initiator singleton.
+     * @return The singleton.
+     */
+    public static InitiatorProcessor getInitiator()
+    {
+        return INITIATOR ;
+    }
+
+    /**
+     * Handle a response response.
+     * @param addressingProperties The current addressing context.
+     */
+    public void handleResponse(final AddressingProperties addressingProperties)
+    {
+        handleCallbacks(new CallbackExecutorAdapter() {
+            public void execute(final Callback callback) {
+                ((InitiatorCallback)callback).response(addressingProperties) ;
+            }
+        }, getIDs(addressingProperties)) ;
+    }
+
+    /**
+     * Register a SOAP fault response.
+     * @param soapFault The SOAP fault response.
+     * @param addressingProperties The current addressing context.
+     */
+    public void handleSoapFault(final SoapFault soapFault, final AddressingProperties addressingProperties)
+    {
+        handleCallbacks(new CallbackExecutorAdapter() {
+            public void execute(final Callback callback) {
+                ((InitiatorCallback)callback).soapFault(soapFault, addressingProperties) ;
+            }
+        }, getIDs(addressingProperties)) ;
+    }
+
+    /**
+     * Register a callback for the specific message id.
+     * @param messageID The message ID.
+     * @param callback The callback for the response.
+     */
+    public void registerCallback(final String messageID, final InitiatorCallback callback)
+    {
+        register(messageID, callback) ;
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/processors/ParticipantProcessor.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/processors/ParticipantProcessor.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/processors/ParticipantProcessor.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,358 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.  All rights reserved. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.jboss.transaction.wstf.webservices.sc007.processors;
+
+import com.arjuna.ats.arjuna.common.Uid;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import com.arjuna.wst.CompletionCoordinatorParticipant;
+import com.arjuna.wst11.messaging.engines.ParticipantEngine;
+import com.arjuna.webservices11.SoapFault11;
+import com.jboss.transaction.wstf.webservices.sc007.InteropUtil;
+import com.jboss.transaction.wstf.webservices.sc007.participant.CommitDurable2PCParticipant;
+import com.jboss.transaction.wstf.webservices.sc007.participant.CommitFailureDurable2PCParticipant;
+import com.jboss.transaction.wstf.webservices.sc007.participant.CommitFailureRecoveryDurable2PCParticipant;
+import com.jboss.transaction.wstf.webservices.sc007.participant.CommitVolatile2PCParticipant;
+import com.jboss.transaction.wstf.webservices.sc007.participant.ReadonlyDurable2PCParticipant;
+import com.jboss.transaction.wstf.webservices.sc007.participant.RollbackDurable2PCParticipant;
+import com.jboss.transaction.wstf.webservices.sc007.participant.VolatileAndDurableVolatile2PCParticipant;
+
+import javax.xml.ws.addressing.AddressingProperties;
+
+/**
+ * The Participant processor.
+ * @author kevin
+ */
+public class ParticipantProcessor
+{
+    /**
+     * The participant.
+     */
+    private static ParticipantProcessor PARTICIPANT = new ParticipantProcessor() ;
+    
+    /**
+     * Get the participant.
+     * @return The participant.
+     */
+    public static ParticipantProcessor getParticipant()
+    {
+        return PARTICIPANT ;
+    }
+    
+    /**
+     * Execute the CompletionCommit
+     * @param coordinatorURI The address of the coordinator to employ
+     * @param addressingProperties The current addressing context.
+     * @throws SoapFault11 for errors during processing
+     */
+    public void completionCommit(final String coordinatorURI, final AddressingProperties addressingProperties)
+        throws SoapFault11
+    {
+        try
+        {
+            final CoordinationContextType context = InteropUtil.createCoordinationContext(coordinatorURI) ;
+            final CompletionCoordinatorParticipant participant = InteropUtil.registerCompletion(context, context.getIdentifier().getValue()) ;
+            participant.commit() ;
+        }
+        catch (final Throwable th)
+        {
+            throw new SoapFault11(th) ;
+        }
+    }
+    
+    /**
+     * Execute the CompletionRollback
+     * @param coordinatorURI The address of the coordinator to employ.
+     * @param addressingProperties The current addressing context.
+     * @return The response.
+     * @throws SoapFault11 for errors during processing
+     */
+    public void completionRollback(final String coordinatorURI, final AddressingProperties addressingProperties)
+        throws SoapFault11
+    {
+        try
+        {
+            final CoordinationContextType context = InteropUtil.createCoordinationContext(coordinatorURI) ;
+            final CompletionCoordinatorParticipant participant = InteropUtil.registerCompletion(context, context.getIdentifier().getValue()) ;
+            participant.rollback() ;
+        }
+        catch (final Throwable th)
+        {
+            throw new SoapFault11(th) ;
+        }
+    }
+    
+    /**
+     * Execute the Commit
+     * @param addressingProperties The current addressing context.
+     * @return The response.
+     * @throws SoapFault11 for errors during processing
+     */
+    public void commit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault11
+    {
+        try
+        {
+            InteropUtil.registerDurable2PC(coordinationContext, new CommitDurable2PCParticipant(), new Uid().toString()) ;
+        }
+        catch (final Throwable th)
+        {
+            throw new SoapFault11(th) ;
+        }
+    }
+    
+    /**
+     * Execute the Rollback
+     * @param addressingProperties The current addressing context.
+     * @return The response.
+     * @throws SoapFault11 for errors during processing
+     */
+    public void rollback(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault11
+    {
+        try
+        {
+            InteropUtil.registerDurable2PC(coordinationContext, new RollbackDurable2PCParticipant(), new Uid().toString()) ;
+        }
+        catch (final Throwable th)
+        {
+            throw new SoapFault11(th) ;
+        }
+    }
+    
+    /**
+     * Execute the Phase2Rollback
+     * @param addressingProperties The current addressing context.
+     * @return The response.
+     * @throws SoapFault11 for errors during processing
+     */
+    public void phase2Rollback(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault11
+    {
+        try
+        {
+            InteropUtil.registerVolatile2PC(coordinationContext, new CommitVolatile2PCParticipant(), new Uid().toString()) ;
+            InteropUtil.registerDurable2PC(coordinationContext, new RollbackDurable2PCParticipant(), new Uid().toString()) ;
+        }
+        catch (final Throwable th)
+        {
+            throw new SoapFault11(th) ;
+        }
+    }
+    
+    /**
+     * Execute the Readonly
+     * @param addressingProperties The current addressing context.
+     * @return The response.
+     * @throws SoapFault11 for errors during processing
+     */
+    public void readonly(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault11
+    {
+        try
+        {
+            InteropUtil.registerDurable2PC(coordinationContext, new ReadonlyDurable2PCParticipant(), new Uid().toString()) ;
+            InteropUtil.registerDurable2PC(coordinationContext, new CommitDurable2PCParticipant(), new Uid().toString()) ;
+        }
+        catch (final Throwable th)
+        {
+            throw new SoapFault11(th) ;
+        }
+    }
+    
+    /**
+     * Execute the VolatileAndDurable
+     * @param addressingProperties The current addressing context.
+     * @return The response.
+     * @throws SoapFault11 for errors during processing
+     */
+    public void volatileAndDurable(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault11
+    {
+        try
+        {
+            InteropUtil.registerVolatile2PC(coordinationContext, new VolatileAndDurableVolatile2PCParticipant(coordinationContext), new Uid().toString()) ;
+        }
+        catch (final Throwable th)
+        {
+            throw new SoapFault11(th) ;
+        }
+    }
+    
+    /**
+     * Execute the EarlyReadonly
+     * @param addressingProperties The current addressing context.
+     * @return The response.
+     * @throws SoapFault11 for errors during processing
+     */
+    public void earlyReadonly(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault11
+    {
+        try
+        {
+            final ParticipantEngine engine = InteropUtil.registerVolatile2PC(coordinationContext, new CommitVolatile2PCParticipant(), new Uid().toString()) ;
+            InteropUtil.registerDurable2PC(coordinationContext, new CommitDurable2PCParticipant(), new Uid().toString()) ;
+            engine.earlyReadonly() ;
+        }
+        catch (final Throwable th)
+        {
+            throw new SoapFault11(th) ;
+        }
+    }
+    
+    /**
+     * Execute the EarlyAborted
+     * @param addressingProperties The current addressing context.
+     * @return The response.
+     * @throws SoapFault11 for errors during processing
+     */
+    public void earlyAborted(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault11
+    {
+        try
+        {
+            final ParticipantEngine engine = InteropUtil.registerVolatile2PC(coordinationContext, new CommitVolatile2PCParticipant(), new Uid().toString()) ;
+            InteropUtil.registerDurable2PC(coordinationContext, new CommitDurable2PCParticipant(), new Uid().toString()) ;
+            engine.earlyRollback() ;
+        }
+        catch (final Throwable th)
+        {
+            throw new SoapFault11(th) ;
+        }
+    }
+    
+    /**
+     * Execute the ReplayCommit
+     * @param addressingProperties The current addressing context.
+     * @return The response.
+     * @throws SoapFault11 for errors during processing
+     */
+    public void replayCommit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault11
+    {
+        try
+        {
+            final CommitFailureRecoveryDurable2PCParticipant participant = new CommitFailureRecoveryDurable2PCParticipant() ;
+            final ParticipantEngine engine = InteropUtil.registerDurable2PC(coordinationContext, participant, new Uid().toString()) ;
+            participant.setEngine(engine) ;
+        }
+        catch (final Throwable th)
+        {
+            throw new SoapFault11(th) ;
+        }
+    }
+    
+    /**
+     * Execute the RetryPreparedCommit
+     * @param addressingProperties The current addressing context.
+     * @return The response.
+     * @throws SoapFault11 for errors during processing
+     */
+    public void retryPreparedCommit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault11
+    {
+        try
+        {
+            InteropUtil.registerDurable2PC(coordinationContext, new CommitDurable2PCParticipant(), new Uid().toString()) ;
+            InteropUtil.registerDurable2PC(coordinationContext, new CommitDurable2PCParticipant(), new Uid().toString()) ;
+        }
+        catch (final Throwable th)
+        {
+            throw new SoapFault11(th) ;
+        }
+    }
+    
+    /**
+     * Execute the RetryPreparedAbort
+     * @param addressingProperties The current addressing context.
+     * @return The response.
+     * @throws SoapFault11 for errors during processing
+     */
+    public void retryPreparedAbort(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault11
+    {
+        try
+        {
+            InteropUtil.registerDurable2PC(coordinationContext, new CommitDurable2PCParticipant(), new Uid().toString()) ;
+        }
+        catch (final Throwable th)
+        {
+            throw new SoapFault11(th) ;
+        }
+    }
+    
+    /**
+     * Execute the RetryCommit
+     * @param addressingProperties The current addressing context.
+     * @return The response.
+     * @throws SoapFault11 for errors during processing
+     */
+    public void retryCommit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault11
+    {
+        try
+        {
+            InteropUtil.registerDurable2PC(coordinationContext, new CommitFailureDurable2PCParticipant(), new Uid().toString()) ;
+        }
+        catch (final Throwable th)
+        {
+            throw new SoapFault11(th) ;
+        }
+    }
+    
+    /**
+     * Execute the PreparedAfterTimeout
+     * @param addressingProperties The current addressing context.
+     * @return The response.
+     * @throws SoapFault11 for errors during processing
+     */
+    public void preparedAfterTimeout(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault11
+    {
+        try
+        {
+            InteropUtil.registerVolatile2PC(coordinationContext, new CommitVolatile2PCParticipant(), new Uid().toString()) ;
+            InteropUtil.registerDurable2PC(coordinationContext, new CommitDurable2PCParticipant(), new Uid().toString()) ;
+        }
+        catch (final Throwable th)
+        {
+            throw new SoapFault11(th) ;
+        }
+    }
+    
+    /**
+     * Execute the LostCommitted
+     * @param addressingProperties The current addressing context.
+     * @return The response.
+     * @throws SoapFault11 for errors during processing
+     */
+    public void lostCommitted(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
+        throws SoapFault11
+    {
+        try
+        {
+            InteropUtil.registerDurable2PC(coordinationContext, new CommitFailureDurable2PCParticipant(), new Uid().toString()) ;
+        }
+        catch (final Throwable th)
+        {
+            throw new SoapFault11(th) ;
+        }
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/sei/InitiatorPortTypeImpl.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/sei/InitiatorPortTypeImpl.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/sei/InitiatorPortTypeImpl.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,72 @@
+package com.jboss.transaction.wstf.webservices.sc007.sei;
+
+import com.jboss.transaction.wstf.webservices.sc007.processors.InitiatorProcessor;
+import com.arjuna.webservices11.SoapFault11;
+
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.JAXWSAConstants;
+import javax.xml.ws.handler.MessageContext;
+import javax.annotation.Resource;
+
+/**
+ * Implementor class for OASIS WS-Interop 1.1 Initiator Service
+ */
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.WebParam;
+import javax.jws.*;
+import javax.jws.soap.SOAPBinding;
+
+import org.jboss.jbossts.xts.soapfault.Fault;
+
+
+/**
+ * Implementation class for WSTX 1.1 AT Interop Test Initiator service
+ */
+ at WebService(name = "InitiatorPortType",
+        targetNamespace = "http://www.wstf.org/sc007",
+        wsdlLocation="/WEB-INF/wsdl/sc007.wsdl",
+        portName = "sc007InitiatorPort",
+        serviceName="Sc007Service")
+// @EndpointConfig(configName = "Standard WSAddressing Endpoint")
+ at HandlerChain(file="initiatorhandlers.xml")
+public class InitiatorPortTypeImpl {
+
+    /**
+     * injected resource providing access to WSA addressing properties
+     */
+    @Resource
+    private WebServiceContext webServiceCtx;
+
+    /**
+     *
+     */
+    @WebMethod(operationName = "Response", action = "http://www.wstf.org/docs/scenarios/sc007/Response")
+    @Oneway
+    @RequestWrapper(localName = "Response", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.txinterop.webservices.sc007.generated.TestMessageType")
+    public void response()
+    {
+        MessageContext ctx = webServiceCtx.getMessageContext();
+        AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+
+        InitiatorProcessor.getInitiator().handleResponse(inboundAddressProperties) ;
+    }
+
+    @WebMethod(operationName = "SoapFault", action = "http://www.wstf.org/docs/scenarios/sc007/SoapFault")
+    @Oneway
+    @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+    public void soapFault(
+            @WebParam(name = "Fault", targetNamespace = "http://schemas.xmlsoap.org/soap/envelope/", partName = "parameters")
+            Fault fault)
+    {
+        MessageContext ctx = webServiceCtx.getMessageContext();
+        AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+
+        SoapFault11 soapFaultInternal = SoapFault11.fromFault(fault);
+        InitiatorProcessor.getInitiator().handleSoapFault(soapFaultInternal, inboundAddressProperties) ;
+    }
+
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/sei/ParticipantPortTypeImpl.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/sei/ParticipantPortTypeImpl.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/sei/ParticipantPortTypeImpl.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,379 @@
+package com.jboss.transaction.wstf.webservices.sc007.sei;
+
+import com.jboss.transaction.wstf.webservices.sc007.processors.ParticipantProcessor;
+import com.jboss.transaction.wstf.webservices.sc007.client.InitiatorClient;
+import com.jboss.transaction.wstf.webservices.CoordinationContextManager;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.SoapFault11;
+import com.arjuna.wsc11.messaging.MessageId;
+
+import javax.jws.*;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.ProtocolException;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.JAXWSAConstants;
+import javax.xml.ws.handler.MessageContext;
+import javax.annotation.Resource;
+
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+
+import java.net.URI;
+
+
+/**
+ * Implementation class for WSTX 1.1 AT Interop Test Initiator service
+ */
+ at WebService(name = "ParticipantPortType",
+        targetNamespace = "http://www.wstf.org/sc007",
+        portName="sc007ParticipantPort",
+        wsdlLocation="/WEB-INF/wsdl/sc007.wsdl",
+        serviceName="Sc007Service")
+// @EndpointConfig(configName = "Standard WSAddressing Endpoint")
+ at HandlerChain(file="participanthandlers.xml")
+public class ParticipantPortTypeImpl {
+
+    /**
+     * injected resource providing access to WSA addressing properties
+     */
+    @Resource
+    private WebServiceContext webServiceCtx;
+
+    /**
+     *
+     * @param parameters
+     */
+    @WebMethod(operationName = "CompletionCommit", action = "http://www.wstf.org/docs/scenarios/sc007/CompletionCommit")
+    @Oneway
+    @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+    public void completionCommit(
+            @WebParam(name = "CompletionCommit", targetNamespace = "http://www.wstf.org/sc007", partName = "parameters")
+            String parameters)
+    {
+        MessageContext ctx = webServiceCtx.getMessageContext();
+        AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+        try {
+            ParticipantProcessor.getParticipant().completionCommit(parameters, inboundAddressProperties);
+        } catch (SoapFault11 sf) {
+            sendSoapFault(inboundAddressProperties, sf);
+            return;
+        }
+        sendResponse(inboundAddressProperties);
+    }
+
+    /**
+     *
+     * @param parameters
+     */
+    @WebMethod(operationName = "CompletionRollback", action = "http://www.wstf.org/docs/scenarios/sc007/CompletionRollback")
+    @Oneway
+    @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+    public void completionRollback(
+        @WebParam(name = "CompletionRollback", targetNamespace = "http://www.wstf.org/sc007", partName = "parameters")
+        String parameters)
+    {
+        MessageContext ctx = webServiceCtx.getMessageContext();
+        AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+        try {
+            ParticipantProcessor.getParticipant().completionRollback(parameters, inboundAddressProperties);
+        } catch (SoapFault11 sf) {
+            sendSoapFault(inboundAddressProperties, sf);
+            return;
+        }
+        sendResponse(inboundAddressProperties);
+    }
+
+    /**
+     *
+     */
+    @WebMethod(operationName = "Commit", action = "http://www.wstf.org/docs/scenarios/sc007/Commit")
+    @Oneway
+    @RequestWrapper(localName = "Commit", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.txinterop.webservices.sc007.generated.TestMessageType")
+    public void commit()
+    {
+        MessageContext ctx = webServiceCtx.getMessageContext();
+        AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+        CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+        try {
+            ParticipantProcessor.getParticipant().commit(coordinationContext, inboundAddressProperties);
+        } catch (SoapFault11 sf) {
+            sendSoapFault(inboundAddressProperties, sf);
+            return;
+        }
+        sendResponse(inboundAddressProperties);
+    }
+
+    /**
+     *
+     */
+    @WebMethod(operationName = "Rollback", action = "http://www.wstf.org/docs/scenarios/sc007/Rollback")
+    @Oneway
+    @RequestWrapper(localName = "Rollback", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.txinterop.webservices.sc007.generated.TestMessageType")
+    public void rollback()
+    {
+        MessageContext ctx = webServiceCtx.getMessageContext();
+        AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+        CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+        try {
+            ParticipantProcessor.getParticipant().rollback(coordinationContext, inboundAddressProperties);
+        } catch (SoapFault11 sf) {
+            sendSoapFault(inboundAddressProperties, sf);
+            return;
+        }
+        sendResponse(inboundAddressProperties);
+    }
+
+    /**
+     *
+     */
+    @WebMethod(operationName = "Phase2Rollback", action = "http://www.wstf.org/docs/scenarios/sc007/Phase2Rollback")
+    @Oneway
+    @RequestWrapper(localName = "Phase2Rollback", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.txinterop.webservices.sc007.generated.TestMessageType")
+    public void phase2Rollback()
+    {
+        MessageContext ctx = webServiceCtx.getMessageContext();
+        AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+        CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+        try {
+            ParticipantProcessor.getParticipant().phase2Rollback(coordinationContext, inboundAddressProperties);
+        } catch (SoapFault11 sf) {
+            sendSoapFault(inboundAddressProperties, sf);
+            return;
+        }
+        sendResponse(inboundAddressProperties);
+    }
+
+    /**
+     *
+     */
+    @WebMethod(operationName = "Readonly", action = "http://www.wstf.org/docs/scenarios/sc007/Readonly")
+    @Oneway
+    @RequestWrapper(localName = "Readonly", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.txinterop.webservices.sc007.generated.TestMessageType")
+    public void readonly()
+    {
+        MessageContext ctx = webServiceCtx.getMessageContext();
+        AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+        CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+        try {
+            ParticipantProcessor.getParticipant().readonly(coordinationContext, inboundAddressProperties);
+        } catch (SoapFault11 sf) {
+            sendSoapFault(inboundAddressProperties, sf);
+            return;
+        }
+        sendResponse(inboundAddressProperties);
+    }
+
+    /**
+     *
+     */
+    @WebMethod(operationName = "VolatileAndDurable", action = "http://www.wstf.org/docs/scenarios/sc007/VolatileAndDurable")
+    @Oneway
+    @RequestWrapper(localName = "VolatileAndDurable", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.txinterop.webservices.sc007.generated.TestMessageType")
+    public void volatileAndDurable()
+    {
+        MessageContext ctx = webServiceCtx.getMessageContext();
+        AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+        CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+        try {
+            ParticipantProcessor.getParticipant().volatileAndDurable(coordinationContext, inboundAddressProperties);
+        } catch (SoapFault11 sf) {
+            sendSoapFault(inboundAddressProperties, sf);
+            return;
+        }
+        sendResponse(inboundAddressProperties);
+    }
+
+    /**
+     *
+     */
+    @WebMethod(operationName = "EarlyReadonly", action = "http://www.wstf.org/docs/scenarios/sc007/EarlyReadonly")
+    @Oneway
+    @RequestWrapper(localName = "EarlyReadonly", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.txinterop.webservices.sc007.generated.TestMessageType")
+    public void earlyReadonly()
+    {
+        MessageContext ctx = webServiceCtx.getMessageContext();
+        AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+        CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+        try {
+            ParticipantProcessor.getParticipant().earlyReadonly(coordinationContext, inboundAddressProperties);
+        } catch (SoapFault11 sf) {
+            sendSoapFault(inboundAddressProperties, sf);
+            return;
+        }
+        sendResponse(inboundAddressProperties);
+    }
+
+    /**
+     *
+     */
+    @WebMethod(operationName = "EarlyAborted", action = "http://www.wstf.org/docs/scenarios/sc007/EarlyAborted")
+    @Oneway
+    @RequestWrapper(localName = "EarlyAborted", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.txinterop.webservices.sc007.generated.TestMessageType")
+    public void earlyAborted()
+    {
+        MessageContext ctx = webServiceCtx.getMessageContext();
+        AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+        CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+        try {
+            ParticipantProcessor.getParticipant().earlyAborted(coordinationContext, inboundAddressProperties);
+        } catch (SoapFault11 sf) {
+            sendSoapFault(inboundAddressProperties, sf);
+            return;
+        }
+        sendResponse(inboundAddressProperties);
+    }
+
+    /**
+     *
+     */
+    @WebMethod(operationName = "ReplayCommit", action = "http://www.wstf.org/docs/scenarios/sc007/ReplayCommit")
+    @Oneway
+    @RequestWrapper(localName = "ReplayCommit", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.txinterop.webservices.sc007.generated.TestMessageType")
+    public void replayCommit()
+    {
+        MessageContext ctx = webServiceCtx.getMessageContext();
+        AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+        CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+        try {
+            ParticipantProcessor.getParticipant().replayCommit(coordinationContext, inboundAddressProperties);
+        } catch (SoapFault11 sf) {
+            sendSoapFault(inboundAddressProperties, sf);
+            return;
+        }
+        sendResponse(inboundAddressProperties);
+    }
+
+    /**
+     *
+     */
+    @WebMethod(operationName = "RetryPreparedCommit", action = "http://www.wstf.org/docs/scenarios/sc007/RetryPreparedCommit")
+    @Oneway
+    @RequestWrapper(localName = "RetryPreparedCommit", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.txinterop.webservices.sc007.generated.TestMessageType")
+    public void retryPreparedCommit()
+    {
+        MessageContext ctx = webServiceCtx.getMessageContext();
+        AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+        CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+        try {
+            ParticipantProcessor.getParticipant().retryPreparedCommit(coordinationContext, inboundAddressProperties);
+        } catch (SoapFault11 sf) {
+            sendSoapFault(inboundAddressProperties, sf);
+            return;
+        }
+        sendResponse(inboundAddressProperties);
+    }
+
+    /**
+     *
+     */
+    @WebMethod(operationName = "RetryPreparedAbort", action = "http://www.wstf.org/docs/scenarios/sc007/RetryPreparedAbort")
+    @Oneway
+    @RequestWrapper(localName = "RetryPreparedAbort", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.txinterop.webservices.sc007.generated.TestMessageType")
+    public void retryPreparedAbort()
+    {
+        MessageContext ctx = webServiceCtx.getMessageContext();
+        AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+        CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+        try {
+            ParticipantProcessor.getParticipant().retryPreparedAbort(coordinationContext, inboundAddressProperties);
+        } catch (SoapFault11 sf) {
+            sendSoapFault(inboundAddressProperties, sf);
+            return;
+        }
+        sendResponse(inboundAddressProperties);
+    }
+
+    /**
+     *
+     */
+    @WebMethod(operationName = "RetryCommit", action = "http://www.wstf.org/docs/scenarios/sc007/RetryCommit")
+    @Oneway
+    @RequestWrapper(localName = "RetryCommit", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.txinterop.webservices.sc007.generated.TestMessageType")
+    public void retryCommit()
+    {
+        MessageContext ctx = webServiceCtx.getMessageContext();
+        AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+        CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+        try {
+            ParticipantProcessor.getParticipant().retryCommit(coordinationContext, inboundAddressProperties);
+        } catch (SoapFault11 sf) {
+            sendSoapFault(inboundAddressProperties, sf);
+            return;
+        }
+        sendResponse(inboundAddressProperties);
+    }
+
+    /**
+     *
+     */
+    @WebMethod(operationName = "PreparedAfterTimeout", action = "http://www.wstf.org/docs/scenarios/sc007/PreparedAfterTimeout")
+    @Oneway
+    @RequestWrapper(localName = "PreparedAfterTimeout", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.txinterop.webservices.sc007.generated.TestMessageType")
+    public void preparedAfterTimeout()
+    {
+        MessageContext ctx = webServiceCtx.getMessageContext();
+        AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+        CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+        try {
+            ParticipantProcessor.getParticipant().preparedAfterTimeout(coordinationContext, inboundAddressProperties);
+        } catch (SoapFault11 sf) {
+            sendSoapFault(inboundAddressProperties, sf);
+            return;
+        }
+        sendResponse(inboundAddressProperties);
+    }
+
+    /**
+     *
+     */
+    @WebMethod(operationName = "LostCommitted", action = "http://www.wstf.org/docs/scenarios/sc007/LostCommitted")
+    @Oneway
+    @RequestWrapper(localName = "LostCommitted", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.txinterop.webservices.sc007.generated.TestMessageType")
+    public void lostCommitted()
+    {
+        MessageContext ctx = webServiceCtx.getMessageContext();
+        AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+        CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+        try {
+            ParticipantProcessor.getParticipant().lostCommitted(coordinationContext, inboundAddressProperties);
+        } catch (SoapFault11 sf) {
+            sendSoapFault(inboundAddressProperties, sf);
+            return;
+        }
+        sendResponse(inboundAddressProperties);
+    }
+
+    /**
+     * send an acknowledgement notifying a successfuly processed request
+     *
+     * @param inboundAddressProperties identifes who to reply to and what message id the response should relate to
+     */
+    private void sendResponse(AddressingProperties inboundAddressProperties)
+    {
+        AddressingProperties outboundAddressProperties = AddressingHelper.createResponseContext(inboundAddressProperties, MessageId.getMessageId());
+
+        try {
+            InitiatorClient.getClient().sendResponse(outboundAddressProperties);
+        } catch (Throwable th) {
+            URI uri = outboundAddressProperties.getTo().getURI();
+            System.out.println("com.jboss.transaction.txinterop.webservices.sc007.sei.ParticipantPortTypeImpl_1: unable to send response to " + uri);
+            throw new ProtocolException(th);
+        }
+    }
+
+    /**
+     * send a soap fault notifying an unsuccessfuly processed request
+     *
+     * @param inboundAddressProperties identifes who to reply to and what message id the fault message should relate to
+     */
+    private void sendSoapFault(AddressingProperties inboundAddressProperties, SoapFault11 sf)
+    {
+        try {
+            InitiatorClient.getClient().sendSoapFault(inboundAddressProperties, sf);
+        } catch (Throwable th) {
+            System.out.println("com.jboss.transaction.txinterop.webservices.sc007.sei.ParticipantPortTypeImpl_2: unable to log soap fault " + sf);
+            throw new ProtocolException(th);
+        }
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/server/InitiatorInitialisation.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/server/InitiatorInitialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/server/InitiatorInitialisation.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,39 @@
+package com.jboss.transaction.wstf.webservices.sc007.server;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import javax.servlet.ServletContext;
+
+import com.arjuna.webservices11.ServiceRegistry;
+import com.jboss.transaction.wstf.webservices.sc007.InteropConstants;
+
+/**
+ * Initialise the interop initiator service.
+ * @author kevin
+ */
+public class InitiatorInitialisation implements ServletContextListener
+{
+    /**
+     * The context has been initialized.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextInitialized(final ServletContextEvent servletContextEvent)
+    {
+        ServletContext context = servletContextEvent.getServletContext();
+        String baseURI = context.getInitParameter("BaseURI");
+        final String uri = baseURI + "/InitiatorService";
+
+        final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+        serviceRegistry.registerServiceProvider(InteropConstants.SERVICE_INITIATOR, uri) ;
+    }
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+        final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+        serviceRegistry.removeServiceProvider(InteropConstants.SERVICE_INITIATOR) ;
+    }
+}

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/server/ParticipantInitialisation.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/server/ParticipantInitialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/webservices/sc007/server/ParticipantInitialisation.java	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,39 @@
+package com.jboss.transaction.wstf.webservices.sc007.server;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import javax.servlet.ServletContext;
+
+import com.arjuna.webservices11.ServiceRegistry;
+import com.jboss.transaction.wstf.webservices.sc007.InteropConstants;
+
+/**
+ * Initialise the interop initiator service.
+ * @author kevin
+ */
+public class ParticipantInitialisation implements ServletContextListener
+{
+    /**
+     * The context has been initialized.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextInitialized(final ServletContextEvent servletContextEvent)
+    {
+        ServletContext context = servletContextEvent.getServletContext();
+        String baseURI = context.getInitParameter("BaseURI");
+        final String uri = baseURI + "/ParticipantService";
+
+        final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+        serviceRegistry.registerServiceProvider(InteropConstants.SERVICE_PARTICIPANT, uri) ;
+    }
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+        final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+        serviceRegistry.removeServiceProvider(InteropConstants.SERVICE_PARTICIPANT) ;
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/web/details.jsp
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/web/details.jsp	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/web/details.jsp	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,90 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+    pageEncoding="UTF-8"%>
+<%@page import="com.jboss.transaction.wstf.test.TestConstants"%>
+<%@page import="java.util.Enumeration"%>
+<%@page import="junit.framework.TestResult"%>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<%@page import="junit.framework.TestFailure"%>
+<%@page import="junit.framework.TestCase"%>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>JBoss Transactions WS-TX Interop detail page</title>
+</head>
+<body>
+<h1>Results</h1>
+<%
+	final TestResult testResult = (TestResult)session.getAttribute(TestConstants.ATTRIBUTE_TEST_RESULT) ;
+	if (testResult == null)
+	{
+%>
+No JUnit test results generated.
+<%
+	}
+	else
+	{
+		final String type = request.getParameter("type") ;
+		
+		Enumeration detailEnum = null ;
+		if (type != null)
+		{
+		    if ("error".equals(type))
+		    {
+		        detailEnum = testResult.errors() ;
+		    }
+		    else if ("failure".equals(type))
+		    {
+		        detailEnum = testResult.failures() ;
+		    }
+		}
+		
+		Integer indexInt = null ;
+		if (detailEnum != null)
+		{
+			final String indexVal = request.getParameter("index") ;
+			try
+			{
+			    indexInt = Integer.valueOf(indexVal) ;
+			}
+			catch (final NumberFormatException nfe) {}
+		}
+		
+		TestFailure testFailure = null ;
+		if (indexInt != null)
+		{
+		    int index = indexInt.intValue() ;
+		    if (index > 0)
+		    {
+			    while(detailEnum.hasMoreElements())
+			    {
+		        		final Object current = detailEnum.nextElement() ;
+		        		if (--index == 0)
+		        		{
+		        		    testFailure = (TestFailure)current ;
+		        		    break ;
+		        		}
+			    }
+		    }
+		}
+		
+		if (testFailure == null)
+		{
+%>
+<p>Invalid request parameters</p>
+<%
+		}
+		else
+		{
+		    final TestCase failure = (TestCase)testFailure.failedTest() ;
+%>
+<p>Test: <%= failure.getName() %></p>
+<pre>
+<%= testFailure.trace() %>
+</pre>
+<%
+		}
+	}
+%>
+<p>Return to <a href="results.jsp">results page</a></p>
+</body>
+</html>
\ No newline at end of file

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/web/index.jsp
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/web/index.jsp	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/web/index.jsp	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,54 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+    pageEncoding="UTF-8"%>
+<%@page import="java.util.Iterator"%>
+<%@page import="java.util.Map"%>
+<%@page import="com.arjuna.webservices11.ServiceRegistry"%>
+<%@page import="com.jboss.transaction.wstf.test.TestConstants"%>
+<%@page import="com.jboss.transaction.wstf.webservices.InteropConstants"%>
+
+<%!
+private final static String SERVICE_URI = ServiceRegistry.getRegistry().getServiceURI(InteropConstants.SERVICE_PARTICIPANT) ;%>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>JBoss Transactions WSTF Sc007 Interop</title>
+</head>
+<body>
+<h1>JBoss Transactions WSTF Sc007 Interop</h1>
+<h2>Introduction</h2>
+<p>This web application implements the <a href="http://www.wstf.org/docs/scenarios/sc007/sc007.xml">scenario sc007</a> interoperability tests specified by the <a href="http://www.wstf.org/">Web Services Test Forum</a> Group.</p>
+<p>Please send any queries to the <a href="mailto:adinn at redhat.com?subject=Interop%20query">Red Hat Test Forum contact</a></p>
+<h2>Sc007 tests</h2>
+<p>Enter the URL of the sc007 participant service to be used to run these tests and a timeout for each individual test<br>
+ n.b. the JBoss participant has URL http://localhost:8080/sc007/ParticipantService</p>
+<form action="test" method="post">
+<p>Sc007 Participant Service URI: <input name="<%= TestConstants.PARAM_SERVICE_URI %>" maxlength="2000" size="100" value="<%= SERVICE_URI %>"/></p>
+<p>Test timeout: <input name="<%= TestConstants.PARAM_TEST_TIMEOUT %>" maxlength="10" size="10" value="120000"/></p>
+<!-- the current JaxWS based interop11 tests only runs synchronous tests for now
+<p>Asynchronous Test application: <input name="<%= TestConstants.PARAM_ASYNC_TEST %>" type="checkbox" checked="checked"/></p>
+-->
+<select name="<%= TestConstants.PARAM_TEST %>">
+<option value="<%= TestConstants.NAME_ALL_TESTS %>">All AT tests</option>
+<%
+
+  final Map descriptions = TestConstants.DESCRIPTIONS ;
+  final Iterator entryIter = descriptions.entrySet().iterator() ;
+  while(entryIter.hasNext())
+  {
+      final Map.Entry entry = (Map.Entry)entryIter.next() ;
+      final String testName = (String)entry.getKey() ;
+      final String testDescription = (String)entry.getValue() ;
+%>
+<option value="<%= testName %>"><%=testName + " - " + testDescription%></option>
+<%
+
+}
+%>
+</select>
+<p>
+<input type="submit" value="Execute"/>
+</p>
+</form>
+</body>
+</html>
\ No newline at end of file

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/web/invalidParameters.html
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/web/invalidParameters.html	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/web/invalidParameters.html	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>JBoss Transactions WS-TX Interop invalid parameters page</title>
+</head>
+<body>
+Unfortunately the parameters specified are invalid, please resubmit the request. &nbsp;If the request repeatedly fails please contact the <a href="mailto:adinn at redhat.com?subject=Interop%20invalid%20parameters">Red Hat Test Forum contact</a>
+<p>Return to <a href="index.jsp">main page</a></p>
+</body>
+</html>
\ No newline at end of file

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/web/results.jsp
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/web/results.jsp	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/web/results.jsp	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,90 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+    pageEncoding="UTF-8"%>
+<%@page import="com.jboss.transaction.wstf.test.TestConstants"%>
+<%@page import="java.util.Enumeration"%>
+<%@page import="junit.framework.TestCase"%>
+<%@page import="junit.framework.TestFailure"%>
+<%@page import="junit.framework.TestResult"%>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>JBoss Transactions WS-TX Interop results page</title>
+</head>
+<body>
+<h1>Results</h1>
+<h2>Processed results</h2>
+<%
+	final String logName = (String)session.getAttribute(TestConstants.ATTRIBUTE_LOG_NAME) ;
+    if (logName != null)
+    {
+%>
+<p>View <a href="logs/<%= logName %>">log file</a></p>
+<%
+    }
+%>
+<h2>JUnit results</h2>
+<%
+	final TestResult testResult = (TestResult)session.getAttribute(TestConstants.ATTRIBUTE_TEST_RESULT) ;
+	if (testResult == null)
+	{
+%>
+No JUnit test results generated.
+<%
+	}
+	else
+	{
+		final int runCount = testResult.runCount() ;
+		final int errorCount = testResult.errorCount() ;
+		final int failureCount = testResult.failureCount() ;
+%>
+<p>Run count: <%= runCount %></p>
+<p>Error count: <%= errorCount %></p>
+<p>Failure count: <%= failureCount %></p>
+<%
+		if ((errorCount > 0) || (failureCount > 0))
+		{
+			if (errorCount > 0)
+			{
+				final Enumeration enumeration = testResult.errors() ;
+%>
+<H3>Errors</H3>
+<%
+				int count = 0 ;
+				while(enumeration.hasMoreElements())
+				{
+				    final TestFailure testFailure = (TestFailure)enumeration.nextElement() ;
+				    count++ ;
+				    final TestCase failedTest = (TestCase)testFailure.failedTest() ;
+				    final String name = failedTest.getName() ;
+				    final String description = (String)TestConstants.DESCRIPTIONS.get(name) ;
+%>
+<p><a href="details.jsp?type=error&index=<%= count %>"><%= name %></a> <%= description %></p>
+<%
+				}
+			}
+			if (failureCount > 0)
+			{
+				final Enumeration enumeration = testResult.failures() ;
+%>
+<H3>Failures</H3>
+<%
+				int count = 0 ;
+				while(enumeration.hasMoreElements())
+				{
+				    final TestFailure testFailure = (TestFailure)enumeration.nextElement() ;
+				    count++ ;
+				    final TestCase failedTest = (TestCase)testFailure.failedTest() ;
+				    final String name = failedTest.getName() ;
+				    final String description = (String)TestConstants.DESCRIPTIONS.get(name) ;
+%>
+<p><a href="details.jsp?type=failure&index=<%= count %>"><%= name %></a> <%= description %></p>
+<%
+				}
+			}
+		}
+	}
+%>
+<p>Return to <a href="index.jsp">main page</a></p>
+</body>
+</html>
\ No newline at end of file

Added: labs/jbosstm/workspace/interop/WSTFSC07-interop/web.xml
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC07-interop/web.xml	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC07-interop/web.xml	2008-08-04 15:55:24 UTC (rev 21344)
@@ -0,0 +1,92 @@
+<?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">
+    <display-name>JBoss WSTF interop</display-name>
+
+    <description>JBoss WSTF interop</description>
+
+    <!-- base URL for location of Interop services -->
+    <context-param>
+        <param-name>BaseURI</param-name>
+        <param-value>http://@HOST@:@PORT@/sc007</param-value>
+    </context-param>
+
+    <!-- Initialise Interop 11 services -->
+    <listener>
+        <listener-class>com.jboss.transaction.wstf.webservices.sc007.server.ParticipantInitialisation</listener-class>
+    </listener>
+    <listener>
+        <listener-class>com.jboss.transaction.wstf.webservices.sc007.server.InitiatorInitialisation</listener-class>
+    </listener>
+
+    <!-- Define Interop 11 Server Endpoints -->
+    <servlet>
+      <servlet-name>WSTF Sc007 Initiator Service</servlet-name>
+      <servlet-class>com.jboss.transaction.wstf.webservices.sc007.sei.InitiatorPortTypeImpl</servlet-class>
+      <load-on-startup>1</load-on-startup>
+    </servlet>
+    <servlet>
+      <servlet-name>WSTF Sc007 Participant Service</servlet-name>
+      <servlet-class>com.jboss.transaction.wstf.webservices.sc007.sei.ParticipantPortTypeImpl</servlet-class>
+      <load-on-startup>1</load-on-startup>
+    </servlet>
+
+    <!-- Define Sc007 JaxWS Server Endpoint Mappings -->
+    <servlet-mapping>
+      <servlet-name>WSTF Sc007 Initiator Service</servlet-name>
+      <url-pattern>/InitiatorService</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+      <servlet-name>WSTF Sc007 Participant Service</servlet-name>
+      <url-pattern>/ParticipantService</url-pattern>
+    </servlet-mapping>
+
+    <!-- define proxy, logging and junit test runner servlets -->
+    <servlet>
+        <servlet-name>HTTP Proxy Servlet</servlet-name>
+        <servlet-class>com.jboss.transaction.wstf.proxy.ProxyListenerService</servlet-class>
+        <!--
+          The base URI of the proxy servlet.
+         -->
+        <init-param>
+            <param-name>proxyServiceURI</param-name>
+            <param-value>http://@HOST@:@PORT@/sc007/proxy</param-value>
+        </init-param>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+    <servlet>
+        <servlet-name>JUnit test servlet</servlet-name>
+        <servlet-class>com.jboss.transaction.wstf.test.TestServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+    
+    <servlet>
+        <servlet-name>Log servlet</servlet-name>
+        <servlet-class>com.jboss.transaction.wstf.test.TestLogServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+	<!-- servlet mappings -->
+    <servlet-mapping>
+        <servlet-name>HTTP Proxy Servlet</servlet-name>
+        <url-pattern>/proxy/*</url-pattern>
+    </servlet-mapping>
+    
+    <servlet-mapping>
+        <servlet-name>JUnit test servlet</servlet-name>
+        <url-pattern>/test</url-pattern>
+    </servlet-mapping>
+    
+    <servlet-mapping>
+        <servlet-name>Log servlet</servlet-name>
+        <url-pattern>/logs/*</url-pattern>
+    </servlet-mapping>
+    
+    <welcome-file-list>
+        <welcome-file>index.jsp</welcome-file>
+    </welcome-file-list>
+</web-app>




More information about the jboss-svn-commits mailing list