[jboss-svn-commits] JBL Code SVN: r21599 - in labs/jbosstm/workspace/interop/WSTFSC02-interop: dd/sc003 and 20 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Aug 18 06:42:15 EDT 2008


Author: adinn
Date: 2008-08-18 06:42:14 -0400 (Mon, 18 Aug 2008)
New Revision: 21599

Added:
   labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/sc003responsehandlers.xml
   labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/wsdl/sc003Response.wsdl
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/interop/MessageId.java
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/interop/Sc003AsyncTestCase.java
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/interop/Sc003TestCase.java
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/common/
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/common/EchoService.java
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/Sc003Constants.java
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/Sc003Client.java
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/Sc003ClientHandler.java
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/callback/
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/callback/EchoResponseCallback.java
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/callback/EchoResponseCallbackHandler.java
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/sei/
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/sei/Sc003PortImpl.java
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/sei/Sc003ResponsePortImpl.java
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/server/
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/server/Sc003Initialisation.java
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/wstf/docs/scenarios/sc003/Sc003ResponsePort.java
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/wstf/docs/scenarios/sc003/Sc003ResponseService.java
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/Body.java
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/Detail.java
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/Envelope.java
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/Fault.java
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/Header.java
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/ObjectFactory.java
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/package-info.java
   labs/jbosstm/workspace/interop/WSTFSC02-interop/web/sc003/
   labs/jbosstm/workspace/interop/WSTFSC02-interop/web/sc003/details.jsp
   labs/jbosstm/workspace/interop/WSTFSC02-interop/web/sc003/index.jsp
   labs/jbosstm/workspace/interop/WSTFSC02-interop/web/sc003/results.jsp
Modified:
   labs/jbosstm/workspace/interop/WSTFSC02-interop/build.xml
   labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/build.sh
   labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/sc003handlers.xml
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/test/TestConstants.java
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/test/TestRunner.java
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc002/sei/Sc002PortImpl.java
   labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/wstf/docs/scenarios/sc003/Sc003Service.java
   labs/jbosstm/workspace/interop/WSTFSC02-interop/web.xml
   labs/jbosstm/workspace/interop/WSTFSC02-interop/web/sc002/index.jsp
Log:
added implementation of scenario 3 and test page for both normal and async messages -- n.b. basic async reply/fault processing works ok but the async must understand (mu) tests fail because the mu header check happens before WS addressing headers are processed and so faults are not redirected

Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/build.xml
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/build.xml	2008-08-18 09:28:26 UTC (rev 21598)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/build.xml	2008-08-18 10:42:14 UTC (rev 21599)
@@ -66,17 +66,27 @@
     	    		</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}/sc003/sc003handlers.xml" toDir="${build.classes.dir}/com/jboss/transaction/wstf/webservices/sc003/sei" overwrite="yes">
+        </copy>
+        <copy file="${dd.dir}/sc003/sc003responsehandlers.xml" toDir="${build.classes.dir}/com/jboss/transaction/wstf/webservices/sc003/sei" overwrite="yes">
+        </copy>
 	<!-- wsdl gets loaded relative to service implementation class -->
         <copy toDir="${build.classes.dir}/org/wstf/docs/scenarios/sc002"
 	      overwrite="yes">
             <fileset dir="${dd.dir}/sc002/"
                     includes="wsdl/sc002.wsdl wsdl/sc002.xsd"/>
         </copy>
+        <copy toDir="${build.classes.dir}/org/wstf/docs/scenarios/sc003"
+	      overwrite="yes">
+            <fileset dir="${dd.dir}/sc003/"
+                    includes="wsdl/sc003.wsdl wsdl/sc002.xsd"/>
+        </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}"/>
                 <webinf dir="${dd.dir}/sc002" includes="wsdl/sc002.wsdl wsdl/sc002.xsd"/>
