[jboss-svn-commits] JBL Code SVN: r19813 - in labs/jbosstm/workspace/interop/WSTX11-interop: src/com/jboss/transaction/txinterop/interop and 4 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu May 1 12:16:50 EDT 2008


Author: adinn
Date: 2008-05-01 12:16:50 -0400 (Thu, 01 May 2008)
New Revision: 19813

Modified:
   labs/jbosstm/workspace/interop/WSTX11-interop/build.xml
   labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/ATTestCase.java
   labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/BATestCase.java
   labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/proxy/ProxyListenerService.java
   labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/ATInteropClient.java
   labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/AsyncParticipantClient.java
   labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/InitiatorClient.java
   labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/SyncParticipantClient.java
   labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/sei/InitiatorPortTypeImpl.java
   labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/sei/ParticipantPortTypeImpl.java
   labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/AsyncParticipantClient.java
   labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/InitiatorClient.java
   labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/SyncParticipantClient.java
Log:
added support for dispatching asynchronous soap faults and reinstated the two tests which were prevously failing

Modified: labs/jbosstm/workspace/interop/WSTX11-interop/build.xml
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/build.xml	2008-05-01 15:40:27 UTC (rev 19812)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/build.xml	2008-05-01 16:16:50 UTC (rev 19813)
@@ -95,6 +95,11 @@
             <fileset dir="${dd.dir}/interop11"
                     includes="wsdl/interopba*.wsdl"/>
         </copy>
