[jboss-svn-commits] JBL Code SVN: r11151 - in labs/jbosstm/trunk/XTS: WSTX/classes/com/arjuna/mw/wst/client and 2 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Apr 20 07:35:38 EDT 2007


Author: jhalliday
Date: 2007-04-20 07:35:38 -0400 (Fri, 20 Apr 2007)
New Revision: 11151

Modified:
   labs/jbosstm/trunk/XTS/WSCF/build.xml
   labs/jbosstm/trunk/XTS/WSTX/classes/com/arjuna/mw/wst/client/JaxRPCHeaderContextProcessor.java
   labs/jbosstm/trunk/XTS/WSTX/classes/com/arjuna/mw/wst/service/JaxRPCHeaderContextProcessor.java
   labs/jbosstm/trunk/XTS/demo/dd/jboss/webservices.xml
Log:
Updated XTS build to use JTA 1.1
Updated JaxRPCHeaderContextProcessors to return specific QName from getHeaders()


Modified: labs/jbosstm/trunk/XTS/WSCF/build.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/build.xml	2007-04-20 11:00:44 UTC (rev 11150)
+++ labs/jbosstm/trunk/XTS/WSCF/build.xml	2007-04-20 11:35:38 UTC (rev 11151)
@@ -1,20 +1,20 @@
 <!--
   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 
+  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 
+  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, 
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
   MA  02110-1301, USA.
-  
+
   (C) 2005-2006,
   @author JBoss Inc.
 -->
@@ -39,19 +39,19 @@
 
     <property name="com.arjuna.buildsystem.dir" location="../../antbuildsystem"/>
     <property name="com.arjuna.jta.install" location="../../install"/>
-	
+
     <property name="com.arjuna.buildsystem.lib" location="${com.arjuna.buildsystem.dir}/build/lib"/>
     <property name="com.arjuna.jta.install.lib" location="${com.arjuna.jta.install}/lib"/>
     <property name="com.arjuna.jta.install.ext" location="${com.arjuna.jta.install.lib}/ext"/>
     <property name="com.arjuna.xts.ext" location="../ext"/>
-	
+
     <property name="com.arjuna.buildsystem.lib.jars" value="buildsystem.jar"/>
-	
+
     <property name="jta.lib.jars" value="jbossjts.jar"/>
     <property name="jta.ext.jars" value="jbossts-common.jar"/>
-    <property name="jta.ext.compile.jars" value="commons-logging.jar jta-spec1_0_1.jar"/>
+    <property name="jta.ext.compile.jars" value="commons-logging.jar jta-1_1-classes.zip"/>
     <property name="xts.ext.compile.jars" value="servlet.jar stax-api-1.0.jar"/>
-	
+
     <property name="wsas.libs" value="wsas.jar"/>
     <property name="wsc.libs" value="ws-c.jar"/>
 

Modified: labs/jbosstm/trunk/XTS/WSTX/classes/com/arjuna/mw/wst/client/JaxRPCHeaderContextProcessor.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/classes/com/arjuna/mw/wst/client/JaxRPCHeaderContextProcessor.java	2007-04-20 11:00:44 UTC (rev 11150)
+++ labs/jbosstm/trunk/XTS/WSTX/classes/com/arjuna/mw/wst/client/JaxRPCHeaderContextProcessor.java	2007-04-20 11:35:38 UTC (rev 11151)
@@ -1,20 +1,20 @@
 /*
  * 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 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -63,8 +63,8 @@
  * The class is used to perform WS-Transaction context insertion
  * and extraction for application level SOAP messages using JaxRPC.
  *
- * @message com.arjuna.mw.wst.client.JaxRPCHCP_1 [com.arjuna.mw.wst.client.JaxRPCHCP_1] - Error in: 
- * @message com.arjuna.mw.wst.client.JaxRPCHCP_2 [com.arjuna.mw.wst.client.JacRPCHCP_2] - Stack trace: 
+ * @message com.arjuna.mw.wst.client.JaxRPCHCP_1 [com.arjuna.mw.wst.client.JaxRPCHCP_1] - Error in:
+ * @message com.arjuna.mw.wst.client.JaxRPCHCP_2 [com.arjuna.mw.wst.client.JacRPCHCP_2] - Stack trace:
  */
 
 public class JaxRPCHeaderContextProcessor implements Handler