+                <webinf dir="${dd.dir}/sc003" includes="wsdl/sc003.wsdl wsdl/sc002.xsd"/>
 		<fileset dir="${web.dir}"/>
     		</war>
     </target>

Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/build.sh
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/build.sh	2008-08-18 09:28:26 UTC (rev 21598)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/build.sh	2008-08-18 10:42:14 UTC (rev 21599)
@@ -19,5 +19,7 @@
 rm -rf tmp/classes/* tmp/src/*
 
 $GF_HOME/bin/wsimport -verbose -keep -wsdllocation wsdl/sc003.wsdl -d tmp/classes -s tmp/src -target 2.0 -extension wsdl/sc003.wsdl
+# $GF_HOME/bin/wsimport -verbose -keep -wsdllocation wsdl/sc003Response.wsdl -d tmp/classes -s tmp/src -target 2.0 -extension wsdl/sc003Response.wsdl
+ $GF_HOME/bin/wsimport -verbose -keep -wsdllocation wsdl/sc003Response.wsdl -d tmp/classes -s tmp/src -target 2.0 wsdl/sc003Response.wsdl
 
 # ${JBOSS_HOME}/bin/wsconsume.sh --verbose --keep --wsdlLocation=wsdl/sc003.wsdl --source=tmp/src --output=tmp/classes --target=2.0 --extension wsdl/sc003.wsdl

Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/sc003handlers.xml
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/sc003handlers.xml	2008-08-18 09:28:26 UTC (rev 21598)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/sc003handlers.xml	2008-08-18 10:42:14 UTC (rev 21599)
@@ -24,9 +24,9 @@
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee">
     <handler-chain>
-	<handler>
-		<handler-name>WSTF Sc003 Server Handler</handler-name>
-		<handler-class>org.jboss.ws.extensions.addressing.jaxws.WSAddressingServerHandler</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>

Copied: labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/sc003responsehandlers.xml (from rev 21545, labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/sc003handlers.xml)
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/sc003responsehandlers.xml	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/sc003responsehandlers.xml	2008-08-18 10:42:14 UTC (rev 21599)
@@ -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) 2008,
+  @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>
+            <handler-name>WSTF Sc003 Server Handler</handler-name>
+            <handler-class>com.jboss.transaction.wstf.webservices.sc003.client.Sc003ClientHandler</handler-class>
+        </handler>
+    </handler-chain>
+</handler-chains>

Copied: labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/wsdl/sc003Response.wsdl (from rev 21545, labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/wsdl/sc003.wsdl)
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/wsdl/sc003Response.wsdl	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/wsdl/sc003Response.wsdl	2008-08-18 10:42:14 UTC (rev 21599)
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions targetNamespace="http://www.wstf.org/docs/scenarios/sc003"
+                  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+                  xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+                  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+                  xmlns:sc002="http://www.wstf.org/docs/scenarios/sc002"
+                  xmlns:tns="http://www.wstf.org/docs/scenarios/sc003"
+                  xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
+                  xmlns:wsp="http://www.w3.org/ns/ws-policy">
+
+  <wsdl:types>
+    <xs:schema targetNamespace="http://www.wstf.org/docs/scenarios/sc002">
+      <xs:import namespace="http://schemas.xmlsoap.org/soap/envelope/"
+                 schemaLocation="http://schemas.xmlsoap.org/soap/envelope"/>
+      <xs:include schemaLocation="sc002.xsd"/>
+      <xs:element name="EchoResponse" type="sc002:EchoResponseType"/>
+    </xs:schema>
+  </wsdl:types>
+
+  <wsdl:message name="EchoResponse">
+    <wsdl:part name="EchoResponse" element="sc002:EchoResponse"/>
+  </wsdl:message>
+
+    <wsdl:message name="SoapFault">
+         <wsdl:part name="fault" element="soapenv:Fault" />
+    </wsdl:message>
+
+    <wsdl:portType name="sc003ResponsePort">
+        <wsdl:operation name="EchoResponse">
+          <wsdl:documentation>
+          </wsdl:documentation>
+          <wsdl:input message="tns:EchoResponse"
+                       wsam:Action="http://www.wstf.org/docs/scenarios/sc002/EchoResponse"/>
+        </wsdl:operation>
+        <wsdl:operation name="fault">
+          <wsdl:documentation>
+          </wsdl:documentation>
+          <wsdl:input message="tns:SoapFault"
+                       wsam:Action="http://schemas.xmlsoap.org/wsdl/soap/envelope/fault"/>
+        </wsdl:operation>
+    </wsdl:portType>
+
+  <wsdl:binding name="sc003SOAP11Binding" type="tns:sc003ResponsePort">
+    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+      <wsdl:operation name="EchoResponse">
+        <soap:operation soapAction="http://www.wstf.org/docs/scenarios/sc002/EchoResponse"/>
+        <wsdl:input>
+          <soap:body use="literal" parts="EchoResponse"/>
+        </wsdl:input>
+      </wsdl:operation>
+      <wsdl:operation name="fault">
+        <soap:operation soapAction="http://schemas.xmlsoap.org/wsdl/soap/envelope/fault"/>
+        <wsdl:input>
+          <soap:body use="literal" parts="fault"/>
+        </wsdl:input>
+      </wsdl:operation>
+  </wsdl:binding>
+  <!--
+  <wsdl:binding name="sc003SOAP12Binding" type="tns:sc003ResponsePort">
+    <soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+    <wsdl:operation name="EchoResponse">
+      <soap12:operation soapAction="http://www.wstf.org/docs/scenarios/sc002/EchoResponse"/>
+      <wsdl:input>
+        <soap12:body use="literal" parts="EchoResponse"/>
+      </wsdl:input>
+    </wsdl:operation>
+  </wsdl:binding>
+  -->
+  <wsdl:service name="sc003ResponseService">
+    <wsdl:port  name="soap11port" binding="tns:sc003SOAP11Binding">
+      <wsdl:documentation>
+        This port supports the optional use of WS-Addressing 1.0.
+      </wsdl:documentation>
+      <soap:address location="http://www.wstf.org/sc003/sc003SOAP11"/>
+      <wsp:Policy>
+        <wsam:Addressing  wsp:Optional="true">
+          <wsp:Policy/>
+        </wsam:Addressing>
+      </wsp:Policy>
+    </wsdl:port>
+      <!--
+    <wsdl:port name="soap12port" binding="tns:sc003SOAP12Binding">
+      <wsdl:documentation>
+        This port supports the optional use of WS-Addressing 1.0.
+      </wsdl:documentation>
+      <soap12:address location="http://www.wstf.org/sc003/sc003SOAP12"/>
+      <wsp:Policy>
+        <wsam:Addressing wsp:Optional="true">
+          <wsp:Policy/>
+        </wsam:Addressing>
+      </wsp:Policy>
+    </wsdl:port>
+    -->
+  </wsdl:service>
+
+</wsdl:definitions>

Copied: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/interop/MessageId.java (from rev 21141, labs/jbosstm/trunk/XTS/WS-C/dev/src11/com/arjuna/wsc11/messaging/MessageId.java)
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/interop/MessageId.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/interop/MessageId.java	2008-08-18 10:42:14 UTC (rev 21599)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt 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 Lesser General Public License, v. 2.1.
+ * 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 Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 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.
+ */
+/*
+ * Created on 15-Jan-2005
+ */
+package com.jboss.transaction.wstf.interop;
+
+import java.rmi.dgc.VMID;
+
+/**
+ * A simple message id generator, used when UID is inaccessible.
+ * @author kevin
+ */
+public class MessageId
+{
+    /**
+     * Prevent instantiation.
+     */
+    private MessageId()
+    {
+    }
+
+    /**
+     * Get the next message identifier.
+     * @return The next message identifier.
+     */
+    public static String getMessageId()
+    {
+        return "urn:" + new VMID().toString() ;
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/interop/Sc003AsyncTestCase.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/interop/Sc003AsyncTestCase.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/interop/Sc003AsyncTestCase.java	2008-08-18 10:42:14 UTC (rev 21599)
@@ -0,0 +1,668 @@
+package com.jboss.transaction.wstf.interop;
+
+import com.jboss.transaction.wstf.webservices.ServiceRegistry;
+import com.jboss.transaction.wstf.webservices.sc003.client.Sc003Client;
+import com.jboss.transaction.wstf.webservices.sc003.client.callback.EchoResponseCallback;
+import com.jboss.transaction.wstf.webservices.sc003.client.callback.EchoResponseCallbackHandler;
+import com.jboss.transaction.wstf.webservices.sc003.Sc003Constants;
+import com.jboss.transaction.wstf.proxy.ProxyConversation;
+import org.wstf.docs.scenarios.sc002.*;
+
+import javax.xml.ws.soap.SOAPFaultException;
+import javax.xml.ws.ProtocolException;
+import javax.xml.ws.WebServiceException;
+import javax.xml.soap.SOAPFault;
+import javax.xml.namespace.QName;
+
+/**
+ * test case for WSTF scenario 3 Echo Notify service asynchronous tests
+ *
+ * inherits from InteropTestCase so we can get redirection through the proxy service
+ * and hence logging of the messages. we don't strictly have a participant service
+ * here but the corresponding entity is the Sc002 service which we provide an
+ * implementation for. We also implement a client service which can be used to accept
+ * asynchronous replies and faults.
+ */
+public class Sc003AsyncTestCase extends InteropTestCase
+{
+    /**
+     * The service URI of the Sc003 service.
+     */
+    private static final String SC003_SERVICE_URI;
+
+    /**
+     * The service URI of the Sc003Response service.
+     */
+    private static final String SC003_SERVICE_RESPONSE_URI;
+
+    /**
+     * Construct the named test case.
+     */
+    public Sc003AsyncTestCase()
+    {
+        // Default the participant service to the local Sc002 service.
+        setParticipantURI(getSc003ServiceURI()) ;
+        setTestTimeout(120000) ;
+        setAsyncTest(true) ;
+    }
+
+    /**
+     * Get the Sc002 service URI.
+     * @return The Sc002 service uri.
+     */
+    protected static String getSc003ServiceURI()
+    {
+        return SC003_SERVICE_URI;
+    }
+
+    /**
+     * Get the Sc002 service URI.
+     * @return The Sc002 service uri.
+     */
+    protected static String getSc003ResponseServiceURI()
+    {
+        return SC003_SERVICE_RESPONSE_URI;
+    }
+
+    /**
+     * testSc003Async_1 - Test 1 simple notify
+     * Participant sends a simple notify.
+     * @throws Exception on failure.
+     */
+    public void testSc003Async_1()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        try
+        {
+            final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String responseURI = getSc003ResponseServiceURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String action = Sc003Constants.SC003_ACTION_NOTIFY;
+            SessionDataType session = new SessionDataType();
+            NotifyType notifyType = new NotifyType();
+            String messageId = MessageId.getMessageId();
+            Sc003AsyncCallback callback = new Sc003AsyncCallback(messageId);
+            session.setID("0");
+            notifyType.setText("Hello-");
+            Sc003Client.getSc003Port(serviceURI, null, responseURI, messageId, conversationId, action, false).notify(notifyType, session);
+            callback.waitForResponse(getTestTimeout());
+            assertTrue("expecting no response", !callback.isTriggered());
+        }
+        catch (SOAPFaultException sfe)
+        {
+            // did not expect this
+            fail("unexpected soap fault exception " + sfe);
+        }
+        catch (ProtocolException pe)
+        {
+            // did not expect this
+            fail("unexpected protocol exception " + pe);
+        }
+        catch (WebServiceException wse)
+        {
+            // did not expect this
+            fail("unexpected web service exception " + wse);
+        }
+        catch (Exception e)
+        {
+            // did not expect this
+            fail("unexpected exception " + e);
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+    }
+
+    /**
+     * testSc003Async_2 - Test 2 faulting notify
+     * Participant sends a faulting notify and traps a fault response.
+     * @throws Exception unless the correct fault is caught.
+     */
+    public void testSc003Async_2()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        try
+        {
+            final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String responseURI = getSc003ResponseServiceURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String action = Sc003Constants.SC003_ACTION_NOTIFY;
+            SessionDataType session = new SessionDataType();
+            NotifyType notifyType = new NotifyType();
+            String messageId = MessageId.getMessageId();
+            Sc003AsyncCallback callback = new Sc003AsyncCallback(messageId);
+            session.setID("0");
+            notifyType.setText("fault");
+            Sc003Client.getSc003Port(serviceURI, null, responseURI, messageId, conversationId, action, false).notify(notifyType, session);
+            callback.waitForResponse(getTestTimeout());
+            assertTrue("expecting faultNotify", callback.isFaulted());
+            // check the fault is the one we expect
+            SOAPFault fault = callback.getFault();
+            QName code = fault.getFaultCodeAsQName();
+            // need to correct this
+            assertTrue("expecting SENDER fault code", FAULT_CODE_SERVER.equals(code));
+            // check the faultString is faultingNotify
+            String faultString = fault.getFaultString();
+            assertTrue("expecting faultingNotify faultString", FAULT_STRING_FAULTING_NOTIFY.equals(faultString));
+        }
+        catch (SOAPFaultException sfe)
+        {
+            // did not expect this
+            fail("unexpected soap fault exception " + sfe);
+        }
+        catch (ProtocolException pe)
+        {
+            // did not expect this
+            fail("unexpected protocol exception " + pe);
+        }
+        catch (WebServiceException wse)
+        {
+            // did not expect this
+            fail("unexpected web service exception " + wse);
+        }
+        catch (Exception e)
+        {
+            // did not expect this
+            fail("unexpected exception " + e);
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+    }
+
+    /**
+     * testSc003Async_3 - Test 3 simple echo
+     * Participant sends a simple echo.
+     * @throws Exception on failure.
+     */
+    public void testSc003Async_3()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        try
+        {
+            final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String responseURI = getSc003ResponseServiceURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String action = Sc003Constants.SC003_ACTION_ECHO;
+            SessionDataType session = new SessionDataType();
+            EchoType echoType = new EchoType();
+            String messageId = MessageId.getMessageId();
+            Sc003AsyncCallback callback = new Sc003AsyncCallback(messageId);
+            session.setID("0");
+            echoType.setText("World");
+            EchoResponseType result = Sc003Client.getSc003Port(serviceURI, responseURI, responseURI, messageId, conversationId, action, false).echo(echoType, session);
+            assertTrue("expecting no result", result == null);
+            callback.waitForResponse(getTestTimeout());
+            assertTrue("expecting echo response", callback.isTriggered());
+            // check the response is the one we expect
+            String reply = callback.getText();
+
+            if (reply == null) {
+                fail("invalid null echo response");
+            } else {
+                int length = reply.length();
+                int idx = reply.indexOf("World");
+                if ((idx < 0) || ((idx + 5) != length)) {
+                    fail ("invalid echo response " + reply);
+                }
+            }
+        }
+        catch (SOAPFaultException sfe)
+        {
+            // did not expect this
+            fail("unexpected soap fault exception " + sfe);
+        }
+        catch (ProtocolException pe)
+        {
+            // did not expect this
+            fail("unexpected protocol exception " + pe);
+        }
+        catch (WebServiceException wse)
+        {
+            // did not expect this
+            fail("unexpected web service exception " + wse);
+        }
+        catch (Exception e)
+        {
+            // did not expect this
+            fail("unexpected exception " + e);
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+    }
+
+    /**
+     * testSc003Async_4 - Test 4 faulting echo
+     * Participant sends a faulting echo and traps a fault response.
+     * @throws Exception unless the correct fault is caught.
+     */
+    public void testSc003Async_4()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        try
+        {
+            final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String responseURI = getSc003ResponseServiceURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String action = Sc003Constants.SC003_ACTION_ECHO;
+            SessionDataType session = new SessionDataType();
+            EchoType echoType = new EchoType();
+            String messageId = MessageId.getMessageId();
+            Sc003AsyncCallback callback = new Sc003AsyncCallback(messageId);
+            session.setID("0");
+            echoType.setText("fault");
+            EchoResponseType result = Sc003Client.getSc003Port(serviceURI, responseURI, responseURI, messageId, conversationId, action, false).echo(echoType, session);
+            assertTrue("expecting no result", result == null);
+            callback.waitForResponse(getTestTimeout());
+            assertTrue("expecting faultNotify", callback.isFaulted());
+            // check the fault is the one we expect
+            SOAPFault fault = callback.getFault();
+            QName code = fault.getFaultCodeAsQName();
+            // need to correct this
+            assertTrue("expecting SENDER fault code", FAULT_CODE_SERVER.equals(code));
+            // check the faultString is faultingNotify
+            String faultString = fault.getFaultString();
+            assertTrue("expecting faultingEcho faultString", FAULT_STRING_FAULTING_ECHO.equals(faultString));
+        }
+        catch (SOAPFaultException sfe)
+        {
+            // did not expect this
+            fail("unexpected soap fault exception " + sfe);
+        }
+        catch (ProtocolException pe)
+        {
+            // did not expect this
+            fail("unexpected protocol exception " + pe);
+        }
+        catch (WebServiceException wse)
+        {
+            // did not expect this
+            fail("unexpected web service exception " + wse);
+        }
+        catch (Exception e)
+        {
+            // did not expect this
+            fail("unexpected exception " + e);
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+    }
+
+    /**
+     * testSc003Async_5 - Test 5 simple notify with mu
+     * Participant sends a simple notify with a must understand header.
+     * @throws Exception on failure.
+     */
+    public void testSc003Async_5()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        try
+        {
+            final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String responseURI = getSc003ResponseServiceURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String action = Sc003Constants.SC003_ACTION_NOTIFY;
+            SessionDataType session = new SessionDataType();
+            NotifyType notifyType = new NotifyType();
+            String messageId = MessageId.getMessageId();
+            Sc003AsyncCallback callback = new Sc003AsyncCallback(messageId);
+            session.setID("0");
+            notifyType.setText("Hello-");
+            Sc003Client.getSc003Port(serviceURI, null, responseURI, messageId, conversationId, action, true).notify(notifyType, session);
+            callback.waitForResponse(getTestTimeout());
+            assertTrue("expecting fault", callback.isFaulted());
+            // check the fault is the one we expect
+            SOAPFault fault = callback.getFault();
+            QName code = fault.getFaultCodeAsQName();
+            // need to correct this
+            assertTrue("expecting SENDER fault code", FAULT_CODE_SERVER.equals(code));
+            // check the faultString is not faultNotify
+            String faultString = fault.getFaultString();
+            assertTrue("not expecting faultingNotify faultString", !FAULT_STRING_FAULTING_NOTIFY.equals(faultString));
+        }
+        catch (SOAPFaultException sfe)
+        {
+            // did not expect this
+            fail("unexpected soap fault exception " + sfe);
+        }
+        catch (ProtocolException pe)
+        {
+            // did not expect this
+            fail("unexpected protocol exception " + pe);
+        }
+        catch (WebServiceException wse)
+        {
+            // did not expect this
+            fail("unexpected web service exception " + wse);
+        }
+        catch (Exception e)
+        {
+            // did not expect this
+            fail("unexpected exception " + e);
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+    }
+
+    /**
+     * testSc003Async_6 - Test 6 faulting notify with mu
+     * Participant sends a faulting notify with a must understand header and traps a fault
+     * response.
+     * @throws Exception unless the correct fault is caught.
+     */
+    public void testSc003Async_6()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        try
+        {
+            final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String responseURI = getSc003ResponseServiceURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String action = Sc003Constants.SC003_ACTION_NOTIFY;
+            SessionDataType session = new SessionDataType();
+            NotifyType notifyType = new NotifyType();
+            String messageId = MessageId.getMessageId();
+            Sc003AsyncCallback callback = new Sc003AsyncCallback(messageId);
+            session.setID("0");
+            notifyType.setText("fault");
+            Sc003Client.getSc003Port(serviceURI, null, responseURI, messageId, conversationId, action, true).notify(notifyType, session);
+            callback.waitForResponse(getTestTimeout());
+            assertTrue("expecting fault", callback.isFaulted());
+            // check the fault is the one we expect
+            SOAPFault fault = callback.getFault();
+            QName code = fault.getFaultCodeAsQName();
+            // need to correct this
+            assertTrue("expecting SENDER fault code", FAULT_CODE_SERVER.equals(code));
+            // check the faultString is not faultNotify
+            String faultString = fault.getFaultString();
+            assertTrue("not expecting faultingNotify faultString", !FAULT_STRING_FAULTING_NOTIFY.equals(faultString));
+        }
+        catch (SOAPFaultException sfe)
+        {
+            // did not expect this
+            fail("unexpected soap fault exception " + sfe);
+        }
+        catch (ProtocolException pe)
+        {
+            // did not expect this
+            fail("unexpected protocol exception " + pe);
+        }
+        catch (WebServiceException wse)
+        {
+            // did not expect this
+            fail("unexpected web service exception " + wse);
+        }
+        catch (Exception e)
+        {
+            // did not expect this
+            fail("unexpected exception " + e);
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+    }
+
+    /**
+     * testSc003Async_7 - Test 7 simple echo with mu
+     * Participant sends a simple echo with a must understand header.
+     * @throws Exception on failure.
+     */
+    public void testSc003Async_7()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        try
+        {
+            final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String responseURI = getSc003ResponseServiceURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String action = Sc003Constants.SC003_ACTION_ECHO;
+            SessionDataType session = new SessionDataType();
+            EchoType echoType = new EchoType();
+            String messageId = MessageId.getMessageId();
+            Sc003AsyncCallback callback = new Sc003AsyncCallback(messageId);
+            session.setID("0");
+            echoType.setText("World");
+            EchoResponseType result = Sc003Client.getSc003Port(serviceURI, responseURI, responseURI, messageId, conversationId, action, true).echo(echoType, session);
+            assertTrue("not expecting result", result == null);
+            callback.waitForResponse(getTestTimeout());
+            assertTrue("expecting fault", callback.isFaulted());
+            // check the fault is the one we expect
+            SOAPFault fault = callback.getFault();
+            QName code = fault.getFaultCodeAsQName();
+            // need to correct this
+            assertTrue("expecting SENDER fault code", FAULT_CODE_SERVER.equals(code));
+            // check the faultString is not faultEcho
+            String faultString = fault.getFaultString();
+            assertTrue("not expecting faultingEcho faultString", !FAULT_STRING_FAULTING_ECHO.equals(faultString));
+        }
+        catch (SOAPFaultException sfe)
+        {
+            // did not expect this
+            fail("unexpected soap fault exception " + sfe);
+        }
+        catch (ProtocolException pe)
+        {
+            // did not expect this
+            fail("unexpected protocol exception " + pe);
+        }
+        catch (WebServiceException wse)
+        {
+            // did not expect this
+            fail("unexpected web service exception " + wse);
+        }
+        catch (Exception e)
+        {
+            // did not expect this
+            fail("unexpected exception " + e);
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+    }
+
+    /**
+     * testSc003Async_8 - Test 8 faulting echo with mu
+     * Participant sends a faulting echo with a must understand and traps a fault response.
+     * @throws Exception unless the correct fault is caught.
+     */
+    public void testSc003Async_8()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        try
+        {
+            final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String responseURI = getSc003ResponseServiceURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String action = Sc003Constants.SC003_ACTION_ECHO;
+            SessionDataType session = new SessionDataType();
+            EchoType echoType = new EchoType();
+            String messageId = MessageId.getMessageId();
+            Sc003AsyncCallback callback = new Sc003AsyncCallback(messageId);
+            session.setID("0");
+            echoType.setText("fault");
+            EchoResponseType result = Sc003Client.getSc003Port(serviceURI, responseURI, responseURI, messageId, conversationId, action, true).echo(echoType, session);
+            assertTrue("not expecting result", result == null);
+            callback.waitForResponse(getTestTimeout());
+            assertTrue("expecting fault", callback.isFaulted());
+            // check the fault is the one we expect
+            SOAPFault fault = callback.getFault();
+            QName code = fault.getFaultCodeAsQName();
+            // need to correct this
+            assertTrue("expecting SENDER fault code", FAULT_CODE_SERVER.equals(code));
+            // check the faultString is not faultEcho
+            String faultString = fault.getFaultString();
+            assertTrue("not expecting faultingEcho faultString", !FAULT_STRING_FAULTING_ECHO.equals(faultString));
+        }
+        catch (SOAPFaultException sfe)
+        {
+            // did not expect this
+            fail("unexpected soap fault exception " + sfe);
+        }
+        catch (ProtocolException pe)
+        {
+            // did not expect this
+            fail("unexpected protocol exception " + pe);
+        }
+        catch (WebServiceException wse)
+        {
+            // did not expect this
+            fail("unexpected web service exception " + wse);
+        }
+        catch (Exception e)
+        {
+            // did not expect this
+            fail("unexpected exception " + e);
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+    }
+
+    private static class Sc003AsyncCallback extends EchoResponseCallback
+    {
+        private boolean cancelled;
+        private boolean triggered;
+        private boolean faulted;
+        private SOAPFault fault;
+        private String text;
+        private String messageId;
+
+        /**
+         * create and register a callback
+         *
+         * @param messageId
+         */
+        public Sc003AsyncCallback(String messageId)
+        {
+            this.messageId = messageId;
+            cancelled = false;
+            triggered = false;
+            faulted = false;
+            fault = null;
+            text = null;
+
+            EchoResponseCallbackHandler.register(messageId, this);
+        }
+
+        /**
+         * handle an asynchronous Echo reply
+         * @param echoResponse the response text
+         */
+        public synchronized void echoResponse(EchoResponseType echoResponse)
+        {
+            if (!cancelled) {
+                triggered = true;
+                text = echoResponse.getText();
+            }
+
+            notify();
+        }
+
+        /**
+         * handle an asynchronous EchoR fault
+         * @param fault the fault
+         */
+        public synchronized void fault(SOAPFault fault)
+        {
+            if (!cancelled) {
+                triggered = true;
+                faulted = true;
+                this.fault = fault;
+            }
+
+            notify();
+        }
+
+        /**
+         * wait for a response or fault timing out if a positive timeout is supplied
+         * @param millisecondsWait
+         * @return true if a response or fault did not arrive before timing out otherwise false
+         */
+        public synchronized boolean waitForResponse(long millisecondsWait)
+        {
+            // no point waiting unless we have to
+
+            if (triggered == false) {
+                try {
+                    wait(millisecondsWait);
+                } catch (InterruptedException e) {
+                    // interrupted -- don't care
+                }
+            }
+
+            if (triggered == false) {
+                // we may be synchronized again but the trigger can still go off
+                EchoResponseCallbackHandler.unregister(messageId);
+                // so stop it from doing anything
+                cancelled = true;
+            }
+
+            return triggered;
+        }
+        // the rest of these must only be called after the waitForResponse returns
+
+        /**
+         * check if the callback was triggered before a timeout occurred
+         *
+         * @return true if the callback was triggered otherwise false
+         */
+        public boolean isTriggered()
+        {
+            return triggered;
+        }
+
+        /**
+         * check if the callback was triggered with a soap fault
+         * @return true if the callback was triggered with a soap fault otherwise false
+         */
+        public boolean isFaulted()
+        {
+            return faulted;
+        }
+
+        /**
+         * retrieve the text assigned by an echo response trigger or null if the callabck was not
+         * triggered or was faulted
+         * @return the text assigned by an echo response trigger or null if the callabck was not
+         * triggered or was faulted
+         */
+        public String getText()
+        {
+            return text;
+        }
+
+        /**
+         * retrieve the fault assigned by a fault trigger or null if the callabck was not
+         * faulted
+         * @return the fault assigned by a fault trigger or null if the callabck was not
+         * faulted
+         */
+        public SOAPFault getFault()
+        {
+            return fault;
+        }
+    }
+
+    static
+    {
+        final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+        SC003_SERVICE_URI = serviceRegistry.getServiceURI(Sc003Constants.SERVICE_SC003) ;
+        SC003_SERVICE_RESPONSE_URI = serviceRegistry.getServiceURI(Sc003Constants.SERVICE_SC003_RESPONSE) ;
+    }
+
+    private static final QName FAULT_CODE_SERVER = new QName("http://schemas.xmlsoap.org/soap/envelope/", "Server");
+    private static final String FAULT_STRING_FAULTING_NOTIFY = "faultingNotify";
+    private static final String FAULT_STRING_FAULTING_ECHO = "faultingEcho";
+
+}
\ No newline at end of file

Copied: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/interop/Sc003TestCase.java (from rev 21545, labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/interop/Sc002TestCase.java)
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/interop/Sc003TestCase.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/interop/Sc003TestCase.java	2008-08-18 10:42:14 UTC (rev 21599)
@@ -0,0 +1,379 @@
+package com.jboss.transaction.wstf.interop;
+
+import com.jboss.transaction.wstf.webservices.ServiceRegistry;
+import com.jboss.transaction.wstf.webservices.sc003.client.Sc003Client;
+import com.jboss.transaction.wstf.webservices.sc003.Sc003Constants;
+import com.jboss.transaction.wstf.proxy.ProxyConversation;
+import org.wstf.docs.scenarios.sc002.*;
+
+import javax.xml.ws.soap.SOAPFaultException;
+import javax.xml.ws.ProtocolException;
+import javax.xml.ws.WebServiceException;
+
+/**
+ * test case for WSTF scenario 3 Echo Notify service synchronous tests
+ *
+ * inherits from InteropTestCase so we can get redirection through the proxy service
+ * and hence logging of the messages. we don't strictly have a participant service
+ * here but the corresponding entity is the Sc002 service which we provide an
+ * implementation for.
+ */
+public class Sc003TestCase extends InteropTestCase
+{
+    /**
+     * The service URI of the Sc003 service.
+     */
+    private static final String SC003_SERVICE_URI;
+
+    /**
+     * Construct the named test case.
+     */
+    public Sc003TestCase()
+    {
+        // Default the participant service to the local Sc002 service.
+        setParticipantURI(getSc003ServiceURI()) ;
+        setTestTimeout(120000) ;
+        setAsyncTest(true) ;
+    }
+
+    /**
+     * Get the Sc002 service URI.
+     * @return The Sc002 service uri.
+     */
+    protected static String getSc003ServiceURI()
+    {
+        return SC003_SERVICE_URI;
+    }
+
+    /**
+     * testSc003Sync_1 - Test 1 simple notify
+     * Participant sends a simple notify.
+     * @throws Exception on failure.
+     */
+    public void testSc003Sync_1()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        try
+        {
+            final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String action = Sc003Constants.SC003_ACTION_NOTIFY;
+            SessionDataType session = new SessionDataType();
+            NotifyType notifyType = new NotifyType();
+            String messageId = MessageId.getMessageId();
+            session.setID("0");
+            notifyType.setText("Hello-");
+            Sc003Client.getSc003Port(serviceURI, null, null, messageId, conversationId, action, false).notify(notifyType, session);
+        }
+        catch (Exception e)
+        {
+            // did not expect this
+            fail("unexpected exception " + e);
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+    }
+
+    /**
+     * testSc003Sync_2 - Test 2 faulting notify
+     * Participant sends a faulting notify and traps a fault response.
+     * @throws Exception unless the correct fault is caught.
+     */
+    public void testSc003Sync_2()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        try
+        {
+            final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String action = Sc003Constants.SC003_ACTION_NOTIFY;
+            SessionDataType session = new SessionDataType();
+            NotifyType notifyType = new NotifyType();
+            String messageId = MessageId.getMessageId();
+            session.setID("0");
+            notifyType.setText("fault");
+            Sc003Client.getSc003Port(serviceURI, null, null, messageId, conversationId, action, false).notify(notifyType, session);
+        }
+        catch (SOAPFaultException sfe)
+        {
+            // did not expect this
+            fail("unexpected soap fault exception " + sfe);
+        }
+        catch (ProtocolException pe)
+        {
+            // did not expect this
+            fail("unexpected protocol exception " + pe);
+        }
+        catch (WebServiceException wse)
+        {
+            // did not expect this
+            fail("unexpected web service exception " + wse);
+        }
+        catch (Exception e)
+        {
+            // did not expect this
+            fail("unexpected exception " + e);
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+    }
+
+    /**
+     * testSc003Sync_3 - Test 3 simple echo
+     * Participant sends a simple echo.
+     * @throws Exception on failure.
+     */
+    public void testSc003Sync_3()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        try
+        {
+            final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String action = Sc003Constants.SC003_ACTION_ECHO;
+            SessionDataType session = new SessionDataType();
+            EchoType echoType = new EchoType();
+            String messageId = MessageId.getMessageId();
+            session.setID("0");
+            echoType.setText("World");
+            EchoResponseType result = Sc003Client.getSc003Port(serviceURI, "", null, messageId, conversationId, action, false).echo(echoType, session);
+            String reply = result.getText();
+
+            if (reply == null) {
+                fail("invalid null echo response");
+            } else {
+                int length = reply.length();
+                int idx = reply.indexOf("World");
+                if ((idx < 0) || ((idx + 5) != length)) {
+                    fail ("invalid echo response " + reply);
+                }
+            }
+        }
+        catch (Exception e)
+        {
+            // did not expect this
+            fail("unexpected exception " + e);
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+    }
+
+    /**
+     * testSc003Sync_4 - Test 4 faulting echo
+     * Participant sends a faulting echo and traps a fault response.
+     * @throws Exception unless the correct fault is caught.
+     */
+    public void testSc003Sync_4()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        try
+        {
+            final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String action = Sc003Constants.SC003_ACTION_ECHO;
+            SessionDataType session = new SessionDataType();
+            EchoType echoType = new EchoType();
+            String messageId = MessageId.getMessageId();
+            session.setID("0");
+            echoType.setText("fault");
+            EchoResponseType result = Sc003Client.getSc003Port(serviceURI, "", null, messageId, conversationId, action, false).echo(echoType, session);
+            fail("faulting echo expected fault! got " + result.getText());
+        }
+        catch (SOAPFaultException sfe)
+        {
+            // expected this
+        }
+        catch (ProtocolException pe)
+        {
+            // did not expect this
+            fail("unexpected protocol exception " + pe);
+        }
+        catch (WebServiceException wse)
+        {
+            // did not expect this
+            fail("unexpected web service exception " + wse);
+        }
+        catch (Exception e)
+        {
+            // did not expect this
+            fail("unexpected exception " + e);
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+    }
+
+    /**
+     * testSc003Sync_5 - Test 5 simple notify with mu
+     * Participant sends a simple notify with a must understand header.
+     * @throws Exception on failure.
+     */
+    public void testSc003Sync_5()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        try
+        {
+            final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String action = Sc003Constants.SC003_ACTION_NOTIFY;
+            SessionDataType session = new SessionDataType();
+            NotifyType notifyType = new NotifyType();
+            String messageId = MessageId.getMessageId();
+            session.setID("0");
+            notifyType.setText("Hello-");
+            Sc003Client.getSc003Port(serviceURI, null, null, messageId, conversationId, action, true).notify(notifyType, session);
+        }
+        catch (Exception e)
+        {
+            // did not expect this
+            fail("unexpected exception " + e);
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+    }
+
+    /**
+     * testSc003Sync_6 - Test 6 faulting notify with mu
+     * Participant sends a faulting notify with a must understand header and traps a fault
+     * response.
+     * @throws Exception unless the correct fault is caught.
+     */
+    public void testSc003Sync_6()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        try
+        {
+            final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String action = Sc003Constants.SC003_ACTION_NOTIFY;
+            SessionDataType session = new SessionDataType();
+            NotifyType notifyType = new NotifyType();
+            String messageId = MessageId.getMessageId();
+            session.setID("0");
+            notifyType.setText("fault");
+            Sc003Client.getSc003Port(serviceURI, null, null, messageId, conversationId, action, true).notify(notifyType, session);
+        }
+        catch (SOAPFaultException sfe)
+        {
+            // did not expect this
+            fail("unexpected soap fault exception " + sfe);
+        }
+        catch (ProtocolException pe)
+        {
+            // did not expect this
+            fail("unexpected protocol exception " + pe);
+        }
+        catch (WebServiceException wse)
+        {
+            // did not expect this
+            fail("unexpected web service exception " + wse);
+        }
+        catch (Exception e)
+        {
+            // did not expect this
+            fail("unexpected exception " + e);
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+    }
+
+    /**
+     * testSc003Sync_7 - Test 7 simple echo with mu
+     * Participant sends a simple echo with a must understand header.
+     * @throws Exception on failure.
+     */
+    public void testSc003Sync_7()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        try
+        {
+            final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String action = Sc003Constants.SC003_ACTION_ECHO;
+            SessionDataType session = new SessionDataType();
+            EchoType echoType = new EchoType();
+            String messageId = MessageId.getMessageId();
+            session.setID("0");
+            echoType.setText("World");
+            EchoResponseType result = Sc003Client.getSc003Port(serviceURI, "", null, messageId, conversationId, action, true).echo(echoType, session);
+            String reply = result.getText();
+            fail("expecting soap fault!");
+        }
+        catch (SOAPFaultException sfe)
+        {
+            // expect this
+        }
+        catch (Exception e)
+        {
+            // did not expect this
+            fail("unexpected exception " + e);
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+    }
+
+    /**
+     * testSc003Sync_8 - Test 8 faulting echo with mu
+     * Participant sends a faulting echo with a must understand and traps a fault response.
+     * @throws Exception unless the correct fault is caught.
+     */
+    public void testSc003Sync_8()
+        throws Exception
+    {
+        final String conversationId = getConversationId() ;
+        try
+        {
+            final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+            final String action = Sc003Constants.SC003_ACTION_ECHO;
+            SessionDataType session = new SessionDataType();
+            EchoType echoType = new EchoType();
+            String messageId = MessageId.getMessageId();
+            session.setID("0");
+            echoType.setText("fault");
+            EchoResponseType result = Sc003Client.getSc003Port(serviceURI, "", null, messageId, conversationId, action, true).echo(echoType, session);
+            fail("faulting echo expected fault! got " + result.getText());
+        }
+        catch (SOAPFaultException sfe)
+        {
+            // expected this
+        }
+        catch (ProtocolException pe)
+        {
+            // did not expect this
+            fail("unexpected protocol exception " + pe);
+        }
+        catch (WebServiceException wse)
+        {
+            // did not expect this
+            fail("unexpected web service exception " + wse);
+        }
+        catch (Exception e)
+        {
+            // did not expect this
+            fail("unexpected exception " + e);
+        }
+        finally
+        {
+            ProxyConversation.clearConversationState(conversationId) ;
+        }
+    }
+
+    static
+    {
+        final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+        SC003_SERVICE_URI = serviceRegistry.getServiceURI(Sc003Constants.SERVICE_SC003) ;
+    }
+}
\ No newline at end of file

Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/test/TestConstants.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/test/TestConstants.java	2008-08-18 09:28:26 UTC (rev 21598)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/test/TestConstants.java	2008-08-18 10:42:14 UTC (rev 21599)
@@ -49,6 +49,18 @@
      */
     public static final String NAME_ALL_TESTS_SC002 = "allSc002" ;
     /**
+     * test name for all Sc003 tests
+     */
+    public static final String NAME_ALL_TESTS_SC003 = "allSc003" ;
+    /**
+     * test name for all Sc003 Sync tests
+     */
+    public static final String NAME_ALL_TESTS_SC003_SYNC = "allSc003Sync" ;
+    /**
+     * test name for all Sc003 Async tests
+     */
+    public static final String NAME_ALL_TESTS_SC003_ASYNC = "allSc003ASync" ;
+    /**
      * The prefix for all Sc007 (AT) tests.
      */
     public static final String PREFIX_TESTS_AT = "testSc007" ;
@@ -57,6 +69,21 @@
      */
     public static final String PREFIX_TESTS_SC002 = "testSc002" ;
 
+    /**
+     * The prefix for all Sc003 tests.
+     */
+    public static final String PREFIX_TESTS_SC003 = "testSc003" ;
+
+    /**
+     * The prefix for all synchronous Sc003 tests.
+     */
+    public static final String PREFIX_TESTS_SC003_SYNC = "testSc003Sync" ;
+
+    /**
+     * The prefix for all asynchronous Sc003 tests.
+     */
+    public static final String PREFIX_TESTS_SC003_ASYNC = "testSc003Async" ;
+
     /* Sc002 scenario defs */
 
     /**
@@ -144,4 +171,165 @@
 
         DESCRIPTIONS_SC002 = descriptionsSc002 ;
     }
+
+    /**
+     * test name for Sc003 Scenario 1
+     */
+    public static final String NAME_TEST_SC003_1 = PREFIX_TESTS_SC003_SYNC + "_1" ;
+    /**
+     * test description for Sc003 Scenario 1
+     */
+    public static final String DESCRIPTION_TEST_SC003_1 = "1 - Simple Notify : notify(\"Hello-\")"  ;
+    /**
+     * test name for Sc003 Scenario 2
+     */
+    public static final String NAME_TEST_SC003_2 = PREFIX_TESTS_SC003_SYNC + "_2" ;
+    /**
+     * test description for Sc003 Scenario 2
+     */
+    public static final String DESCRIPTION_TEST_SC003_2 = "1 - Faulting Notify : notify(\"fault\")"  ;
+    /**
+     * test name for Sc003 Scenario 3
+     */
+    public static final String NAME_TEST_SC003_3 = PREFIX_TESTS_SC003_SYNC + "_3" ;
+    /**
+     * test description for Sc003 Scenario 3
+     */
+    public static final String DESCRIPTION_TEST_SC003_3 = "1 - Simple Echo : echo(\"World\")"  ;
+    /**
+     * test name for Sc003 Scenario 4
+     */
+    public static final String NAME_TEST_SC003_4 = PREFIX_TESTS_SC003_SYNC + "_4" ;
+    /**
+     * test description for Sc003 Scenario 4
+     */
+    public static final String DESCRIPTION_TEST_SC003_4 = "1 - Faulting Echo : echo(\"fault\")"  ;
+    /**
+     * test name for Sc003 Scenario 5
+     */
+    public static final String NAME_TEST_SC003_5 = PREFIX_TESTS_SC003_SYNC + "_5" ;
+    /**
+     * test description for Sc003 Scenario 5
+     */
+    public static final String DESCRIPTION_TEST_SC003_5 = "1 - Simple Notify + mu : notify(\"Hello-\")"  ;
+    /**
+     * test name for Sc003 Scenario 6
+     */
+    public static final String NAME_TEST_SC003_6 = PREFIX_TESTS_SC003_SYNC + "_6" ;
+    /**
+     * test description for Sc003 Scenario 2
+     */
+    public static final String DESCRIPTION_TEST_SC003_6 = "1 - Faulting Notify + mu : notify(\"fault\")"  ;
+    /**
+     * test name for Sc003 Scenario 7
+     */
+    public static final String NAME_TEST_SC003_7 = PREFIX_TESTS_SC003_SYNC + "_7" ;
+    /**
+     * test description for Sc003 Scenario 7
+     */
+    public static final String DESCRIPTION_TEST_SC003_7 = "1 - Simple Echo + mu : echo(\"World\")"  ;
+    /**
+     * test name for Sc003 Scenario 4
+     */
+    public static final String NAME_TEST_SC003_8 = PREFIX_TESTS_SC003_SYNC + "_8" ;
+    /**
+     * test description for Sc003 Scenario 8
+     */
+    public static final String DESCRIPTION_TEST_SC003_8 = "1 - Faulting Echo + mu : echo(\"fault\")"  ;
+
+    /**
+     * test name for Sc003 Scenario 1
+     */
+    public static final String NAME_TEST_SC003_ASYNC_1 = PREFIX_TESTS_SC003_ASYNC + "_1" ;
+    /**
+     * test description for Sc003 Scenario 1
+     */
+    public static final String DESCRIPTION_TEST_SC003_ASYNC_1 = "1 - Simple Notify : notify(\"Hello-\")"  ;
+    /**
+     * test name for Sc003 Scenario 2
+     */
+    public static final String NAME_TEST_SC003_ASYNC_2 = PREFIX_TESTS_SC003_ASYNC + "_2" ;
+    /**
+     * test description for Sc003 Scenario 2
+     */
+    public static final String DESCRIPTION_TEST_SC003_ASYNC_2 = "1 - Faulting Notify : notify(\"fault\")"  ;
+    /**
+     * test name for Sc003 Scenario 3
+     */
+    public static final String NAME_TEST_SC003_ASYNC_3 = PREFIX_TESTS_SC003_ASYNC + "_3" ;
+    /**
+     * test description for Sc003 Scenario 3
+     */
+    public static final String DESCRIPTION_TEST_SC003_ASYNC_3 = "1 - Simple Echo : echo(\"World\")"  ;
+    /**
+     * test name for Sc003 Scenario 4
+     */
+    public static final String NAME_TEST_SC003_ASYNC_4 = PREFIX_TESTS_SC003_ASYNC + "_4" ;
+    /**
+     * test description for Sc003 Scenario 4
+     */
+    public static final String DESCRIPTION_TEST_SC003_ASYNC_4 = "1 - Faulting Echo : echo(\"fault\")"  ;
+    /**
+     * test name for Sc003 Scenario 5
+     */
+    public static final String NAME_TEST_SC003_ASYNC_5 = PREFIX_TESTS_SC003_ASYNC + "_5" ;
+    /**
+     * test description for Sc003 Scenario 5
+     */
+    public static final String DESCRIPTION_TEST_SC003_ASYNC_5 = "1 - Simple Notify + mu : notify(\"Hello-\")"  ;
+    /**
+     * test name for Sc003 Scenario 6
+     */
+    public static final String NAME_TEST_SC003_ASYNC_6 = PREFIX_TESTS_SC003_ASYNC + "_6" ;
+    /**
+     * test description for Sc003 Scenario 2
+     */
+    public static final String DESCRIPTION_TEST_SC003_ASYNC_6 = "1 - Faulting Notify + mu : notify(\"fault\")"  ;
+    /**
+     * test name for Sc003 Scenario 7
+     */
+    public static final String NAME_TEST_SC003_ASYNC_7 = PREFIX_TESTS_SC003_ASYNC + "_7" ;
+    /**
+     * test description for Sc003 Scenario 7
+     */
+    public static final String DESCRIPTION_TEST_SC003_ASYNC_7 = "1 - Simple Echo + mu : echo(\"World\")"  ;
+    /**
+     * test name for Sc003 Scenario 4
+     */
+    public static final String NAME_TEST_SC003_ASYNC_8 = PREFIX_TESTS_SC003_ASYNC + "_8" ;
+    /**
+     * test description for Sc003 Scenario 8
+     */
+    public static final String DESCRIPTION_TEST_SC003_ASYNC_8 = "1 - Faulting Echo + mu : echo(\"fault\")"  ;
+
+    /**
+     * The Sc003 name to description map.
+     */
+    public static final Map DESCRIPTIONS_SC003 ;
+
+    static
+    {
+        final TreeMap descriptionsSc003 = new TreeMap() ;
+
+        descriptionsSc003.put(NAME_TEST_SC003_1, DESCRIPTION_TEST_SC003_1) ;
+        descriptionsSc003.put(NAME_TEST_SC003_2, DESCRIPTION_TEST_SC003_2) ;
+        descriptionsSc003.put(NAME_TEST_SC003_3, DESCRIPTION_TEST_SC003_3) ;
+        descriptionsSc003.put(NAME_TEST_SC003_4, DESCRIPTION_TEST_SC003_4) ;
+        descriptionsSc003.put(NAME_TEST_SC003_5, DESCRIPTION_TEST_SC003_5) ;
+        descriptionsSc003.put(NAME_TEST_SC003_6, DESCRIPTION_TEST_SC003_6) ;
+        descriptionsSc003.put(NAME_TEST_SC003_7, DESCRIPTION_TEST_SC003_7) ;
+        descriptionsSc003.put(NAME_TEST_SC003_8, DESCRIPTION_TEST_SC003_8) ;
+
+        descriptionsSc003.put(NAME_TEST_SC003_ASYNC_1, DESCRIPTION_TEST_SC003_ASYNC_1) ;
+        descriptionsSc003.put(NAME_TEST_SC003_ASYNC_2, DESCRIPTION_TEST_SC003_ASYNC_2) ;
+        descriptionsSc003.put(NAME_TEST_SC003_ASYNC_3, DESCRIPTION_TEST_SC003_ASYNC_3) ;
+        descriptionsSc003.put(NAME_TEST_SC003_ASYNC_4, DESCRIPTION_TEST_SC003_ASYNC_4) ;
+        descriptionsSc003.put(NAME_TEST_SC003_ASYNC_5, DESCRIPTION_TEST_SC003_ASYNC_5) ;
+        descriptionsSc003.put(NAME_TEST_SC003_ASYNC_6, DESCRIPTION_TEST_SC003_ASYNC_6) ;
+        descriptionsSc003.put(NAME_TEST_SC003_ASYNC_7, DESCRIPTION_TEST_SC003_ASYNC_7) ;
+        descriptionsSc003.put(NAME_TEST_SC003_ASYNC_8, DESCRIPTION_TEST_SC003_ASYNC_8) ;
+
+        DESCRIPTIONS_SC003 = descriptionsSc003 ;
+    }
+
 }
\ No newline at end of file

Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/test/TestRunner.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/test/TestRunner.java	2008-08-18 09:28:26 UTC (rev 21598)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/test/TestRunner.java	2008-08-18 10:42:14 UTC (rev 21599)
@@ -28,6 +28,16 @@
     private static final Class SC002_TEST_CLASS = Sc002TestCase.class ;
 
     /**
+     * The Sc003 test class.
+     */
+    private static final Class SC003_TEST_CLASS = Sc003TestCase.class ;
+
+    /**
+     * The Sc003 async test class.
+     */
+    private static final Class SC003_TEST_CLASS_ASYNC = Sc003AsyncTestCase.class ;
+
+    /**
      * Execute the specific test against the specified participant.
      * @param participantURI The URI of the participant.
      * @param testTimeout The test timeout.
@@ -45,9 +55,28 @@
             testSuite.addTest(new InteropTestSuite(participantURI, testTimeout, asyncTest, SC002_TEST_CLASS)) ;
             test = testSuite ;
         }
-        else if (testName.startsWith(TestConstants.PREFIX_TESTS_SC002))
+        else if (TestConstants.NAME_ALL_TESTS_SC003.equals(testName))
         {
-            final Class testClass = SC002_TEST_CLASS;
+            final TestSuite testSuite = new TestSuite() ;
+            testSuite.addTest(new InteropTestSuite(participantURI, testTimeout, asyncTest, SC003_TEST_CLASS)) ;
+            testSuite.addTest(new InteropTestSuite(participantURI, testTimeout, asyncTest, SC003_TEST_CLASS_ASYNC)) ;
+            test = testSuite ;
+        }
+        else if (TestConstants.NAME_ALL_TESTS_SC003_SYNC.equals(testName))
+        {
+            final TestSuite testSuite = new TestSuite() ;
+            testSuite.addTest(new InteropTestSuite(participantURI, testTimeout, asyncTest, SC003_TEST_CLASS)) ;
+            test = testSuite ;
+        }
+        else if (TestConstants.NAME_ALL_TESTS_SC003_ASYNC.equals(testName))
+        {
+            final TestSuite testSuite = new TestSuite() ;
+            testSuite.addTest(new InteropTestSuite(participantURI, testTimeout, asyncTest, SC003_TEST_CLASS_ASYNC)) ;
+            test = testSuite ;
+        }
+        else if (testName.startsWith(TestConstants.PREFIX_TESTS_SC003_SYNC))
+        {
+            final Class testClass = SC003_TEST_CLASS;
             try
             {
                 test = createTest(testClass, participantURI, testTimeout, asyncTest, testName) ;
@@ -58,6 +87,19 @@
                 return null ;
             }
         }
+        else if (testName.startsWith(TestConstants.PREFIX_TESTS_SC003_ASYNC))
+        {
+            final Class testClass = SC003_TEST_CLASS_ASYNC;
+            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) ;

Added: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/common/EchoService.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/common/EchoService.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/common/EchoService.java	2008-08-18 10:42:14 UTC (rev 21599)
@@ -0,0 +1,298 @@
+package com.jboss.transaction.wstf.webservices.common;
+
+import javax.xml.ws.WebServiceException;
+import java.util.*;
+
+/**
+ * Class which implements the back end service for the WSTF Sc002 and Sc003 basic web service
+ */
+public class EchoService
+{
+    /******************************************************************************************/
+    /* public API                                                                             */
+    /******************************************************************************************/
+
+    /**
+     * obtain a handle on the echo service singleton
+     *
+     * @return the echo service singleton
+     */
+    public static EchoService getEchoService()
+    {
+        return echoServiceSingleton;
+    }
+
+    /**
+     * implements the begin operation by ensuring that a session exists
+     * @param id the session to reate if not already present
+     */
+    public void beginSession(String id)
+    {
+        // n.b. we don't actually check that the session is not present although this is
+        // sort of implied in the spec
+        getSession(id);
+    }
+
+    /**
+     * implements the notify operation by creating a session if needed then appending the
+     * supplied text to it
+     * @param id the session with which the text is associated
+     * @param text the text to be appended to the session
+     */
+    public void notify(String id, String text)
+    {
+        Session session = getSession(id);
+
+        session.appendText(text);
+    }
+
+    /**
+     * implements the echo operation by creating a session if needed then appending the
+     * supplied text to it and returning the resulting text, purging the session on the
+     * way out.
+     * @param id the session with which the text is associated
+     * @param text the text to be appended to the session
+     * @return the accumulated text for the session
+     */
+    public String echo(String id, String text)
+    {
+        Session session = getSession(id);
+
+        String result = session.appendText(text);
+
+        // n.b. we don't concern ourselves with the possibility that a concurrent update
+        // to the session might happen before we can purge it
+
+        purgeSession(session);
+
+        return result;
+    }
+
+    /**
+     * implements the end operation by purging a session from the session map
+     * @param id the session to be purged
+     * @throws javax.xml.ws.WebServiceException if the session is not found
+     */
+    public void end(String id) throws WebServiceException
+    {
+        Session session = getSession(id, false);
+        if (session != null) {
+            purgeSession(session);
+        } else {
+            throw new WebServiceException("unknown session " + id);
+        }
+    }
+
+    /**
+     * retrieve an existing session with the given id or create a new one if there is not
+     * one already present.
+     * @param id the id of the desired session
+     * @return  an existing session with the given id or a new one if there is not one
+     * already present.
+     */
+    public Session getSession(String id)
+    {
+        return getSession(id, true);
+    }
+
+    /**
+     * retrieve an existing session with the given id or else either create a new one if there
+     * is not one already present or return null depending upon whether create is, respectively,
+     * true or false.
+     * @param id the id of the desired session
+     * @param create true if a new session shoudl be created if none is found
+     * @return an existing session with the given id or a new one if there is not one
+     * already present and create is true or null if there is not one already present and
+     * create si false.
+     */
+    public Session getSession(String id, boolean create)
+    {
+        Session session;
+
+        synchronized (sessionMap) {
+            session = sessionMap.get(id);
+            if (session == null && create) {
+                session = new Session(id);
+                sessionMap.put(id, session);
+                timeouts.add(session);
+            }
+
+            // purge any timed out sessions while we are here
+
+            long timeNow = System.currentTimeMillis();
+
+            while (!timeouts.isEmpty()) {
+                Session first = timeouts.first();
+                if (first.bestBefore < timeNow) {
+                    sessionMap.remove(first);
+                    timeouts.remove(first);
+                } else {
+                    break;
+                }
+            }
+        }
+
+        return session;
+    }
+
+    /**
+     * remove a session from the session map and timeouts list if it is present and take
+     * the opportunity to garbage collect any sessions whose bestBeforeDtae has now expired.
+     * @param session
+     */
+    public void purgeSession(Session session)
+    {
+        synchronized (sessionMap) {
+            if (sessionMap.remove(session.getId()) != null) {
+                // means there must also be an entry in timeouts
+                timeouts.remove(session);
+            }
+        }
+    }
+
+    /******************************************************************************************/
+    /* private implementation of service                                                      */
+    /******************************************************************************************/
+
+    /**
+     * a singleton instance which is used by both the Sc002 and Sc003 ports
+     */
+    private static EchoService echoServiceSingleton = new EchoService();
+
+    /**
+     * a private constructor so only the static singleton can be created
+     */
+    private EchoService()
+    {
+    }
+
+    /**
+     * a map containing all currently active sessions keyed by session id
+     */
+    private static HashMap<String, Session> sessionMap = new HashMap<String, Session>();
+    /**
+     * a sorted set of all active sessions sorted by earliest bestBeforeDate
+     *
+     * n.b. updates to this map only occur when synchronized on sessionMap since both fields
+     * must always contain exactly the same set of elements
+     */
+    private SortedSet<Session> timeouts = new TreeSet<Session>();
+
+    /**
+     * class used to respresent an active client session keyed by the session id supplied
+     * in the begin, echo, notify and end messages
+     */
+    class Session implements Comparable
+    {
+        /**
+         * timeout in milliseconds after which we may legitimately purge data associated
+         * with a given session
+         */
+        static final long TIMEOUT = 50 * 1000; // milliseconds
+        /**
+         * the key used to identify a session
+         */
+        private String id;
+        /**
+         * the text string accumulated from requests associated with this session
+         */
+        private String text;
+        /**
+         * the sytsem time (in milliseconds) after which this session can legitimately be purged
+         */
+        private long bestBefore; // system time in milliseconds
+
+        /**
+         * create a session with the given identifier
+         * @param id the session identifier
+         */
+        Session(String id)
+        {
+            this.id = id;
+            this.text = null;
+            this.bestBefore = System.currentTimeMillis() + TIMEOUT;
+        }
+
+        /**
+         * Compares this object with the specified object for order.  Returns a
+         * negative integer, zero, or a positive integer as this object is less
+         * than, equal to, or greater than the specified object.<p>
+         * <p/>
+         * In the foregoing description, the notation
+         * <tt>sgn(</tt><i>expression</i><tt>)</tt> designates the mathematical
+         * <i>signum</i> function, which is defined to return one of <tt>-1</tt>,
+         * <tt>0</tt>, or <tt>1</tt> according to whether the value of <i>expression</i>
+         * is negative, zero or positive.
+         * <p/>
+         * The implementor must ensure <tt>sgn(x.compareTo(y)) ==
+         * -sgn(y.compareTo(x))</tt> for all <tt>x</tt> and <tt>y</tt>.  (This
+         * implies that <tt>x.compareTo(y)</tt> must throw an exception iff
+         * <tt>y.compareTo(x)</tt> throws an exception.)<p>
+         * <p/>
+         * The implementor must also ensure that the relation is transitive:
+         * <tt>(x.compareTo(y)&gt;0 &amp;&amp; y.compareTo(z)&gt;0)</tt> implies
+         * <tt>x.compareTo(z)&gt;0</tt>.<p>
+         * <p/>
+         * Finally, the implementer must ensure that <tt>x.compareTo(y)==0</tt>
+         * implies that <tt>sgn(x.compareTo(z)) == sgn(y.compareTo(z))</tt>, for
+         * all <tt>z</tt>.<p>
+         * <p/>
+         * It is strongly recommended, but <i>not</i> strictly required that
+         * <tt>(x.compareTo(y)==0) == (x.equals(y))</tt>.  Generally speaking, any
+         * class that implements the <tt>Comparable</tt> interface and violates
+         * this condition should clearly indicate this fact.  The recommended
+         * language is "Note: this class has a natural ordering that is
+         * inconsistent with equals."
+         *
+         * @param o the Object to be compared.
+         * @return a negative integer, zero, or a positive integer as this object
+         *         is less than, equal to, or greater than the specified object.
+         * @throws ClassCastException if the specified object's type prevents it
+         *                            from being compared to this Object.
+         */
+        public int compareTo(Object o) {
+            Session other = (Session)o;
+
+            if (this.bestBefore < other.bestBefore) {
+                return -1;
+            }
+            if (this.bestBefore > other.bestBefore) {
+                return 1;
+            }
+
+            return 0;
+        }
+
+        /**
+         * get the identifier for this session
+         * @return the identifier for this session
+         */
+        public String getId()
+        {
+            return id;
+        }
+
+        /**
+         * get the text string accumulated from requests associated with this session or
+         * the empty string if no requests have been made yet
+         * @return the accumulated text
+         */
+        public synchronized String getText()
+        {
+            return (text == null ? "" : text);
+        }
+
+        /**
+         * append a string to the text string accumulated from requests associated with this
+         * session trimming any whitespace before appending it
+         * @param text the text to be trimmed and appended
+         * @return the new value of the accumulated text
+         */
+        public synchronized String appendText(String text)
+        {
+            this.text = (this.text == null ? text.trim() : this.text + text.trim());
+
+            return this.text;
+        }
+    }
+}

Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc002/sei/Sc002PortImpl.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc002/sei/Sc002PortImpl.java	2008-08-18 09:28:26 UTC (rev 21598)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc002/sei/Sc002PortImpl.java	2008-08-18 10:42:14 UTC (rev 21599)
@@ -9,6 +9,8 @@
 import javax.xml.namespace.QName;
 import java.util.*;
 
+import com.jboss.transaction.wstf.webservices.common.EchoService;
+
 /**
  * Imnplementation class for WSTF scenario sc002 port SEI Scoo2Port
  */
@@ -32,7 +34,7 @@
     BeginType begin, @WebParam(name = "SessionData", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", header = true, partName = "SessionData")
     SessionDataType sessionData) {
         String id = sessionData.getID();
-        beginSession(id);
+        echoService.beginSession(id);
         return new BeginResponseType();
     }
 
@@ -50,7 +52,7 @@
         if (FAULTSTRING.equals(text)) {
             throw new WebServiceException("faultingNotify");
         } else {
-            notify(id, text);
+            echoService.notify(id, text);
         }
     }
 