+        <copy toDir="${build.classes.dir}/com/jboss/transaction/txinterop/webservices/soapfault/generated"
+	      overwrite="yes">
+            <fileset dir="${dd.dir}/interop11"
+                    includes="wsdl/soapfault.wsdl"/>
+        </copy>
             <war destfile="${build.war.file}" webxml="${build.webxml.file}">
     			<classes dir="${build.classes.dir}"/>
     			<classes dir="${src.dir}" excludes="**/*.java"/>

Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/ATTestCase.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/ATTestCase.java	2008-05-01 15:40:27 UTC (rev 19812)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/ATTestCase.java	2008-05-01 16:16:50 UTC (rev 19813)
@@ -431,9 +431,6 @@
     public void testAT5_5()
         throws Exception
     {
-        // TODO this test fails because under JaxWS we cannot post a Soap Fault when we receive an invalid OneWay message
-        fail("PreparedAfterTimeout does not complete successfully");
-
         final String conversationId = getConversationId() ;
         final ATInteropPreparedAfterTimeoutState state = new ATInteropPreparedAfterTimeoutState() ;
         ProxyConversation.setConversationState(conversationId, state) ;

Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/BATestCase.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/BATestCase.java	2008-05-01 15:40:27 UTC (rev 19812)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/BATestCase.java	2008-05-01 16:16:50 UTC (rev 19813)
@@ -228,9 +228,6 @@
     public void testBA1_7()
         throws Exception
     {
-        // TODO this test fails because under JaxWS we cannot post a Soap Fault when we receive an invalid OneWay message
-        fail("UnsolicitedComplete does not complete successfully");
-
         final String conversationId = getConversationId() ;
         final BAInteropUnsolicitedCompleteState state = new BAInteropUnsolicitedCompleteState() ;
         ProxyConversation.setConversationState(conversationId, state) ;

Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/proxy/ProxyListenerService.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/proxy/ProxyListenerService.java	2008-05-01 15:40:27 UTC (rev 19812)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/proxy/ProxyListenerService.java	2008-05-01 16:16:50 UTC (rev 19813)
@@ -113,7 +113,7 @@
             ProxyConversation.appendConversation(conversationIdentifier, checkForXMLDecl(messageBuffer)) ;
 
             final String identifier = addressingHandler.getIdentifier() ;
-            if ((state != null) && state.handleAction(trimAction(soapAction), identifier))
+            if ((state != null) && state.handleAction(trimAction(soapAction), identifier))  
             {
                 httpServletResponse.setStatus(HttpServletResponse.SC_ACCEPTED) ;
                 httpServletResponse.flushBuffer() ;

Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/ATInteropClient.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/ATInteropClient.java	2008-05-01 15:40:27 UTC (rev 19812)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/ATInteropClient.java	2008-05-01 16:16:50 UTC (rev 19813)
@@ -2,10 +2,7 @@
 
 import org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler;
 
-import javax.xml.ws.addressing.AddressingBuilder;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.AttributedURI;
-import javax.xml.ws.addressing.JAXWSAConstants;
+import javax.xml.ws.addressing.*;
 import javax.xml.ws.BindingProvider;
 import javax.xml.ws.wsaddressing.W3CEndpointReference;
 import javax.xml.ws.handler.Handler;
@@ -13,12 +10,15 @@
 import java.util.ArrayList;
 import java.util.Map;
 import java.net.URISyntaxException;
+import java.net.URI;
 
 import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.ServiceRegistry;
 import com.jboss.transaction.txinterop.webservices.atinterop.generated.InitiatorService;
 import com.jboss.transaction.txinterop.webservices.atinterop.generated.ParticipantService;
 import com.jboss.transaction.txinterop.webservices.atinterop.generated.InitiatorPortType;
 import com.jboss.transaction.txinterop.webservices.atinterop.generated.ParticipantPortType;
+import com.jboss.transaction.txinterop.webservices.atinterop.ATInteropConstants;
 import com.jboss.transaction.txinterop.webservices.handlers.CoordinationContextHandler;
 
 /**
@@ -91,6 +91,7 @@
         requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, toUri.getURI().toString());
         try {
             addressingProperties.setAction(builder.newURI(action));
+            addressingProperties.setFrom(getParticipant());
         } catch (URISyntaxException use) {
             // TODO log this error
         }
@@ -126,10 +127,44 @@
         requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, toUri.getURI().toString());
         try {
             addressingProperties.setAction(builder.newURI(action));
+            addressingProperties.setFrom(getInitiator());
         } catch (URISyntaxException use) {
             // TODO log this error
         }
 
         return port;
     }
+
+    private static EndpointReference initiator;
+    private static EndpointReference participant;
+
+    private static synchronized EndpointReference getInitiator()
+    {
+        if (initiator == null) {
+            final String initiatorURIString =
+                ServiceRegistry.getRegistry().getServiceURI(ATInteropConstants.SERVICE_INITIATOR);
+            try {
+                URI initiatorURI = new URI(initiatorURIString);
+                initiator = builder.newEndpointReference(initiatorURI);
+            } catch (URISyntaxException use) {
+                // TODO - log fault and throw exception
+            }
+        }
+        return initiator;
+    }
+
+    private static synchronized EndpointReference getParticipant()
+    {
+        if (participant == null) {
+            final String participantURIString =
+                    ServiceRegistry.getRegistry().getServiceURI(ATInteropConstants.SERVICE_PARTICIPANT);
+            try {
+                URI participantURI = new URI(participantURIString);
+                participant = builder.newEndpointReference(participantURI);
+            } catch (URISyntaxException use) {
+                // TODO - log fault and throw exception
+            }
+        }
+        return participant;
+    }
 }

Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/AsyncParticipantClient.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/AsyncParticipantClient.java	2008-05-01 15:40:27 UTC (rev 19812)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/AsyncParticipantClient.java	2008-05-01 16:16:50 UTC (rev 19813)
@@ -29,63 +29,63 @@
     /**
      * The completion commit action.
      */
-    private final String completionCommitAction = ATInteropConstants.INTEROP_ACTION_COMPLETION_COMMIT ;
+    private static final String completionCommitAction = ATInteropConstants.INTEROP_ACTION_COMPLETION_COMMIT ;
     /**
      * The completion rollback Action.
      */
-    private final String completionRollbackAction = ATInteropConstants.INTEROP_ACTION_COMPLETION_ROLLBACK ;
+    private static final String completionRollbackAction = ATInteropConstants.INTEROP_ACTION_COMPLETION_ROLLBACK ;
     /**
      * The commit Action.
      */
-    private final String commitAction = ATInteropConstants.INTEROP_ACTION_COMMIT ;
+    private static final String commitAction = ATInteropConstants.INTEROP_ACTION_COMMIT ;
     /**
      * The rollback Action.
      */
-    private final String rollbackAction = ATInteropConstants.INTEROP_ACTION_ROLLBACK ;
+    private static final String rollbackAction = ATInteropConstants.INTEROP_ACTION_ROLLBACK ;
     /**
      * The phase 2 rollback Action.
      */
-    private final String phase2RollbackAction = ATInteropConstants.INTEROP_ACTION_PHASE_2_ROLLBACK ;
+    private static final String phase2RollbackAction = ATInteropConstants.INTEROP_ACTION_PHASE_2_ROLLBACK ;
     /**
      * The readonly Action.
      */
-    private final String readonlyAction = ATInteropConstants.INTEROP_ACTION_READONLY ;
+    private static final String readonlyAction = ATInteropConstants.INTEROP_ACTION_READONLY ;
     /**
      * The volatile and durable Action.
      */
-    private final String volatileAndDurableAction = ATInteropConstants.INTEROP_ACTION_VOLATILE_AND_DURABLE ;
+    private static final String volatileAndDurableAction = ATInteropConstants.INTEROP_ACTION_VOLATILE_AND_DURABLE ;
     /**
      * The early readonly Action.
      */
-    private final String earlyReadonlyAction = ATInteropConstants.INTEROP_ACTION_EARLY_READONLY ;
+    private static final String earlyReadonlyAction = ATInteropConstants.INTEROP_ACTION_EARLY_READONLY ;
     /**
      * The early aborted Action.
      */
-    private final String earlyAbortedAction = ATInteropConstants.INTEROP_ACTION_EARLY_ABORTED ;
+    private static final String earlyAbortedAction = ATInteropConstants.INTEROP_ACTION_EARLY_ABORTED ;
     /**
      * The replay commit Action.
      */
-    private final String replayCommitAction = ATInteropConstants.INTEROP_ACTION_REPLAY_COMMIT ;
+    private static final String replayCommitAction = ATInteropConstants.INTEROP_ACTION_REPLAY_COMMIT ;
     /**
      * The retry prepared commit Action.
      */
-    private final String retryPreparedCommitAction = ATInteropConstants.INTEROP_ACTION_RETRY_PREPARED_COMMIT ;
+    private static final String retryPreparedCommitAction = ATInteropConstants.INTEROP_ACTION_RETRY_PREPARED_COMMIT ;
     /**
      * The retry prepared abort Action.
      */
-    private final String retryPreparedAbortAction = ATInteropConstants.INTEROP_ACTION_RETRY_PREPARED_ABORT ;
+    private static final String retryPreparedAbortAction = ATInteropConstants.INTEROP_ACTION_RETRY_PREPARED_ABORT ;
     /**
      * The retry commit Action.
      */
-    private final String retryCommitAction = ATInteropConstants.INTEROP_ACTION_RETRY_COMMIT ;
+    private static final String retryCommitAction = ATInteropConstants.INTEROP_ACTION_RETRY_COMMIT ;
     /**
      * The prepared after timeout Action.
      */
-    private final String preparedAfterTimeoutAction = ATInteropConstants.INTEROP_ACTION_PREPARED_AFTER_TIMEOUT ;
+    private static final String preparedAfterTimeoutAction = ATInteropConstants.INTEROP_ACTION_PREPARED_AFTER_TIMEOUT ;
     /**
      * The lost committed Action.
      */
-    private final String lostCommittedAction = ATInteropConstants.INTEROP_ACTION_LOST_COMMITTED ;
+    private static final String lostCommittedAction = ATInteropConstants.INTEROP_ACTION_LOST_COMMITTED ;
 
     /**
      * The initiator URI for replies.

Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/InitiatorClient.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/InitiatorClient.java	2008-05-01 15:40:27 UTC (rev 19812)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/InitiatorClient.java	2008-05-01 16:16:50 UTC (rev 19813)
@@ -1,13 +1,29 @@
 package com.jboss.transaction.txinterop.webservices.atinterop.client;
 
 import java.io.IOException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.net.URISyntaxException;
 
 import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapFaultType;
+import com.arjuna.webservices11.SoapFault11;
 import com.jboss.transaction.txinterop.webservices.atinterop.ATInteropConstants;
 import com.jboss.transaction.txinterop.webservices.atinterop.generated.InitiatorPortType;
 
 import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.AttributedURI;
+import javax.xml.ws.addressing.JAXWSAConstants;
+import javax.xml.ws.addressing.AddressingBuilder;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.handler.Handler;
+import javax.xml.namespace.QName;
 
+import org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler;
+import org.jboss.jbossts.xts.soapfault.SoapFaultPortType;
+import org.jboss.jbossts.xts.soapfault.SoapFaultService;
+
 /**
  * The initiator client.
  * @author kevin
@@ -22,7 +38,7 @@
     /**
      * The response action.
      */
-    private final String responseAction = ATInteropConstants.INTEROP_ACTION_RESPONSE ;
+    private static final String responseAction = ATInteropConstants.INTEROP_ACTION_RESPONSE ;
     
     /**
      * Construct the interop synch client.
@@ -59,7 +75,7 @@
      * @throws SoapFault For any errors.
      * @throws IOException for any transport errors.
      */
-    public void sendSoapFault(final AddressingProperties addressingProperties, final SoapFault soapFault)
+    public void sendSoapFault(final AddressingProperties addressingProperties, final SoapFault11 soapFault)
         throws SoapFault, IOException
     {
         // TODO cannot send a soap fault using JaxWS so rethrow the soap fault for the caller to log
@@ -72,10 +88,56 @@
         //    addressingContext.setAction(new AttributedURIType(soapFaultAction)) ;
         //}
         //WSAddr2005Client.sendSoapFault(soapFault, addressingContext, soapDetails, soapService) ;
-        throw soapFault;
+
+        SoapFaultPortType port = getSoapFaultPort(addressingProperties);
+        port.soapFault(soapFault.toFault());
     }
 
     /**
+     * fetch a coordinator activation service unique to the current thread
+     * @return
+     */
+    private static synchronized SoapFaultService getSoapFaultService()
+    {
+        if (soapFaultService.get() == null) {
+            soapFaultService.set(new SoapFaultService());
+        }
+        return soapFaultService.get();
+    }
+
+    private SoapFaultPortType getSoapFaultPort(AddressingProperties addressingProperties)
+    {
+        SoapFaultService service = getSoapFaultService();
+        SoapFaultPortType port = service.getPort(SoapFaultPortType.class);
+        BindingProvider bindingProvider = (BindingProvider)port;
+        AddressingProperties faultAddressingProperties = builder.newAddressingProperties();
+        faultAddressingProperties.initializeAsReply(addressingProperties, true);
+        AttributedURI toUri = faultAddressingProperties.getTo();
+        List<Handler> customHandlerChain = new ArrayList<Handler>();
+        /*
+         * we have to add the JaxWS WSAddressingClientHandler because we cannot specify the WSAddressing feature
+         */
+		customHandlerChain.add(new WSAddressingClientHandler());
+        bindingProvider.getBinding().setHandlerChain(customHandlerChain);
+
+        Map<String, Object> requestContext = bindingProvider.getRequestContext();
+        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, faultAddressingProperties);
+	    // jbossws should do this for us . . .
+	    requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, faultAddressingProperties);
+        requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, toUri.getURI().toString());
+        try {
+            faultAddressingProperties.setAction(builder.newURI(faultAction));
+        } catch (URISyntaxException use) {
+            // TODO log this error
+        }
+
+        return port;
+    }
+
+    private static final ThreadLocal<SoapFaultService> soapFaultService = new ThreadLocal<SoapFaultService>();
+    private static final String faultAction = "http://fabrikam123.com/SoapFault";
+    private static final AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+    /**
      * Get the Interop client singleton.
      * @return The Interop client singleton.
      */

Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/SyncParticipantClient.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/SyncParticipantClient.java	2008-05-01 15:40:27 UTC (rev 19812)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/SyncParticipantClient.java	2008-05-01 16:16:50 UTC (rev 19813)
@@ -22,63 +22,63 @@
     /**
      * The completion commit action.
      */