@@ -73,7 +73,7 @@
      * The handler information.
      */
     private HandlerInfo handlerInfo ;
-    
+
     /**
      * Initialise the handler information.
      * @param handlerInfo The handler information.
@@ -82,23 +82,23 @@
     {
         this.handlerInfo = handlerInfo ;
     }
-    
+
     /**
      * Destroy the handler.
      */
     public void destroy()
     {
     }
-    
+
     /**
      * Get the headers.
      * @return the headers.
      */
     public QName[] getHeaders()
     {
-        return handlerInfo.getHeaders() ;
+		return new QName[] {new QName(CoordinationConstants.WSCOOR_NAMESPACE, CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT)};
     }
-    
+
     /**
      * Handle the request.
      * @param messageContext The current message context.
@@ -108,7 +108,7 @@
     {
         final SOAPMessageContext soapMessageContext = (SOAPMessageContext)messageContext ;
         final SOAPMessage soapMessage = soapMessageContext.getMessage() ;
-        
+
         if (soapMessage == null)
         {
             return true ;
@@ -134,7 +134,7 @@
             {
                 atContext = null ;
             }
-            
+
             final Context baContext ;
             if (businessActivityManager != null)
             {
@@ -146,7 +146,7 @@
             {
                 baContext = null ;
             }
-            
+
             final CoordinationContextType coordinationContext ;
             if (atContext != null)
             {
@@ -160,7 +160,7 @@
             {
                 coordinationContext = null ;
             }
-            
+
             if (coordinationContext != null)
             {
                 final SOAPEnvelope env = soapMessage.getSOAPPart().getEnvelope() ;
@@ -176,7 +176,7 @@
                 CoordinationContextHelper.serialise(env, headerElement, coordinationContext) ;
             }
         }
-        catch (final Throwable th) 
+        catch (final Throwable th)
         {
 	    wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.client.JaxRPCHCP_1",
 					  new Object[]{"com.arjuna.mw.wst.client.JaxRPCHeaderContextProcessor.handleRequest()"});
@@ -199,7 +199,7 @@
         resumeTransaction(messageContext) ;
         return true ;
     }
-    
+
     /**
      * Handle the fault.
      * @param messageContext The current message context.
@@ -209,25 +209,25 @@
         resumeTransaction(messageContext) ;
         return true ;
     }
-    
+
     /**
      * Resume the current transaction.
      *
-     * @message com.arjuna.mw.wst.client.JaxRPCHCP_3 [com.arjuna.mw.wst.client.JaxRPCHCP_3] - Unknown context type: 
+     * @message com.arjuna.mw.wst.client.JaxRPCHCP_3 [com.arjuna.mw.wst.client.JaxRPCHCP_3] - Unknown context type:
      */
 
     private void resumeTransaction(final MessageContext messageContext)
     {
         final SOAPMessageContext soapMessageContext = (SOAPMessageContext)messageContext ;
         final SOAPMessage soapMessage = soapMessageContext.getMessage() ;
-        
+
         if (soapMessage != null)
         {
             try
             {
                 final SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope() ;
                 final SOAPHeaderElement soapHeaderElement = getHeaderElement(soapEnvelope, CoordinationConstants.WSCOOR_NAMESPACE, CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT) ;
-                
+
                 if (soapHeaderElement != null)
                 {
                     final CoordinationContextType cc = CoordinationContextHelper.deserialise(soapEnvelope, soapHeaderElement) ;
@@ -255,7 +255,7 @@
                     }
                 }
             }
-            catch (final Throwable th) 
+            catch (final Throwable th)
             {
         		wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.client.JaxRPCHCP_1",
                     new Object[]{"com.arjuna.mw.wst.client.JaxRPCHeaderContextProcessor.resumeTransaction()"});
@@ -294,7 +294,7 @@
         }
         return null ;
     }