@@ -69,7 +71,7 @@
         if (FAULTSTRING.equals(text)) {
             throw new WebServiceException("faultingEcho");
         } else {
-            String replyText = echo(id, text);
+            String replyText = echoService.echo(id, text);
             EchoResponseType response = new EchoResponseType();
             response.setText(replyText);
             return response;
@@ -87,7 +89,7 @@
     EndType end, @WebParam(name = "SessionData", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", header = true, partName = "SessionData")
     SessionDataType sessionData) {
         String id = sessionData.getID();
-        end(id);
+        echoService.end(id);
         return new EndResponseType();
     }
 
@@ -105,207 +107,7 @@
         return new SendMessagesResponseType();
     }
 
-    /******************************************************************************************/
-    /* implementation of service                                                              */
-    /******************************************************************************************/
-
     /**
-     * class used to respresent an active client session keyed by the session id supplied
-     * in the begin, echo, notify and end messages
-     */
-    class Session implements Comparable
-    {
-        /**
-         * timeout in milliseconds after which we may legitimately purge data associated
-         * with a given session
-         */
-        static final long TIMEOUT = 50 * 1000; // milliseconds
-        /**
-         * the key used to identify a session
-         */
-        private String id;
-        /**
-         * the text string accumulated from requests associated with this session
-         */
-        private String text;
-        /**
-         * the sytsem time (in milliseconds) after which this session can legitimately be purged
-         */
-        private long bestBefore; // system time in milliseconds
-
-        /**
-         * create a session with the given identifier
-         * @param id the session identifier
-         */
-        Session(String id)
-        {
-            this.id = id;
-            this.text = null;
-            this.bestBefore = System.currentTimeMillis() + TIMEOUT;
-        }
-
-        /**
-         * Compares this object with the specified object for order.  Returns a
-         * negative integer, zero, or a positive integer as this object is less
-         * than, equal to, or greater than the specified object.<p>
-         * <p/>
-         * In the foregoing description, the notation
-         * <tt>sgn(</tt><i>expression</i><tt>)</tt> designates the mathematical
-         * <i>signum</i> function, which is defined to return one of <tt>-1</tt>,
-         * <tt>0</tt>, or <tt>1</tt> according to whether the value of <i>expression</i>
-         * is negative, zero or positive.
-         * <p/>
-         * The implementor must ensure <tt>sgn(x.compareTo(y)) ==
-         * -sgn(y.compareTo(x))</tt> for all <tt>x</tt> and <tt>y</tt>.  (This
-         * implies that <tt>x.compareTo(y)</tt> must throw an exception iff
-         * <tt>y.compareTo(x)</tt> throws an exception.)<p>
-         * <p/>
-         * The implementor must also ensure that the relation is transitive:
-         * <tt>(x.compareTo(y)&gt;0 &amp;&amp; y.compareTo(z)&gt;0)</tt> implies
-         * <tt>x.compareTo(z)&gt;0</tt>.<p>
-         * <p/>
-         * Finally, the implementer must ensure that <tt>x.compareTo(y)==0</tt>
-         * implies that <tt>sgn(x.compareTo(z)) == sgn(y.compareTo(z))</tt>, for
-         * all <tt>z</tt>.<p>
-         * <p/>
-         * It is strongly recommended, but <i>not</i> strictly required that
-         * <tt>(x.compareTo(y)==0) == (x.equals(y))</tt>.  Generally speaking, any
-         * class that implements the <tt>Comparable</tt> interface and violates
-         * this condition should clearly indicate this fact.  The recommended
-         * language is "Note: this class has a natural ordering that is
-         * inconsistent with equals."
-         *
-         * @param o the Object to be compared.
-         * @return a negative integer, zero, or a positive integer as this object
-         *         is less than, equal to, or greater than the specified object.
-         * @throws ClassCastException if the specified object's type prevents it
-         *                            from being compared to this Object.
-         */
-        public int compareTo(Object o) {
-            Session other = (Session)o;
-
-            if (this.bestBefore < other.bestBefore) {
-                return -1;
-            }
-            if (this.bestBefore > other.bestBefore) {
-                return 1;
-            }
-
-            return 0;
-        }
-
-        /**
-         * get the identifier for this session
-         * @return the identifier for this session
-         */
-        public String getId()
-        {
-            return id;
-        }
-
-        /**
-         * get the text string accumulated from requests associated with this session or
-         * the empty string if no requests have been made yet
-         * @return the accumulated text
-         */
-        public synchronized String getText()
-        {
-            return (text == null ? "" : text);
-        }
-
-        /**
-         * append a string to the text string accumulated from requests associated with this
-         * session trimming any whitespace before appending it
-         * @param text the text to be trimmed and appended
-         * @return the new value of the accumulated text
-         */
-        public synchronized String appendText(String text)
-        {
-            this.text = (this.text == null ? text.trim() : this.text + text.trim());
-
-            return this.text;
-        }
-    }
-
-    /**
-     * a text string which causes a fault to be thrown when supplied as the argument to an
-     * echo or notify request
-     */
-    final private static String FAULTSTRING = "fault";
-    /**
-     * a map containing all currently active sessions keyed by session id
-     */
-    private static HashMap<String, Session> sessionMap = new HashMap<String, Session>();
-    /**
-     * a sorted set of all active sessions sorted by earliest bestBeforeDate
-     *
-     * n.b. updates to this map only occur when synchronized on sessionMap since both fields
-     * must always contain exactly the same set of elements
-     */
-    private SortedSet<Session> timeouts = new TreeSet<Session>();
-
-    /**
-     * implements the begin operation by ensuring that a session exists
-     * @param id the session to reate if not already present
-     */
-    private void beginSession(String id)
-    {
-        // n.b. we don't actually check that the session is not present although this is
-        // sort of implied in the spec
-        getSession(id);
-    }
-
-    /**
-     * implements the notify operation by creating a session if needed then appending the
-     * supplied text to it
-     * @param id the session with which the text is associated
-     * @param text the text to be appended to the session
-     */
-    private void notify(String id, String text)
-    {
-        Session session = getSession(id);
-
-        session.appendText(text);
-    }
-
-    /**
-     * implements the echo operation by creating a session if needed then appending the
-     * supplied text to it and returning the resulting text, purging the session on the
-     * way out.
-     * @param id the session with which the text is associated
-     * @param text the text to be appended to the session
-     * @return the accumulated text for the session
-     */
-    private String echo(String id, String text)
-    {
-        Session session = getSession(id);
-
-        String result = session.appendText(text);
-
-        // n.b. we don't concern ourselves with the possibility that a concurrent update
-        // to the session might happen before we can purge it
-
-        purgeSession(session);
-
-        return result;
-    }
-
-    /**
-     * implements the end operation by purging a session from the session map
-     * @param id the session to be purged
-     * @throws WebServiceException if the session is not found
-     */
-    private void end(String id) throws WebServiceException
-    {
-        Session session = getSession(id, false);
-        if (session != null) {
-            purgeSession(session);
-        } else {
-            throw new WebServiceException("unknown session " + id);
-        }
-    }
-
-    /**
      * implements the sendMessages operation by queueing a task to post the messages to the
      * supplied endpoint
      * @param epr an endpoint which implements the required service/port
@@ -325,75 +127,18 @@
                     QName serviceName = message.getService();
                     String portName = message.getPort();
                     String operationName = message.getOperation();
+
+                    // do something with the message!
                 }
             }
         };
     }
 
-    /**
-     * retrieve an existing session with the given id or create a new one if there is not
-     * one already present.
-     * @param id the id of the desired session
-     * @return  an existing session with the given id or a new one if there is not one
-     * already present.
-     */
-    private Session getSession(String id)
-    {
-        return getSession(id, true);
-    }
+    private EchoService echoService = EchoService.getEchoService();
 
     /**
-     * retrieve an existing session with the given id or else either create a new one if there
-     * is not one already present or return null depending upon whether create is, respectively,
-     * true or false.
-     * @param id the id of the desired session
-     * @param create true if a new session shoudl be created if none is found
-     * @return an existing session with the given id or a new one if there is not one
-     * already present and create is true or null if there is not one already present and
-     * create si false.
+     * a text string which causes a fault to be thrown when supplied as the argument to an
+     * echo or notify request
      */