-    private final String completionCommitAction = ATInteropConstants.INTEROP_ACTION_COMPLETION_COMMIT ;
+    private static final String completionCommitAction = ATInteropConstants.INTEROP_ACTION_COMPLETION_COMMIT ;
     /**
      * The completion rollback Action.
      */
-    private final String completionRollbackAction = ATInteropConstants.INTEROP_ACTION_COMPLETION_ROLLBACK ;
+    private static final String completionRollbackAction = ATInteropConstants.INTEROP_ACTION_COMPLETION_ROLLBACK ;
     /**
      * The commit Action.
      */
-    private final String commitAction = ATInteropConstants.INTEROP_ACTION_COMMIT ;
+    private static final String commitAction = ATInteropConstants.INTEROP_ACTION_COMMIT ;
     /**
      * The rollback Action.
      */
-    private final String rollbackAction = ATInteropConstants.INTEROP_ACTION_ROLLBACK ;
+    private static final String rollbackAction = ATInteropConstants.INTEROP_ACTION_ROLLBACK ;
     /**
      * The phase 2 rollback Action.
      */
-    private final String phase2RollbackAction = ATInteropConstants.INTEROP_ACTION_PHASE_2_ROLLBACK ;
+    private static final String phase2RollbackAction = ATInteropConstants.INTEROP_ACTION_PHASE_2_ROLLBACK ;
     /**
      * The readonly Action.
      */