-    
+
     /**
      * Do the two references match?
      * @param lhs The first reference.

Modified: labs/jbosstm/trunk/XTS/WSTX/classes/com/arjuna/mw/wst/service/JaxRPCHeaderContextProcessor.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/classes/com/arjuna/mw/wst/service/JaxRPCHeaderContextProcessor.java	2007-04-20 11:00:44 UTC (rev 11150)
+++ labs/jbosstm/trunk/XTS/WSTX/classes/com/arjuna/mw/wst/service/JaxRPCHeaderContextProcessor.java	2007-04-20 11:35:38 UTC (rev 11151)
@@ -1,20 +1,20 @@
 /*
  * 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 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -63,9 +63,9 @@
  * The class is used to perform WS-Transaction context insertion
  * and extraction for application level SOAP messages using JaxRPC.
  *
- * @message com.arjuna.mw.wst.service.JaxRPCHCP_1 [com.arjuna.mw.wst.service.JaxRPCHCP_1] - Error in: 
- * @message com.arjuna.mw.wst.service.JaxRPCHCP_2 [com.arjuna.mw.wst.service.JaxRPCHCP_2] - Stack trace: 
- * @message com.arjuna.mw.wst.service.JaxRPCHCP_3 [com.arjuna.mw.wst.service.JaxRPCHCP_3] - Unknown context type: 
+ * @message com.arjuna.mw.wst.service.JaxRPCHCP_1 [com.arjuna.mw.wst.service.JaxRPCHCP_1] - Error in:
+ * @message com.arjuna.mw.wst.service.JaxRPCHCP_2 [com.arjuna.mw.wst.service.JaxRPCHCP_2] - Stack trace:
+ * @message com.arjuna.mw.wst.service.JaxRPCHCP_3 [com.arjuna.mw.wst.service.JaxRPCHCP_3] - Unknown context type:
  */
 
 public class JaxRPCHeaderContextProcessor implements Handler
@@ -74,7 +74,7 @@
      * The handler information.
      */
     private HandlerInfo handlerInfo ;
-    
+
     /**
      * Initialise the handler information.
      * @param handlerInfo The handler information.
@@ -83,32 +83,32 @@
     {
         this.handlerInfo = handlerInfo ;
     }
-    
+
     /**
      * Destroy the handler.
      */
     public void destroy()
     {
     }
-    
+
     /**
      * Get the headers.
      * @return the headers.
      */
     public QName[] getHeaders()
     {
-        return handlerInfo.getHeaders() ;
+		return new QName[] {new QName(CoordinationConstants.WSCOOR_NAMESPACE, CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT)};
     }
-    
+
     /**
      * Handle the request.
      * @param messageContext The current message context.
      */
     public boolean handleRequest(final MessageContext messageContext)
     {
-        final SOAPMessageContext soapMessageContext = (SOAPMessageContext)messageContext ;
+		final SOAPMessageContext soapMessageContext = (SOAPMessageContext)messageContext ;
         final SOAPMessage soapMessage = soapMessageContext.getMessage() ;
-        
+
         if (soapMessage != null)
         {
             try
@@ -116,7 +116,7 @@
                 final SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope() ;
                 final SOAPHeader soapHeader = soapEnvelope.getHeader() ;
                 final SOAPHeaderElement soapHeaderElement = getHeaderElement(soapHeader, CoordinationConstants.WSCOOR_NAMESPACE, CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT) ;
-                
+
                 if (soapHeaderElement != null)
                 {
                     final CoordinationContextType cc = CoordinationContextHelper.deserialise(soapEnvelope, soapHeaderElement) ;
@@ -143,7 +143,7 @@
                     }
                 }
             }
-            catch (final Throwable th) 
+            catch (final Throwable th)
             {
         		wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.service.JaxRPCHCP_1",
                     new Object[]{"com.arjuna.mw.wst.service.JaxRPCHeaderContextProcessor.handleRequest(MessageContext context)"});
@@ -164,7 +164,7 @@
         suspendTransaction() ;
         return true ;
     }