-    private Session getSession(String id, boolean create)
-    {
-        Session session;
-
-        synchronized (sessionMap) {
-            session = sessionMap.get(id);
-            if (session == null && create) {
-                session = new Session(id);
-                sessionMap.put(id, session);
-                timeouts.add(session);
-            }
-
-            // purge any timed out sessions while we are here
-
-            long timeNow = System.currentTimeMillis();
-
-            while (!timeouts.isEmpty()) {
-                Session first = timeouts.first();
-                if (first.bestBefore < timeNow) {
-                    sessionMap.remove(first);
-                    timeouts.remove(first);
-                } else {
-                    break;
-                }
-            }
-        }
-
-        return session;
-    }
-
-    /**
-     * remove a session from the session map and timeouts list if it is present and take
-     * the opportunity to garbage collect any sessions whose bestBeforeDtae has now expired.
-     * @param session
-     */
-    private void purgeSession(Session session)
-    {
-        synchronized (sessionMap) {
-            if (sessionMap.remove(session.getId()) != null) {
-                // means there must also be an entry in timeouts
-                timeouts.remove(session);
-            }
-        }
-    }
+    final private static String FAULTSTRING = "fault";
 }

Copied: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/Sc003Constants.java (from rev 21545, labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc002/Sc002Constants.java)
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/Sc003Constants.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/Sc003Constants.java	2008-08-18 10:42:14 UTC (rev 21599)
@@ -0,0 +1,72 @@
+package com.jboss.transaction.wstf.webservices.sc003;
+
+import com.jboss.transaction.wstf.webservices.sc002.Sc002Constants;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Interface containing WS-TX AT Interop constants.
+ */
+public interface Sc003Constants
+{
+    /**
+     * The sc003 Namespace.
+     */
+    final static public String SC003_NAMESPACE = "http://www.wstf.org/docs/scenarios/sc003" ;
+    /**
+     * The sc003 namespace prefix.
+     */
+    final static public String SC003_PREFIX = "sc003" ;
+
+    /**
+     * The sc003 test initiator service name.
+     */
+    final static public String SERVICE_SC003 = "Sc003Service" ;
+
+    /**
+     * The sc003 test response service name.
+     */
+    final static public String SERVICE_SC003_RESPONSE = "Sc003ResponseService" ;
+
+    /**
+     * The sc003 test response service qname.
+     */
+    final static public QName SERVICE_SC003_RESPONSE_QNAME = new QName(SC003_NAMESPACE, SERVICE_SC003_RESPONSE, SC003_PREFIX);
+
+    /**
+     * The sc003 SOAP 1.1 port name for both Sc003 and Sc003Response services.
+     */
+    final static public String SC003_SOAP11_PORT_NAME = "soap11port" ;
+
+    /**
+     * The sc003 SOAP 1.1 port qname for both Sc003 and Sc003Response services.
+     */
+    final static public QName SC003_SOAP11_PORT_QNAME = new QName(SC003_NAMESPACE, SC003_SOAP11_PORT_NAME, SC003_PREFIX);
+
+    /**
+     * The sc003 SOAP 1.2 port name for both Sc003 and Sc003Response services.
+     */
+    final static public String SC003_SOAP12_PORT_NAME = "soap12port" ;
+
+    /**
+     * The sc003 SOAP 1.2 port qname for both Sc003 and Sc003Response services.
+     */
+    final static public QName SC003_SOAP12_PORT_QNAME = new QName(SC003_NAMESPACE, SC003_SOAP12_PORT_NAME, SC003_PREFIX);
+
+    /**
+     * The sc003 Conversation Id reference parameter element qname.
+     */
+    final static public String SC003_ELEMENT_CONVERSATIONID_NAME = "ConversationId" ;
+    /**
+     * The sc003 Conversation Id reference parameter element qname.
+     */
+    final static public QName SC003_ELEMENT_CONVERSATIONID_QNAME = new QName(SC003_NAMESPACE, SC003_ELEMENT_CONVERSATIONID_NAME, SC003_PREFIX);
+    /**
+     * The sc003 Notify action
+     */
+    final static public String SC003_ACTION_NOTIFY = SC003_NAMESPACE + "/Notify";
+    /**
+     * The sc003 Echo action
+     */
+    final static public String SC003_ACTION_ECHO = SC003_NAMESPACE + "/Echo";
+}
\ No newline at end of file