-    private final String readonlyAction = ATInteropConstants.INTEROP_ACTION_READONLY ;
+    private static final String readonlyAction = ATInteropConstants.INTEROP_ACTION_READONLY ;
     /**
      * The volatile and durable Action.
      */
-    private final String volatileAndDurableAction = ATInteropConstants.INTEROP_ACTION_VOLATILE_AND_DURABLE ;
+    private static final String volatileAndDurableAction = ATInteropConstants.INTEROP_ACTION_VOLATILE_AND_DURABLE ;
     /**
      * The early readonly Action.
      */
-    private final String earlyReadonlyAction = ATInteropConstants.INTEROP_ACTION_EARLY_READONLY ;
+    private static final String earlyReadonlyAction = ATInteropConstants.INTEROP_ACTION_EARLY_READONLY ;
     /**
      * The early aborted Action.
      */
-    private final String earlyAbortedAction = ATInteropConstants.INTEROP_ACTION_EARLY_ABORTED ;
+    private static final String earlyAbortedAction = ATInteropConstants.INTEROP_ACTION_EARLY_ABORTED ;
     /**
      * The replay commit Action.
      */
-    private final String replayCommitAction = ATInteropConstants.INTEROP_ACTION_REPLAY_COMMIT ;
+    private static final String replayCommitAction = ATInteropConstants.INTEROP_ACTION_REPLAY_COMMIT ;
     /**
      * The retry prepared commit Action.
      */