-    
+
     /**
      * Handle the fault.
      * @param messageContext The current message context.
@@ -174,13 +174,13 @@
         suspendTransaction() ;
         return true ;
     }
-    
+
     /**
      * Suspend the current transaction.
      */
     private void suspendTransaction()
     {
-        try 
+        try
         {
             /*
              * There should either be an Atomic Transaction *or* a Business Activity
@@ -193,13 +193,13 @@
             {
                 transactionManager.suspend() ;
             }
-            
+
             if (businessActivityManager != null)
             {
                 businessActivityManager.suspend() ;
             }
         }
-        catch (final Throwable th) 
+        catch (final Throwable th)
         {
 	    wstxLogger.arjLoggerI18N.warn("com.arjuna.mw.wst.service.JaxRPCHCP_1",
 					  new Object[]{"com.arjuna.mw.wst.service.JaxRPCHeaderContextProcessor.suspendTransaction()"});
@@ -238,7 +238,7 @@
         }
         return null ;
     }
-    
+
     /**
      * Do the two references match?
      * @param lhs The first reference.
@@ -256,7 +256,7 @@
             return lhs.equals(rhs) ;
         }
     }
-    
+
     /**
      * Clear the soap MustUnderstand.
      * @param soapHeader The SOAP header.
@@ -266,10 +266,10 @@
     	throws SOAPException
     {
 	final Name headerName = soapHeader.getElementName() ;
-	
+
 	final SOAPFactory factory = SOAPFactory.newInstance() ;
 	final Name attributeName = factory.createName("mustUnderstand", headerName.getPrefix(), headerName.getURI()) ;
-	
+
 	soapHeaderElement.removeAttribute(attributeName) ;
     }
 }

Modified: labs/jbosstm/trunk/XTS/demo/dd/jboss/webservices.xml
===================================================================
--- labs/jbosstm/trunk/XTS/demo/dd/jboss/webservices.xml	2007-04-20 11:00:44 UTC (rev 11150)
+++ labs/jbosstm/trunk/XTS/demo/dd/jboss/webservices.xml	2007-04-20 11:35:38 UTC (rev 11151)
@@ -1,20 +1,20 @@
 <!--
   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 
+  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 
+  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, 
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
   MA  02110-1301, USA.
-  
+
   (C) 2005-2006,
   @author JBoss Inc.
 -->
@@ -24,9 +24,9 @@
 
 	<webservice-description>
 		<webservice-description-name>RestaurantServiceAT</webservice-description-name>
-		
+
 		<wsdl-file>WEB-INF/wsdl/RestaurantServiceAT.wsdl</wsdl-file>
-		
+
 		<jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
 		<port-component>
 			<port-component-name>RestaurantServiceAT</port-component-name>
@@ -43,9 +43,9 @@
 	</webservice-description>
 	<webservice-description>
 		<webservice-description-name>RestaurantServiceBA</webservice-description-name>
-		
+
 		<wsdl-file>WEB-INF/wsdl/RestaurantServiceBA.wsdl</wsdl-file>
-		
+
 		<jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
 		<port-component>
 			<port-component-name>RestaurantServiceBA</port-component-name>
@@ -62,9 +62,9 @@
 	</webservice-description>
 	<webservice-description>
 		<webservice-description-name>TheatreServiceAT</webservice-description-name>
-		
+
 		<wsdl-file>WEB-INF/wsdl/TheatreServiceAT.wsdl</wsdl-file>
-		
+
 		<jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
 		<port-component>
 			<port-component-name>TheatreServiceAT</port-component-name>
@@ -81,9 +81,9 @@
 	</webservice-description>
 	<webservice-description>
 		<webservice-description-name>TheatreServiceBA</webservice-description-name>
-		
+
 		<wsdl-file>WEB-INF/wsdl/TheatreServiceBA.wsdl</wsdl-file>
-		
+
 		<jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
 		<port-component>
 			<port-component-name>TheatreServiceBA</port-component-name>
@@ -100,9 +100,9 @@
 	</webservice-description>
 	<webservice-description>
 		<webservice-description-name>TaxiServiceAT</webservice-description-name>
-		
+
 		<wsdl-file>WEB-INF/wsdl/TaxiServiceAT.wsdl</wsdl-file>
-		
+
 		<jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
 		<port-component>
 			<port-component-name>TaxiServiceAT</port-component-name>
@@ -119,9 +119,9 @@
 	</webservice-description>
 	<webservice-description>
 		<webservice-description-name>TaxiServiceBA</webservice-description-name>
-		
+
 		<wsdl-file>WEB-INF/wsdl/TaxiServiceBA.wsdl</wsdl-file>
-		
+
 		<jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
 		<port-component>
 			<port-component-name>TaxiServiceBA</port-component-name>




More information about the jboss-svn-commits mailing list