Copied: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/Sc003Client.java (from rev 21545, labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc002/client/Sc002Client.java)
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/Sc003Client.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/Sc003Client.java	2008-08-18 10:42:14 UTC (rev 21599)
@@ -0,0 +1,187 @@
+package com.jboss.transaction.wstf.webservices.sc003.client;
+
+import org.wstf.docs.scenarios.sc003.Sc003Service;
+import org.wstf.docs.scenarios.sc003.Sc003Port;
+import org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler;
+
+import javax.xml.ws.addressing.*;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
+import javax.xml.ws.soap.AddressingFeature;
+import javax.xml.ws.handler.Handler;
+import javax.xml.soap.SOAPFactory;
+import javax.xml.soap.SOAPConstants;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.net.URISyntaxException;
+
+import com.jboss.transaction.wstf.webservices.sc002.Sc002Constants;
+import com.jboss.transaction.wstf.webservices.sc002.client.Sc002ClientHandler;
+import com.jboss.transaction.wstf.webservices.sc003.Sc003Constants;
+import com.jboss.transaction.wstf.webservices.ServiceRegistry;
+
+/**
+ * class to provide access to Sc003 service frmo Sc003 test code
+ */
+public class Sc003Client
+{
+    // TODO -- do we really need a thread local here or can we just use one service?
+    /**
+     *  thread local which maintains a per thread Sc002 service instance
+     */
+    private static ThreadLocal<Sc003Service> sc003Service = new ThreadLocal<Sc003Service>();
+
+    /**
+     *  builder used to construct addressing info for calls
+     */
+    private static AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+
+    /**
+     * fetch an Sc003 service unique to the current thread
+     * @return
+     */
+    private static synchronized Sc003Service getSc003Service()
+    {
+        if (sc003Service.get() == null) {
+            sc003Service.set(new Sc003Service());
+        }
+        return sc003Service.get();
+    }
+
+    /**
+     * get a port on which to invoke an Sc003 service operation configured with the required
+     * WS Addressing properties
+     * @param toUri the address of the service
+     * @param replyUri the address to reply to or null if no replyto should be set
+     * @param faultUri the address to fault to or null if no faultto should be set
+     * @param messageId the message id to use
+     * @param conversationId a value to use as a faultTo/replyTo SC003_CONVERSATIONID
+     * reference parameter and also to hang off the context so the client handler knows which
+     * conversation the message belongs to
+     * @param addMUHeader a boolean value which, if it is true, is hung of the context to make the
+     * cient handler add a header with must understand set to true, forcing an error at the
+     * server end and, if it is false, is ignored
+     * @return
+     */
+    public static Sc003Port getSc003Port(String toUri, String replyUri, String faultUri, String messageId, String conversationId, String action, boolean addMUHeader)
+    {
+        // TODO - we need the 2.1 verison of Service so we can specify that we want to use the WS Addressing feature
+        Sc003Service service = getSc003Service();
+        Sc003Port port = service.getPort(Sc003Constants.SC003_SOAP11_PORT_QNAME, Sc003Port.class, new AddressingFeature());
+        BindingProvider bindingProvider = (BindingProvider)port;
+        List<Handler> customHandlerChain = new ArrayList<Handler>();
+        // we need to add the WSAddressingClientHandler because the WSAddressing feature is
+        // not correctly installed with the current JBossWS
+        customHandlerChain.add(new WSAddressingClientHandler());
+        customHandlerChain.add(new Sc003ClientHandler());
+        bindingProvider.getBinding().setHandlerChain(customHandlerChain);
+
+        Map<String, Object> requestContext = bindingProvider.getRequestContext();
+        AddressingProperties addressingProperties;
+        addressingProperties = createAddressingProperties(toUri, replyUri, faultUri, messageId, conversationId, action);
+        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);
+        requestContext.put(Sc002Constants.SC002_CONVERSATION_IDENTIFIER, conversationId);
+        requestContext.put(Sc002Constants.SC002_ADDMU_HEADER, addMUHeader);
+
+        return port;
+    }
+
+    public static AddressingProperties createAddressingProperties(String toUri, String replyUri, String faultUri, String messageId, String conversationId, String action)
+    {
+        AddressingProperties addressingProperties = builder.newAddressingProperties();
+        try {
+            addressingProperties.setTo(builder.newURI(toUri));
+        } catch (URISyntaxException e) {
+            // ignore
+            System.out.println("exception setting To: " + toUri + " : " + e);
+        }
+        try {
+            addressingProperties.setMessageID(builder.newURI(messageId));
+        } catch (URISyntaxException e) {
+            // ignore
+            System.out.println("exception setting MessageId: " + messageId + " : " + e);
+        }
+        try {
+            addressingProperties.setAction(builder.newURI(action));
+        } catch (URISyntaxException e) {
+            // ignore
+            System.out.println("exception setting Action: " + messageId + " : " + e);
+        }
+        try {
+            if (replyUri == null) {
+                replyUri = builder.newAddressingConstants().getNoneURI();
+            } else if ("".equals(replyUri)) {
+                replyUri = builder.newAddressingConstants().getAnonymousURI();
+            }
+            AttributedURI reply = builder.newURI(replyUri);
+            EndpointReference replyTo= builder.newEndpointReference(reply.getURI());
+            SOAPElement refParam = createReferenceParameter(conversationId);
+            replyTo.getReferenceParameters().addElement(refParam);
+            addressingProperties.setReplyTo(replyTo);
+        } catch (URISyntaxException e) {
+            // ignore
+            System.out.println("exception setting ReplyTo: " + replyUri + " : " + e);
+        }
+        try {
+            if (faultUri != null) {
+                AttributedURI fault = builder.newURI(faultUri);
+                EndpointReference faultTo= builder.newEndpointReference(fault.getURI());
+                SOAPElement refParam = createReferenceParameter(conversationId);
+                faultTo.getReferenceParameters().addElement(refParam);
+                addressingProperties.setFaultTo(faultTo);
+            }
+        } catch (URISyntaxException e) {
+            // ignore
+            System.out.println("exception setting FaultTo: " + faultUri + " : " + e);
+        }
+
+        return addressingProperties;
+    }
+
+    public static W3CEndpointReference getSc003ResponseEndpoint(String conversationId)
+    {
+        ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry();
+        String address = serviceRegistry.getServiceURI(Sc003Constants.SERVICE_SC003_RESPONSE);
+        W3CEndpointReferenceBuilder endpointBuilder = new W3CEndpointReferenceBuilder();
+        endpointBuilder.serviceName(Sc003Constants.SERVICE_SC003_RESPONSE_QNAME);
+        endpointBuilder.endpointName(Sc003Constants.SC003_SOAP11_PORT_QNAME);
+        endpointBuilder.address(address);
+        SOAPElement element = createReferenceParameter(conversationId);
+        if (element != null) {
+            endpointBuilder.referenceParameter(element);
+        }
+        
+        return endpointBuilder.build();
+    }
+
+    public static SOAPElement createReferenceParameter(String conversationId)
+    {
+        try {
+            SOAPElement element = getSoapFactory().createElement(Sc003Constants.SC003_ELEMENT_CONVERSATIONID_QNAME);
+            element.addNamespaceDeclaration(Sc003Constants.SC003_PREFIX, Sc003Constants.SC003_NAMESPACE);
+            element.setValue(conversationId);
+            return element;
+        } catch (SOAPException se) {
+            // print warning and acrry on anyway
+            System.out.println("SOAP exception trying to add conversation id reference paramater : " + se);
+            return null;
+        }
+    }
+    private static SOAPFactory factory = null;
+
+    private synchronized static SOAPFactory getSoapFactory() throws SOAPException
+    {
+        if (factory == null) {
+            factory = SOAPFactory.newInstance(SOAPConstants.SOAP_1_1_PROTOCOL);
+        }
+
+        return factory;
+    }
+}
\ No newline at end of file