-    private final String retryPreparedCommitAction = ATInteropConstants.INTEROP_ACTION_RETRY_PREPARED_COMMIT ;
+    private static final String retryPreparedCommitAction = ATInteropConstants.INTEROP_ACTION_RETRY_PREPARED_COMMIT ;
     /**
      * The retry prepared abort Action.
      */
-    private final String retryPreparedAbortAction = ATInteropConstants.INTEROP_ACTION_RETRY_PREPARED_ABORT ;
+    private static final String retryPreparedAbortAction = ATInteropConstants.INTEROP_ACTION_RETRY_PREPARED_ABORT ;
     /**
      * The retry commit Action.
      */
-    private final String retryCommitAction = ATInteropConstants.INTEROP_ACTION_RETRY_COMMIT ;
+    private static final String retryCommitAction = ATInteropConstants.INTEROP_ACTION_RETRY_COMMIT ;
     /**
      * The prepared after timeout Action.
      */
-    private final String preparedAfterTimeoutAction = ATInteropConstants.INTEROP_ACTION_PREPARED_AFTER_TIMEOUT ;
+    private static final String preparedAfterTimeoutAction = ATInteropConstants.INTEROP_ACTION_PREPARED_AFTER_TIMEOUT ;
     /**
      * The lost committed Action.
      */
-    private final String lostCommittedAction = ATInteropConstants.INTEROP_ACTION_LOST_COMMITTED ;
+    private static final String lostCommittedAction = ATInteropConstants.INTEROP_ACTION_LOST_COMMITTED ;
     
     /**
      * Construct the interop synch client.

Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/sei/InitiatorPortTypeImpl.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/sei/InitiatorPortTypeImpl.java	2008-05-01 15:40:27 UTC (rev 19812)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/sei/InitiatorPortTypeImpl.java	2008-05-01 16:16:50 UTC (rev 19813)
@@ -1,6 +1,9 @@
 package com.jboss.transaction.txinterop.webservices.atinterop.sei;
 
 import com.jboss.transaction.txinterop.webservices.atinterop.processors.ATInitiatorProcessor;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices.SoapFaultType;
+import com.arjuna.webservices11.SoapFault11;
 
 import javax.xml.ws.RequestWrapper;
 import javax.xml.ws.WebServiceContext;
@@ -15,12 +18,19 @@
 import javax.jws.Oneway;
 import javax.jws.WebMethod;
 import javax.jws.WebService;
+import javax.jws.WebParam;
 import javax.jws.*;
 import javax.jws.soap.SOAPBinding;
-import javax.xml.bind.annotation.XmlSeeAlso;
 import javax.xml.ws.RequestWrapper;
+import javax.xml.namespace.QName;
 
+import org.w3c.dom.Element;
+import org.jboss.jbossts.xts.soapfault.Fault;
 
+import java.util.Iterator;
+import java.util.Vector;
+
+
 /**
  * Implementation class for WSTX 1.1 AT Interop Test Initiator service
  */
@@ -53,4 +63,18 @@
         ATInitiatorProcessor.getInitiator().handleResponse(inboundAddressProperties) ;
     }
 