Copied: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/Sc003ClientHandler.java (from rev 21545, labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc002/client/Sc002ClientHandler.java)
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/Sc003ClientHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/Sc003ClientHandler.java	2008-08-18 10:42:14 UTC (rev 21599)
@@ -0,0 +1,166 @@
+package com.jboss.transaction.wstf.webservices.sc003.client;
+
+import com.jboss.transaction.wstf.webservices.sc002.Sc002Constants;
+import com.jboss.transaction.wstf.proxy.ProxyConversation;
+
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.namespace.QName;
+import javax.xml.soap.*;
+import java.util.Set;
+import java.util.Collections;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+/**
+ */
+public class Sc003ClientHandler 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 Collections.singleton(Sc002Constants.SC002_HEADER_SESSIONID_QNAME);
+    }
+
+    /**
+     * The <code>handleMessage</code> method is invoked for normal processing
+     * of inbound and outbound messages. Refer to the description of the handler
+     * framework in the JAX-WS specification for full details.
+     *
+     * @param context the message context.
+     * @return An indication of whether handler processing should continue for
+     *         the current message
+     *         <ul>
+     *         <li>Return <code>true</code> to continue
+     *         processing.</li>
+     *         <li>Return <code>false</code> to block
+     *         processing.</li>
+     *         </ul>
+     * @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)
+    {
+        SOAPMessage message = context.getMessage();
+
+        handleMustUnderstand(context, message);
+        handleConversation(context, message);
+
+        return true;
+    }
+
+    /**
+     * The <code>handleFault</code> method is invoked for fault message
+     * processing.  Refer to the description of the handler
+     * framework in the JAX-WS specification for full details.
+     *
+     * @param context the message context
+     * @return An indication of whether handler fault processing should continue
+     *         for the current message
+     *         <ul>
+     *         <li>Return <code>true</code> to continue
+     *         processing.</li>
+     *         <li>Return <code>false</code> to block
+     *         processing.</li>
+     *         </ul>
+     * @throws RuntimeException               Causes the JAX-WS runtime to cease
+     *                                        handler fault processing and dispatch the fault.
+     * @throws javax.xml.ws.ProtocolException Causes the JAX-WS runtime to cease
+     *                                        handler fault processing and dispatch the fault.
+     */
+    public boolean handleFault(SOAPMessageContext context)
+    {
+        SOAPMessage message = context.getMessage();
+
+        // no need to add must understand ehaders for faults just append to the conversation
+
+        handleConversation(context, message);
+
+        return true;
+    }
+
+    /**
+     * Called at the conclusion of a message exchange pattern just prior to
+     * the JAX-WS runtime disptaching a message, fault or exception.  Refer to
+     * the description of the handler
+     * framework in the JAX-WS specification for full details.
+     *
+     * @param context the message context
+     */
+    public void close(MessageContext context)
+    {
+        // do nothing
+    }
+
+    private void handleMustUnderstand(SOAPMessageContext context, SOAPMessage message)
+    {
+        // if this is outbound and the context contains a must understand property
+        // with value true then add a must understand header
+
+        Boolean isOutBound = (Boolean)context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+
+        if (isOutBound != null && isOutBound) {
+            Boolean addMustUnderstand = (Boolean)context.get(Sc002Constants.SC002_ADDMU_HEADER);
+
+            if (addMustUnderstand != null && addMustUnderstand) {
+                try {
+                    SOAPPart soapPart = message.getSOAPPart();
+                    SOAPEnvelope envelope = soapPart.getEnvelope();
+                    SOAPHeader header = envelope.getHeader();
+                    if (header == null) {
+                        header = envelope.addHeader();
+                    }
+
+                    SOAPHeaderElement headerElement = header.addHeaderElement(Sc002Constants.SC002_HEADER_TESTMU_QNAME);
+                    headerElement.setMustUnderstand(true);
+                } catch (SOAPException e) {
+                    // just ignore
+                    System.out.println("soap exception adding must understand header : " + e);
+                }
+            }
+        }
+    }
+
+    private void handleConversation(SOAPMessageContext context, SOAPMessage message)
+    {
+        // update the conversation id if attached to the context or use the last one provided
+
+        String id = (String) context.get(Sc002Constants.SC002_CONVERSATION_IDENTIFIER);
+
+        if (id != null) {
+            conversationId = id;
+        }
+
+        if (conversationId != null) {
+            // add the message to the conversation log
+
+            // we need to add the message to the conversation as a string
+
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            try {
+                message.writeTo(baos);
+                String messageString = baos.toString();
+                ProxyConversation.appendConversation(conversationId, messageString);
+            } catch (SOAPException e) {
+                // print error and continue
+                ProxyConversation.appendConversation(conversationId, "<error> could not log message : " + e + "</error>");
+            } catch (IOException e) {
+                ProxyConversation.appendConversation(conversationId, "<error> could not log message : " + e + "</error>");
+            }
+        }
+    }
+
+    // the outgoing and incoming handlers have to share the converstion id so we make this
+    // a static
+    
+    private static String conversationId = null;
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/callback/EchoResponseCallback.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/callback/EchoResponseCallback.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/callback/EchoResponseCallback.java	2008-08-18 10:42:14 UTC (rev 21599)
@@ -0,0 +1,23 @@
+package com.jboss.transaction.wstf.webservices.sc003.client.callback;
+
+import org.wstf.docs.scenarios.sc002.EchoResponseType;
+
+import javax.xml.soap.SOAPFault;
+
+/**
+ * Abstract class specialsied by clietns to allow them to be notified of asynchronous
+ * echo responses or faults delivered to the EchoResponse service.
+ */
+public abstract class EchoResponseCallback
+{
+    /**
+     * handle an asynchronous Echo reply
+     * @param echoResponse the response text
+     */
+    public abstract void echoResponse(EchoResponseType echoResponse);
+    /**
+     * handle an asynchronous EchoR fault
+     * @param fault the fault
+     */
+    public abstract void fault(SOAPFault fault);
+}

Added: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/callback/EchoResponseCallbackHandler.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/callback/EchoResponseCallbackHandler.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/callback/EchoResponseCallbackHandler.java	2008-08-18 10:42:14 UTC (rev 21599)
@@ -0,0 +1,42 @@
+package com.jboss.transaction.wstf.webservices.sc003.client.callback;
+
+import org.wstf.docs.scenarios.sc002.EchoResponseType;
+
+import javax.xml.soap.SOAPFault;
+import java.util.HashMap;
+
+/**
+ * class to allow asynchronous message responses to be waited for
+ */
+public class EchoResponseCallbackHandler
+{
+    public static EchoResponseCallback register(String messageId, EchoResponseCallback callback)
+    {
+        return callbackMap.put(messageId, callback);
+    }
+
+    public static EchoResponseCallback unregister(String messageId)
+    {
+        return callbackMap.remove(messageId);
+    }
+
+    public static void echoResponse(String messageId, EchoResponseType echoResponse)
+    {
+        EchoResponseCallback callback = callbackMap.remove(messageId);
+
+            if (callback != null) {
+                callback.echoResponse(echoResponse);
+        }
+    }
+
+    public static void fault(String messageId, SOAPFault fault)
+    {
+        EchoResponseCallback callback = callbackMap.remove(messageId);
+
+            if (callback != null) {
+                callback.fault(fault);
+        }
+    }
+
+    static HashMap<String, EchoResponseCallback> callbackMap = new HashMap<String, EchoResponseCallback>();
+}