-}
+    @WebMethod(operationName = "SoapFault", action = "http://fabrikam123.com/SoapFault")
+    @Oneway
+    @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+    public void soapFault(
+            @WebParam(name = "Fault", targetNamespace = "http://schemas.xmlsoap.org/soap/envelope/", partName = "parameters")
+            Fault fault)
+    {
+        MessageContext ctx = webServiceCtx.getMessageContext();
+        AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+
+        SoapFault11 soapFaultInternal = SoapFault11.fromFault(fault);
+        ATInitiatorProcessor.getInitiator().handleSoapFault(soapFaultInternal, inboundAddressProperties) ;
+    }
+
+}
\ No newline at end of file

Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/sei/ParticipantPortTypeImpl.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/sei/ParticipantPortTypeImpl.java	2008-05-01 15:40:27 UTC (rev 19812)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/sei/ParticipantPortTypeImpl.java	2008-05-01 16:16:50 UTC (rev 19813)
@@ -373,10 +373,8 @@
      */
     private void sendSoapFault(AddressingProperties inboundAddressProperties, SoapFault sf)
     {
-        AddressingProperties outboundAddressProperties = AddressingHelper.createResponseContext(inboundAddressProperties, MessageId.getMessageId());
-
         try {
-            InitiatorClient.getClient().sendSoapFault(outboundAddressProperties, sf);
+            InitiatorClient.getClient().sendSoapFault(inboundAddressProperties, (SoapFault11)sf);
         } catch (Throwable th) {
             System.out.println("com.jboss.transaction.txinterop.webservices.atinterop.sei.ParticipantPortTypeImpl_2: unable to log soap fault " + sf);
             throw new ProtocolException(th);

Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/AsyncParticipantClient.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/AsyncParticipantClient.java	2008-05-01 15:40:27 UTC (rev 19812)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/AsyncParticipantClient.java	2008-05-01 16:16:50 UTC (rev 19813)
@@ -29,51 +29,51 @@
     /**
      * The cancel action.
      */
-    private final String cancelAction = BAInteropConstants.INTEROP_ACTION_CANCEL ;
+    private static final String cancelAction = BAInteropConstants.INTEROP_ACTION_CANCEL ;
     /**
      * The exit action.
      */
-    private final String exitAction = BAInteropConstants.INTEROP_ACTION_EXIT ;
+    private static final String exitAction = BAInteropConstants.INTEROP_ACTION_EXIT ;
     /**
      * The fail action.
      */
-    private final String failAction = BAInteropConstants.INTEROP_ACTION_FAIL ;
+    private static final String failAction = BAInteropConstants.INTEROP_ACTION_FAIL ;
     /**
      * The cannot complete action.
      */
-    private final String cannotCompleteAction = BAInteropConstants.INTEROP_ACTION_CANNOT_COMPLETE ;
+    private static final String cannotCompleteAction = BAInteropConstants.INTEROP_ACTION_CANNOT_COMPLETE ;
     /**
      * The participant complete close action.
      */
-    private final String participantCompleteCloseAction = BAInteropConstants.INTEROP_ACTION_PARTICIPANT_COMPLETE_CLOSE ;
+    private static final String participantCompleteCloseAction = BAInteropConstants.INTEROP_ACTION_PARTICIPANT_COMPLETE_CLOSE ;
     /**
      * The coordinator complete close action.
      */
-    private final String coordinatorCompleteCloseAction = BAInteropConstants.INTEROP_ACTION_COORDINATOR_COMPLETE_CLOSE ;
+    private static final String coordinatorCompleteCloseAction = BAInteropConstants.INTEROP_ACTION_COORDINATOR_COMPLETE_CLOSE ;
     /**
      * The unsolicited complete action.
      */
-    private final String unsolicitedCompleteAction = BAInteropConstants.INTEROP_ACTION_UNSOLICITED_COMPLETE ;
+    private static final String unsolicitedCompleteAction = BAInteropConstants.INTEROP_ACTION_UNSOLICITED_COMPLETE ;
     /**
      * The compensate action.
      */
-    private final String compensateAction = BAInteropConstants.INTEROP_ACTION_COMPENSATE ;
+    private static final String compensateAction = BAInteropConstants.INTEROP_ACTION_COMPENSATE ;
     /**
      * The compensation fail action.
      */
-    private final String participantCompensationFailAction = BAInteropConstants.INTEROP_ACTION_COMPENSATION_FAIL ;
+    private static final String participantCompensationFailAction = BAInteropConstants.INTEROP_ACTION_COMPENSATION_FAIL ;
     /**
      * The participant cancel completed race action.
      */
-    private final String participantCancelCompletedRaceAction = BAInteropConstants.INTEROP_ACTION_PARTICIPANT_CANCEL_COMPLETED_RACE ;
+    private static final String participantCancelCompletedRaceAction = BAInteropConstants.INTEROP_ACTION_PARTICIPANT_CANCEL_COMPLETED_RACE ;
     /**
      * The message loss and recovery action.
      */
-    private final String messageLossAndRecoveryAction = BAInteropConstants.INTEROP_ACTION_MESSAGE_LOSS_AND_RECOVERY ;
+    private static final String messageLossAndRecoveryAction = BAInteropConstants.INTEROP_ACTION_MESSAGE_LOSS_AND_RECOVERY ;
     /**
      * The mixed outcome action.
      */
-    private final String mixedOutcomeAction = BAInteropConstants.INTEROP_ACTION_MIXED_OUTCOME ;
+    private static final String mixedOutcomeAction = BAInteropConstants.INTEROP_ACTION_MIXED_OUTCOME ;
     
     /**
      * The initiator URI for replies.

Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/InitiatorClient.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/InitiatorClient.java	2008-05-01 15:40:27 UTC (rev 19812)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/InitiatorClient.java	2008-05-01 16:16:50 UTC (rev 19813)
@@ -22,7 +22,7 @@
     /**
      * The response action.
      */
-    private final String responseAction = BAInteropConstants.INTEROP_ACTION_RESPONSE ;
+    private static final String responseAction = BAInteropConstants.INTEROP_ACTION_RESPONSE ;
     
     /**
      * Construct the interop synch client.

Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/SyncParticipantClient.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/SyncParticipantClient.java	2008-05-01 15:40:27 UTC (rev 19812)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/SyncParticipantClient.java	2008-05-01 16:16:50 UTC (rev 19813)
@@ -22,51 +22,51 @@
     /**
      * The cancel action.
      */
-    private final String cancelAction = BAInteropConstants.INTEROP_ACTION_CANCEL ;
+    private static final String cancelAction = BAInteropConstants.INTEROP_ACTION_CANCEL ;
     /**
      * The exit action.
      */
-    private final String exitAction = BAInteropConstants.INTEROP_ACTION_EXIT ;
+    private static final String exitAction = BAInteropConstants.INTEROP_ACTION_EXIT ;
     /**
      * The fail action.
      */
-    private final String failAction = BAInteropConstants.INTEROP_ACTION_FAIL ;
+    private static final String failAction = BAInteropConstants.INTEROP_ACTION_FAIL ;
     /**
      * The cannot complete action.
      */
-    private final String cannotCompleteAction = BAInteropConstants.INTEROP_ACTION_CANNOT_COMPLETE ;
+    private static final String cannotCompleteAction = BAInteropConstants.INTEROP_ACTION_CANNOT_COMPLETE ;
     /**
      * The participant complete close action.
      */
-    private final String participantCompleteCloseAction = BAInteropConstants.INTEROP_ACTION_PARTICIPANT_COMPLETE_CLOSE ;
+    private static final String participantCompleteCloseAction = BAInteropConstants.INTEROP_ACTION_PARTICIPANT_COMPLETE_CLOSE ;
     /**
      * The coordinator complete close action.
      */
-    private final String coordinatorCompleteCloseAction = BAInteropConstants.INTEROP_ACTION_COORDINATOR_COMPLETE_CLOSE ;
+    private static final String coordinatorCompleteCloseAction = BAInteropConstants.INTEROP_ACTION_COORDINATOR_COMPLETE_CLOSE ;
     /**
      * The unsolicited complete action.
      */
-    private final String unsolicitedCompleteAction = BAInteropConstants.INTEROP_ACTION_UNSOLICITED_COMPLETE ;
+    private static final String unsolicitedCompleteAction = BAInteropConstants.INTEROP_ACTION_UNSOLICITED_COMPLETE ;
     /**
      * The compensate action.
      */
-    private final String compensateAction = BAInteropConstants.INTEROP_ACTION_COMPENSATE ;
+    private static final String compensateAction = BAInteropConstants.INTEROP_ACTION_COMPENSATE ;
     /**
      * The compensation fail action.
      */
-    private final String participantCompensationFailAction = BAInteropConstants.INTEROP_ACTION_COMPENSATION_FAIL ;
+    private static final String participantCompensationFailAction = BAInteropConstants.INTEROP_ACTION_COMPENSATION_FAIL ;
     /**
      * The participant cancel completed race action.
      */
-    private final String participantCancelCompletedRaceAction = BAInteropConstants.INTEROP_ACTION_PARTICIPANT_CANCEL_COMPLETED_RACE ;
+    private static final String participantCancelCompletedRaceAction = BAInteropConstants.INTEROP_ACTION_PARTICIPANT_CANCEL_COMPLETED_RACE ;
     /**
      * The message loss and recovery action.
      */
-    private final String messageLossAndRecoveryAction = BAInteropConstants.INTEROP_ACTION_MESSAGE_LOSS_AND_RECOVERY ;
+    private static final String messageLossAndRecoveryAction = BAInteropConstants.INTEROP_ACTION_MESSAGE_LOSS_AND_RECOVERY ;
     /**
      * The mixed outcome action.
      */
-    private final String mixedOutcomeAction = BAInteropConstants.INTEROP_ACTION_MIXED_OUTCOME ;
+    private static final String mixedOutcomeAction = BAInteropConstants.INTEROP_ACTION_MIXED_OUTCOME ;
     
     /**
      * Construct the interop synch client.




More information about the jboss-svn-commits mailing list