Copied: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/sei/Sc003PortImpl.java (from rev 21545, labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc002/sei/Sc002PortImpl.java)
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/sei/Sc003PortImpl.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/sei/Sc003PortImpl.java	2008-08-18 10:42:14 UTC (rev 21599)
@@ -0,0 +1,74 @@
+package com.jboss.transaction.wstf.webservices.sc003.sei;
+
+import org.wstf.docs.scenarios.sc002.*;
+import org.wstf.docs.scenarios.sc003.*;
+
+import javax.jws.*;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.namespace.QName;
+import java.util.*;
+
+import com.jboss.transaction.wstf.webservices.common.EchoService;
+
+/**
+ * Imnplementation class for WSTF scenario sc002 port SEI Scoo2Port
+ */
+ at WebService(name = "sc003Port",
+        targetNamespace = "http://www.wstf.org/docs/scenarios/sc003",
+        wsdlLocation="/WEB-INF/wsdl/sc003.wsdl",
+        portName = "soap11port",
+        serviceName="sc003Service")
+ at SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+ at HandlerChain(file="sc003handlers.xml")
+public class Sc003PortImpl implements Sc003Port
+{
+    /**
+     * @param sessionData
+     * @param notify
+     */
+    @WebMethod(operationName = "Notify", action = "http://www.wstf.org/docs/scenarios/sc002/Notify")
+    @Oneway
+    public void notify(@WebParam(name = "Notify", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", partName = "Notify")
+    NotifyType notify, @WebParam(name = "SessionData", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", header = true, partName = "SessionData")
+    SessionDataType sessionData) {
+        String id = sessionData.getID();
+        String text = notify.getText();
+        if (FAULTSTRING.equals(text)) {
+            throw new WebServiceException("faultingNotify");
+        } else {
+            echoService.notify(id, text);
+        }
+    }
+
+    /**
+     * @param sessionData
+     * @param echo
+     * @return returns org.wstf.docs.scenarios.sc002.EchoResponseType
+     */
+    @WebMethod(operationName = "Echo", action = "http://www.wstf.org/docs/scenarios/sc002/Echo")
+    @WebResult(name = "EchoResponse", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", partName = "EchoResponse")
+    public EchoResponseType echo(@WebParam(name = "Echo", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", partName = "Echo")
+    EchoType echo, @WebParam(name = "SessionData", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", header = true, partName = "SessionData")
+    SessionDataType sessionData) {
+        String id = sessionData.getID();
+        String text = echo.getText();
+        if (FAULTSTRING.equals(text)) {
+            throw new WebServiceException("faultingEcho");
+        } else {
+            String replyText = echoService.echo(id, text);
+            EchoResponseType response = new EchoResponseType();
+            response.setText(replyText);
+            return response;
+        }
+    }
+
+    private EchoService echoService = EchoService.getEchoService();
+
+    /**
+     * a text string which causes a fault to be thrown when supplied as the argument to an
+     * echo or notify request
+     */
+    final private static String FAULTSTRING = "fault";
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/sei/Sc003ResponsePortImpl.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/sei/Sc003ResponsePortImpl.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/sei/Sc003ResponsePortImpl.java	2008-08-18 10:42:14 UTC (rev 21599)
@@ -0,0 +1,88 @@
+package com.jboss.transaction.wstf.webservices.sc003.sei;
+
+import org.wstf.docs.scenarios.sc003.Sc003ResponsePort;
+import org.wstf.docs.scenarios.sc002.EchoResponseType;
+import org.xmlsoap.schemas.soap.envelope.Fault;
+
+import javax.jws.*;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.soap.SOAPFault;
+import javax.xml.soap.SOAPFactory;
+import javax.xml.soap.SOAPConstants;
+import javax.xml.soap.SOAPException;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.JAXWSAConstants;
+import javax.xml.ws.addressing.Relationship;
+import javax.annotation.Resource;
+
+import com.jboss.transaction.wstf.webservices.sc003.client.callback.EchoResponseCallbackHandler;
+
+/**
+ * Implementation of response handler service for Sc003 test case
+ */
+ at WebService(name = "sc003ResponsePort",
+        targetNamespace = "http://www.wstf.org/docs/scenarios/sc003",
+        wsdlLocation="/WEB-INF/wsdl/sc003.wsdl",
+        portName = "soap11port",
+        serviceName="sc003ResponseService")
+ at SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+ at HandlerChain(file="sc003responsehandlers.xml")
+public class Sc003ResponsePortImpl implements Sc003ResponsePort
+{
+    @Resource
+    WebServiceContext context;
+
+    /**
+     * @param echoResponse
+     */
+    @WebMethod(operationName = "EchoResponse", action = "http://www.wstf.org/docs/scenarios/sc002/EchoResponse")
+    @Oneway
+    public void echoResponse(@WebParam(name = "EchoResponse", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", partName = "EchoResponse")
+    EchoResponseType echoResponse) {
+        AddressingProperties addressingProperties = (AddressingProperties)context.getMessageContext().get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_INBOUND);
+        Relationship[] relatesTo = addressingProperties.getRelatesTo();
+        for (Relationship rel : relatesTo) {
+            String messageId = rel.getID().toString();
+            EchoResponseCallbackHandler.echoResponse(messageId, echoResponse);
+        }
+    }
+    /**
+     * @param fault
+     */
+    @WebMethod(action = "http://schemas.xmlsoap.org/wsdl/soap/envelope/fault")
+    @Oneway
+    public void fault(
+        @WebParam(name = "Fault", targetNamespace = "http://schemas.xmlsoap.org/soap/envelope/", partName = "fault")
+        Fault fault) {
+        AddressingProperties addressingProperties = (AddressingProperties)context.getMessageContext().get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_INBOUND);
+        Relationship[] relatesTo = addressingProperties.getRelatesTo();
+        SOAPFault soapFault = soapFaultFromFault(fault);
+        for (Relationship rel : relatesTo) {
+            String messageId = rel.getID().toString();
+            EchoResponseCallbackHandler.fault(messageId, soapFault);
+        }
+    }
+
+    SOAPFault soapFaultFromFault(Fault fault)
+    {
+        try {
+            SOAPFault soapFault = getSoapFactory().createFault(fault.getFaultstring(), fault.getFaultcode());
+            return soapFault;
+        } catch (SOAPException e) {
+            return null;
+        }
+
+    }
+
+    static synchronized SOAPFactory getSoapFactory() throws SOAPException
+    {
+        if (soapFactory == null) {
+            soapFactory = SOAPFactory.newInstance(SOAPConstants.SOAP_1_1_PROTOCOL);
+        }
+
+        return soapFactory;
+    }
+
+    static SOAPFactory soapFactory = null;
+}

Copied: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/server/Sc003Initialisation.java (from rev 21545, labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc002/server/Sc002Initialisation.java)
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/server/Sc003Initialisation.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/server/Sc003Initialisation.java	2008-08-18 10:42:14 UTC (rev 21599)
@@ -0,0 +1,42 @@
+package com.jboss.transaction.wstf.webservices.sc003.server;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import javax.servlet.ServletContext;
+
+import com.jboss.transaction.wstf.webservices.ServiceRegistry;
+import com.jboss.transaction.wstf.webservices.sc003.Sc003Constants;
+
+/**
+ * Initialise the interop initiator and response service.
+ * @author kevin
+ */
+public class Sc003Initialisation 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 + "/sc003/Sc003Service";
+        final String responseUri = baseURI + "/sc003/Sc003ResponseService";
+
+        final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+        serviceRegistry.registerServiceProvider(Sc003Constants.SERVICE_SC003, uri) ;
+        serviceRegistry.registerServiceProvider(Sc003Constants.SERVICE_SC003_RESPONSE, responseUri) ;
+    }
+
+    /**
+     * 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(Sc003Constants.SERVICE_SC003) ;
+        serviceRegistry.removeServiceProvider(Sc003Constants.SERVICE_SC003_RESPONSE) ;
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/wstf/docs/scenarios/sc003/Sc003ResponsePort.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/wstf/docs/scenarios/sc003/Sc003ResponsePort.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/wstf/docs/scenarios/sc003/Sc003ResponsePort.java	2008-08-18 10:42:14 UTC (rev 21599)
@@ -0,0 +1,44 @@
+
+package org.wstf.docs.scenarios.sc003;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import org.wstf.docs.scenarios.sc002.EchoResponseType;
+import org.xmlsoap.schemas.soap.envelope.Fault;
+
+
+/**
+ * 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 = "sc003ResponsePort", targetNamespace = "http://www.wstf.org/docs/scenarios/sc003")
+ at SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public interface Sc003ResponsePort {
+
+
+    /**
+     * 
+     * @param echoResponse
+     */
+    @WebMethod(operationName = "EchoResponse", action = "http://www.wstf.org/docs/scenarios/sc002/EchoResponse")
+    @Oneway
+    public void echoResponse(
+        @WebParam(name = "EchoResponse", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", partName = "EchoResponse")
+        EchoResponseType echoResponse);
+
+    /**
+     * 
+     * @param fault
+     */
+    @WebMethod(action = "http://schemas.xmlsoap.org/wsdl/soap/envelope/fault")
+    @Oneway
+    public void fault(
+        @WebParam(name = "Fault", targetNamespace = "http://schemas.xmlsoap.org/soap/envelope/", partName = "fault")
+        Fault fault);
+
+}

Added: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/wstf/docs/scenarios/sc003/Sc003ResponseService.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/wstf/docs/scenarios/sc003/Sc003ResponseService.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/wstf/docs/scenarios/sc003/Sc003ResponseService.java	2008-08-18 10:42:14 UTC (rev 21599)
@@ -0,0 +1,74 @@
+
+package org.wstf.docs.scenarios.sc003;
+
+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 = "sc003ResponseService", targetNamespace = "http://www.wstf.org/docs/scenarios/sc003", wsdlLocation = "wsdl/sc003Response.wsdl")
+public class Sc003ResponseService
+    extends Service
+{
+
+    private final static URL SC003RESPONSESERVICE_WSDL_LOCATION;
+    private final static Logger logger = Logger.getLogger(Sc003ResponseService.class.getName());
+
+    static {
+        URL url = null;
+        try {
+            URL baseUrl;
+            baseUrl = Sc003ResponseService.class.getResource(".");
+            url = new URL(baseUrl, "wsdl/sc003Response.wsdl");
+        } catch (MalformedURLException e) {
+            logger.warning("Failed to create URL for the wsdl Location: 'wsdl/sc003Response.wsdl', retrying as a local file");
+            logger.warning(e.getMessage());
+        }
+        SC003RESPONSESERVICE_WSDL_LOCATION = url;
+    }
+
+    public Sc003ResponseService(URL wsdlLocation, QName serviceName) {
+        super(wsdlLocation, serviceName);
+    }
+
+    public Sc003ResponseService() {
+        super(SC003RESPONSESERVICE_WSDL_LOCATION, new QName("http://www.wstf.org/docs/scenarios/sc003", "sc003ResponseService"));
+    }
+
+    /**
+     * 
+     *         This port supports the optional use of WS-Addressing 1.0.
+     *       
+     * 
+     * @return
+     *     returns Sc003ResponsePort
+     */
+    @WebEndpoint(name = "soap11port")
+    public Sc003ResponsePort getSoap11Port() {
+        return super.getPort(new QName("http://www.wstf.org/docs/scenarios/sc003", "soap11port"), Sc003ResponsePort.class);
+    }
+
+    /**
+     * 
+     *         This port supports the optional use of WS-Addressing 1.0.
+     *       
+     * 
+     * @return
+     *     returns Sc003ResponsePort
+     */
+    @WebEndpoint(name = "soap12port")
+    public Sc003ResponsePort getSoap12Port() {
+        return super.getPort(new QName("http://www.wstf.org/docs/scenarios/sc003", "soap12port"), Sc003ResponsePort.class);
+    }
+
+}

Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/wstf/docs/scenarios/sc003/Sc003Service.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/wstf/docs/scenarios/sc003/Sc003Service.java	2008-08-18 09:28:26 UTC (rev 21598)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/wstf/docs/scenarios/sc003/Sc003Service.java	2008-08-18 10:42:14 UTC (rev 21599)
@@ -8,6 +8,7 @@
 import javax.xml.ws.Service;
 import javax.xml.ws.WebEndpoint;
 import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.Service21;
 
 
 /**
@@ -18,7 +19,8 @@
  */
 @WebServiceClient(name = "sc003Service", targetNamespace = "http://www.wstf.org/docs/scenarios/sc003", wsdlLocation = "wsdl/sc003.wsdl")
 public class Sc003Service
-    extends Service
+    // modified generated code o we can specify the WS Addressing feature
+    extends Service21
 {
 
     private final static URL SC003SERVICE_WSDL_LOCATION;

Added: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/Body.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/Body.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/Body.java	2008-08-18 10:42:14 UTC (rev 21599)
@@ -0,0 +1,95 @@
+
+package org.xmlsoap.schemas.soap.envelope;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyAttribute;
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.namespace.QName;
+import org.w3c.dom.Element;
+
+
+/**
+ * <p>Java class for Body complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="Body">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;any/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "Body", propOrder = {
+    "any"
+})
+public class Body {
+
+    @XmlAnyElement(lax = true)
+    protected List<Object> any;
+    @XmlAnyAttribute
+    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+    /**
+     * Gets the value of the any property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the any property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAny().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Object }
+     * {@link org.w3c.dom.Element }
+     * 
+     * 
+     */
+    public List<Object> getAny() {
+        if (any == null) {
+            any = new ArrayList<Object>();
+        }
+        return this.any;
+    }
+
+    /**
+     * Gets a map that contains attributes that aren't bound to any typed property on this class.
+     * 
+     * <p>
+     * the map is keyed by the name of the attribute and 
+     * the value is the string value of the attribute.
+     * 
+     * the map returned by this method is live, and you can add new attribute
+     * by updating the map directly. Because of this design, there's no setter.
+     * 
+     * 
+     * @return
+     *     always non-null
+     */
+    public Map<QName, String> getOtherAttributes() {
+        return otherAttributes;
+    }
+
+}

Added: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/Detail.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/Detail.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/Detail.java	2008-08-18 10:42:14 UTC (rev 21599)
@@ -0,0 +1,95 @@
+
+package org.xmlsoap.schemas.soap.envelope;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyAttribute;
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.namespace.QName;
+import org.w3c.dom.Element;
+
+
+/**
+ * <p>Java class for detail complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="detail">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;any/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "detail", propOrder = {
+    "any"
+})
+public class Detail {
+
+    @XmlAnyElement(lax = true)
+    protected List<Object> any;
+    @XmlAnyAttribute
+    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+    /**
+     * Gets the value of the any property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the any property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAny().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Object }
+     * {@link org.w3c.dom.Element }
+     * 
+     * 
+     */
+    public List<Object> getAny() {
+        if (any == null) {
+            any = new ArrayList<Object>();
+        }
+        return this.any;
+    }
+
+    /**
+     * Gets a map that contains attributes that aren't bound to any typed property on this class.
+     * 
+     * <p>
+     * the map is keyed by the name of the attribute and 
+     * the value is the string value of the attribute.
+     * 
+     * the map returned by this method is live, and you can add new attribute
+     * by updating the map directly. Because of this design, there's no setter.
+     * 
+     * 
+     * @return
+     *     always non-null
+     */
+    public Map<QName, String> getOtherAttributes() {
+        return otherAttributes;
+    }
+
+}

Added: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/Envelope.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/Envelope.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/Envelope.java	2008-08-18 10:42:14 UTC (rev 21599)
@@ -0,0 +1,152 @@
+
+package org.xmlsoap.schemas.soap.envelope;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyAttribute;
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.namespace.QName;
+import org.w3c.dom.Element;
+
+
+/**
+ * <p>Java class for Envelope complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="Envelope">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{http://schemas.xmlsoap.org/soap/envelope/}Header" minOccurs="0"/>
+ *         &lt;element ref="{http://schemas.xmlsoap.org/soap/envelope/}Body"/>
+ *         &lt;any/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "Envelope", propOrder = {
+    "header",
+    "body",
+    "any"
+})
+public class Envelope {
+
+    @XmlElement(name = "Header", namespace = "http://schemas.xmlsoap.org/soap/envelope/")
+    protected Header header;
+    @XmlElement(name = "Body", namespace = "http://schemas.xmlsoap.org/soap/envelope/", required = true)
+    protected Body body;
+    @XmlAnyElement(lax = true)
+    protected List<Object> any;
+    @XmlAnyAttribute
+    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+    /**
+     * Gets the value of the header property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Header }
+     *     
+     */
+    public Header getHeader() {
+        return header;
+    }
+
+    /**
+     * Sets the value of the header property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Header }
+     *     
+     */
+    public void setHeader(Header value) {
+        this.header = value;
+    }
+
+    /**
+     * Gets the value of the body property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link org.xmlsoap.schemas.soap.envelope.Body }
+     *     
+     */
+    public Body getBody() {
+        return body;
+    }
+
+    /**
+     * Sets the value of the body property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link org.xmlsoap.schemas.soap.envelope.Body }
+     *     
+     */
+    public void setBody(Body value) {
+        this.body = value;
+    }
+
+    /**
+     * Gets the value of the any property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the any property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAny().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Object }
+     * {@link org.w3c.dom.Element }
+     * 
+     * 
+     */
+    public List<Object> getAny() {
+        if (any == null) {
+            any = new ArrayList<Object>();
+        }
+        return this.any;
+    }
+
+    /**
+     * Gets a map that contains attributes that aren't bound to any typed property on this class.
+     * 
+     * <p>
+     * the map is keyed by the name of the attribute and 
+     * the value is the string value of the attribute.
+     * 
+     * the map returned by this method is live, and you can add new attribute
+     * by updating the map directly. Because of this design, there's no setter.
+     * 
+     * 
+     * @return
+     *     always non-null
+     */
+    public Map<QName, String> getOtherAttributes() {
+        return otherAttributes;
+    }
+
+}

Added: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/Fault.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/Fault.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/Fault.java	2008-08-18 10:42:14 UTC (rev 21599)
@@ -0,0 +1,151 @@
+
+package org.xmlsoap.schemas.soap.envelope;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.namespace.QName;
+
+
+/**
+ * 
+ * 	    Fault reporting structure
+ * 	  
+ * 
+ * <p>Java class for Fault complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="Fault">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="faultcode" type="{http://www.w3.org/2001/XMLSchema}QName"/>
+ *         &lt;element name="faultstring" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="faultactor" type="{http://www.w3.org/2001/XMLSchema}anyURI" minOccurs="0"/>
+ *         &lt;element name="detail" type="{http://schemas.xmlsoap.org/soap/envelope/}detail" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "Fault", propOrder = {
+    "faultcode",
+    "faultstring",
+    "faultactor",
+    "detail"
+})
+public class Fault {
+
+    @XmlElement(required = true)
+    protected QName faultcode;
+    @XmlElement(required = true)
+    protected String faultstring;
+    @XmlSchemaType(name = "anyURI")
+    protected String faultactor;
+    protected Detail detail;
+
+    /**
+     * Gets the value of the faultcode property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link javax.xml.namespace.QName }
+     *     
+     */
+    public QName getFaultcode() {
+        return faultcode;
+    }
+
+    /**
+     * Sets the value of the faultcode property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link javax.xml.namespace.QName }
+     *     
+     */
+    public void setFaultcode(QName value) {
+        this.faultcode = value;
+    }
+
+    /**
+     * Gets the value of the faultstring property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getFaultstring() {
+        return faultstring;
+    }
+
+    /**
+     * Sets the value of the faultstring property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setFaultstring(String value) {
+        this.faultstring = value;
+    }
+
+    /**
+     * Gets the value of the faultactor property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getFaultactor() {
+        return faultactor;
+    }
+
+    /**
+     * Sets the value of the faultactor property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setFaultactor(String value) {
+        this.faultactor = value;
+    }
+
+    /**
+     * Gets the value of the detail property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link org.xmlsoap.schemas.soap.envelope.Detail }
+     *     
+     */
+    public Detail getDetail() {
+        return detail;
+    }
+
+    /**
+     * Sets the value of the detail property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link org.xmlsoap.schemas.soap.envelope.Detail }
+     *     
+     */
+    public void setDetail(Detail value) {
+        this.detail = value;
+    }
+
+}

Added: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/Header.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/Header.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/Header.java	2008-08-18 10:42:14 UTC (rev 21599)
@@ -0,0 +1,95 @@
+
+package org.xmlsoap.schemas.soap.envelope;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyAttribute;
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.namespace.QName;
+import org.w3c.dom.Element;
+
+
+/**
+ * <p>Java class for Header complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="Header">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;any/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "Header", propOrder = {
+    "any"
+})
+public class Header {
+
+    @XmlAnyElement(lax = true)
+    protected List<Object> any;
+    @XmlAnyAttribute
+    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+    /**
+     * Gets the value of the any property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the any property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAny().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Object }
+     * {@link org.w3c.dom.Element }
+     * 
+     * 
+     */
+    public List<Object> getAny() {
+        if (any == null) {
+            any = new ArrayList<Object>();
+        }
+        return this.any;
+    }
+
+    /**
+     * Gets a map that contains attributes that aren't bound to any typed property on this class.
+     * 
+     * <p>
+     * the map is keyed by the name of the attribute and 
+     * the value is the string value of the attribute.
+     * 
+     * the map returned by this method is live, and you can add new attribute
+     * by updating the map directly. Because of this design, there's no setter.
+     * 
+     * 
+     * @return
+     *     always non-null
+     */
+    public Map<QName, String> getOtherAttributes() {
+        return otherAttributes;
+    }
+
+}

Added: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/ObjectFactory.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/ObjectFactory.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/ObjectFactory.java	2008-08-18 10:42:14 UTC (rev 21599)
@@ -0,0 +1,115 @@
+
+package org.xmlsoap.schemas.soap.envelope;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the org.xmlsoap.schemas.soap.envelope 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 _Fault_QNAME = new QName("http://schemas.xmlsoap.org/soap/envelope/", "Fault");
+    private final static QName _Body_QNAME = new QName("http://schemas.xmlsoap.org/soap/envelope/", "Body");
+    private final static QName _Envelope_QNAME = new QName("http://schemas.xmlsoap.org/soap/envelope/", "Envelope");
+    private final static QName _Header_QNAME = new QName("http://schemas.xmlsoap.org/soap/envelope/", "Header");
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.xmlsoap.schemas.soap.envelope
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link org.xmlsoap.schemas.soap.envelope.Body }
+     * 
+     */
+    public Body createBody() {
+        return new Body();
+    }
+
+    /**
+     * Create an instance of {@link org.xmlsoap.schemas.soap.envelope.Envelope }
+     * 
+     */
+    public Envelope createEnvelope() {
+        return new Envelope();
+    }
+
+    /**
+     * Create an instance of {@link org.xmlsoap.schemas.soap.envelope.Fault }
+     * 
+     */
+    public Fault createFault() {
+        return new Fault();
+    }
+
+    /**
+     * Create an instance of {@link org.xmlsoap.schemas.soap.envelope.Header }
+     * 
+     */
+    public Header createHeader() {
+        return new Header();
+    }
+
+    /**
+     * Create an instance of {@link org.xmlsoap.schemas.soap.envelope.Detail }
+     * 
+     */
+    public Detail createDetail() {
+        return new Detail();
+    }
+
+    /**
+     * Create an instance of {@link javax.xml.bind.JAXBElement }{@code <}{@link org.xmlsoap.schemas.soap.envelope.Fault }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://schemas.xmlsoap.org/soap/envelope/", name = "Fault")
+    public JAXBElement<Fault> createFault(Fault value) {
+        return new JAXBElement<Fault>(_Fault_QNAME, Fault.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link javax.xml.bind.JAXBElement }{@code <}{@link org.xmlsoap.schemas.soap.envelope.Body }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://schemas.xmlsoap.org/soap/envelope/", name = "Body")
+    public JAXBElement<Body> createBody(Body value) {
+        return new JAXBElement<Body>(_Body_QNAME, Body.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link javax.xml.bind.JAXBElement }{@code <}{@link org.xmlsoap.schemas.soap.envelope.Envelope }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://schemas.xmlsoap.org/soap/envelope/", name = "Envelope")
+    public JAXBElement<Envelope> createEnvelope(Envelope value) {
+        return new JAXBElement<Envelope>(_Envelope_QNAME, Envelope.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link javax.xml.bind.JAXBElement }{@code <}{@link org.xmlsoap.schemas.soap.envelope.Header }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://schemas.xmlsoap.org/soap/envelope/", name = "Header")
+    public JAXBElement<Header> createHeader(Header value) {
+        return new JAXBElement<Header>(_Header_QNAME, Header.class, null, value);
+    }
+
+}

Added: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/package-info.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/package-info.java	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/xmlsoap/schemas/soap/envelope/package-info.java	2008-08-18 10:42:14 UTC (rev 21599)
@@ -0,0 +1,2 @@
+ at javax.xml.bind.annotation.XmlSchema(namespace = "http://schemas.xmlsoap.org/soap/envelope/")
+package org.xmlsoap.schemas.soap.envelope;

Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/web/sc002/index.jsp
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/web/sc002/index.jsp	2008-08-18 09:28:26 UTC (rev 21598)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/web/sc002/index.jsp	2008-08-18 10:42:14 UTC (rev 21599)
@@ -21,7 +21,7 @@
  n.b. the JBoss participant has URL http://localhost:8080/wstf/sc002/Sc002Service</p>
 <form action="../test" method="post">
 <p>Sc002 Participant Service URI: <input name="<%= TestConstants.PARAM_SERVICE_URI %>" maxlength="2000" size="100" value="http://localhost:8080/wstf/sc002/Sc002Service"/></p>
-<p>Test timeout: <input name="<%= TestConstants.PARAM_TEST_TIMEOUT %>" maxlength="10" size="10" value="120000"/></p>
+<p>Test timeout: <input name="<%= TestConstants.PARAM_TEST_TIMEOUT %>" maxlength="10" size="10" value="20000"/></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>
 -->

Copied: labs/jbosstm/workspace/interop/WSTFSC02-interop/web/sc003/details.jsp (from rev 21545, labs/jbosstm/workspace/interop/WSTFSC02-interop/web/sc002/details.jsp)
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/web/sc003/details.jsp	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/web/sc003/details.jsp	2008-08-18 10:42:14 UTC (rev 21599)
@@ -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="sc003/results.jsp">results page</a></p>
+</body>
+</html>
\ No newline at end of file

Copied: labs/jbosstm/workspace/interop/WSTFSC02-interop/web/sc003/index.jsp (from rev 21545, labs/jbosstm/workspace/interop/WSTFSC02-interop/web/sc002/index.jsp)
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/web/sc003/index.jsp	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/web/sc003/index.jsp	2008-08-18 10:42:14 UTC (rev 21599)
@@ -0,0 +1,53 @@
+<%@ 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.jboss.transaction.wstf.test.TestConstants"%>
+<%@page import="com.jboss.transaction.wstf.webservices.sc003.Sc003Constants"%>
+
+<!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 Sc002 Interop</title>
+</head>
+<body>
+<h1>JBoss Transactions WSTF Sc002 Interop</h1>
+<h2>Introduction</h2>
+<p>This web application implements the <a href="http://www.wstf.org/docs/scenarios/sc003/sc003.xml">scenario sc003</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=WSTF%20interop%20query">Red Hat Test Forum contact</a></p>
+<h2>Sc002 tests</h2>
+<p>Enter the URL of the sc003 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/wstf/sc003/Sc003Service</p>
+<form action="../test" method="post">
+<p>Sc002 Participant Service URI: <input name="<%= TestConstants.PARAM_SERVICE_URI %>" maxlength="2000" size="100" value="http://localhost:8080/wstf/sc003/Sc003Service"/></p>
+<p>Test timeout: <input name="<%= TestConstants.PARAM_TEST_TIMEOUT %>" maxlength="10" size="10" value="20000"/></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_SC003 %>">All Sc002 tests</option>
+    <option value="<%= TestConstants.NAME_ALL_TESTS_SC003_SYNC %>">All Sc002 synchronous tests</option>
+    <option value="<%= TestConstants.NAME_ALL_TESTS_SC003 %>">All Sc002 asynchronous tests</option>
+<%
+
+  final Map descriptions = TestConstants.DESCRIPTIONS_SC003 ;
+  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

Copied: labs/jbosstm/workspace/interop/WSTFSC02-interop/web/sc003/results.jsp (from rev 21545, labs/jbosstm/workspace/interop/WSTFSC02-interop/web/sc002/results.jsp)
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/web/sc003/results.jsp	                        (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/web/sc003/results.jsp	2008-08-18 10:42:14 UTC (rev 21599)
@@ -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_SC003.get(name) ;
+%>
+<p><a href="sc003/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_SC003.get(name) ;
+%>
+<p><a href="sc003/details.jsp?type=failure&index=<%= count %>"><%= name %></a> <%= description %></p>
+<%
+				}
+			}
+		}
+	}
+%>
+<p>Return to <a href="sc003/index.jsp">main page</a></p>
+</body>
+</html>
\ No newline at end of file

Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/web.xml
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/web.xml	2008-08-18 09:28:26 UTC (rev 21598)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/web.xml	2008-08-18 10:42:14 UTC (rev 21599)
@@ -14,6 +14,19 @@
         <param-value>http://@HOST@:@PORT@/wstf</param-value>
     </context-param>
 
+    <!-- define initialisation listeners for services -->
+    <listener>
+        <listener-class>
+            com.jboss.transaction.wstf.webservices.sc002.server.Sc002Initialisation
+        </listener-class>
+    </listener>
+
+    <listener>
+        <listener-class>
+            com.jboss.transaction.wstf.webservices.sc003.server.Sc003Initialisation
+        </listener-class>
+    </listener>
+
     <!-- Define WSTF Server Endpoints -->
     <servlet>
         <servlet-name>WSTF Sc002 Service</servlet-name>
@@ -21,6 +34,18 @@
         <load-on-startup>1</load-on-startup>
     </servlet>
 
+    <servlet>
+        <servlet-name>WSTF Sc003 Service</servlet-name>
+        <servlet-class>com.jboss.transaction.wstf.webservices.sc003.sei.Sc003PortImpl</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+    <servlet>
+        <servlet-name>WSTF Sc003 Response Service</servlet-name>
+        <servlet-class>com.jboss.transaction.wstf.webservices.sc003.sei.Sc003ResponsePortImpl</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
     <!-- define proxy, logging and junit test runner servlets -->
     <servlet>
         <servlet-name>JUnit test servlet</servlet-name>
@@ -40,6 +65,16 @@
       <url-pattern>/sc002/Sc002Service</url-pattern>
     </servlet-mapping>
 
+    <servlet-mapping>
+      <servlet-name>WSTF Sc003 Service</servlet-name>
+      <url-pattern>/sc003/Sc003Service</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+      <servlet-name>WSTF Sc003 Response Service</servlet-name>
+      <url-pattern>/sc003/Sc003ResponseService</url-pattern>
+    </servlet-mapping>
+
     <!-- define logging and junit test runner servlet mappings -->
     <servlet-mapping>
         <servlet-name>JUnit test servlet</servlet-name>




More information about the jboss-svn-commits mailing list