[jboss-svn-commits] JBL Code SVN: r20566 - in labs/jbossesb/workspace/jdelong/wstx/trunk/product: samples/xts/NightOut/src/main/java/org/jboss/nightout and 5 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Jun 17 19:28:11 EDT 2008


Author: jeffdelong
Date: 2008-06-17 19:28:11 -0400 (Tue, 17 Jun 2008)
New Revision: 20566

Added:
   labs/jbossesb/workspace/jdelong/wstx/trunk/product/samples/xts/NightOut/src/main/java/org/jboss/nightout/InvokeRestaurantAction.java
   labs/jbossesb/workspace/jdelong/wstx/trunk/product/samples/xts/NightOut/src/main/java/org/jboss/nightout/InvokeTaxiAction.java
   labs/jbossesb/workspace/jdelong/wstx/trunk/product/samples/xts/NightOut/src/main/java/org/jboss/nightout/InvokeTheatreAction.java
   labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/ext/jbossjta.jar
   labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/ext/ws-c.jar
   labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/ext/ws-t.jar
   labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/ext/wsas.jar
   labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/ext/wscf.jar
   labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/ext/wstx.jar
Removed:
   labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/conf/
   labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/ext/jbossesb-rosetta.jar
   labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/ext/jbossesb-soap.jar
   labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/ext/jbossjta.jar
   labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/jbossjta.jar
   labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/nightoutwebservices.jar
   labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/ws-c.jar
   labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/ws-t.jar
   labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/wsas.jar
   labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/wscf.jar
   labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/wstx.jar
   labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/src/main/java/org/jboss/soa/esb/actions/InvokeRestaurantAction.java
   labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/src/main/java/org/jboss/soa/esb/actions/InvokeTaxiAction.java
   labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/src/main/java/org/jboss/soa/esb/actions/InvokeTheatreAction.java
Modified:
   labs/jbossesb/workspace/jdelong/wstx/trunk/product/build.xml
   labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/build.xml
Log:


Modified: labs/jbossesb/workspace/jdelong/wstx/trunk/product/build.xml
===================================================================
--- labs/jbossesb/workspace/jdelong/wstx/trunk/product/build.xml	2008-06-17 23:00:46 UTC (rev 20565)
+++ labs/jbossesb/workspace/jdelong/wstx/trunk/product/build.xml	2008-06-17 23:28:11 UTC (rev 20566)
@@ -190,6 +190,7 @@
 		<pathelement path="services/soapui-client/src/main/java"/>
 		<pathelement path="services/smooks/src/main/java"/>
 		<pathelement path="services/spring/src/main/java"/>
+		<pathelement path="services/xts/src/main/java"/>
 	</path>
 	
 

Copied: labs/jbossesb/workspace/jdelong/wstx/trunk/product/samples/xts/NightOut/src/main/java/org/jboss/nightout/InvokeRestaurantAction.java (from rev 20543, labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/src/main/java/org/jboss/soa/esb/actions/InvokeRestaurantAction.java)
===================================================================
--- labs/jbossesb/workspace/jdelong/wstx/trunk/product/samples/xts/NightOut/src/main/java/org/jboss/nightout/InvokeRestaurantAction.java	                        (rev 0)
+++ labs/jbossesb/workspace/jdelong/wstx/trunk/product/samples/xts/NightOut/src/main/java/org/jboss/nightout/InvokeRestaurantAction.java	2008-06-17 23:28:11 UTC (rev 20566)
@@ -0,0 +1,198 @@
+/*
+ * 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 General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * BasicClient.java
+ *
+ * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
+ *
+ * $Id: BasicClient.java,v 1.10 2004/12/02 16:52:58 kconner Exp $
+ *
+ */
+
+package org.jboss.soa.esb.actions;
+
+
+import com.arjuna.mw.wst.client.JaxWSHeaderContextProcessor;
+
+import com.jboss.jbosstm.xts.demo.restaurant.IRestaurantServiceBA;
+
+
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.handler.Handler;
+
+import org.apache.log4j.Logger;
+import org.jboss.nightout.Reservation;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Collections;
+import java.util.List;
+
+/**
+  *
+ * @author Jeff DeLong (jdelong at redhat.com)
+  */
+public class InvokeRestaurantAction extends AbstractActionLifecycle {
+	
+	
+	protected ConfigTree _config;
+    	
+ 
+	private Logger logger = Logger.getLogger(InvokeRestaurantAction.class);
+	
+
+    /***** RESTAURANT SERVICE *****/
+
+    /**
+     * The namespace for the Restaurant webservice.
+     */
+    private static final String RESTAURANT_NS = "http://www.jboss.com/jbosstm/xts/demo/Restaurant" ;
+    /**
+     * The prefix for the Restaurant webservice.
+     */
+    private static final String RESTAURANT_PREFIX = "restaurant";
+    /**
+     * The local name for the BA Restaurant webservice.
+     */
+    private static final String RESTAURANT_SERVICE_BA = "RestaurantServiceBAService" ;
+    /**
+     * The QName for the AT Restaurant webservice.
+     */
+    private static final QName RESTAURANT_SERVICE_BA_QNAME
+            = new QName(RESTAURANT_NS, RESTAURANT_SERVICE_BA, RESTAURANT_PREFIX);
+      /**
+     * The local name for the BA Restaurant endpoint.
+     */
+    private static final String RESTAURANT_ENDPOINT_BA = "RestaurantServiceBA";
+    /**
+     * The QName for the BA Restaurant endpoint.
+     */
+    private static final QName RESTAURANT_ENDPOINT_BA_QNAME
+            = new QName(RESTAURANT_NS, RESTAURANT_ENDPOINT_BA, RESTAURANT_PREFIX);
+
+ 
+    /***** Client Handles for Service Endpoint Ports *****/
+
+     /**
+     * The business activity restaurant stub.
+     */
+    private IRestaurantServiceBA restaurantBA;
+
+    /***** Endpoint Addresses *****/
+
+    /**
+     * URL of restaurant BA
+     */
+    private String restaurantBAURL ;
+    /***** WSDL file locations *****/
+
+     /**
+     * URL of restaurant BA
+     */
+    private final String restaurantBAWSDL = "wsdl/RestaurantServiceBA.wsdl";
+ 
+     
+    final String baseURL = "http://127.0.0.1:8080/xtsdemowebservices/" ;
+
+    /**
+     * The client serial version UID.
+     */
+    private static final long serialVersionUID = 7728495576623420083L ;
+
+	public InvokeRestaurantAction(ConfigTree _config) {
+		
+	
+		this._config = _config;
+		
+	}
+
+	
+	public void initialise() throws ActionLifecycleException {
+
+		try {	
+			restaurantBAURL = baseURL + RESTAURANT_SERVICE_BA;
+			System.out.println("restaurantBAURL is: " + restaurantBAURL);
+		
+ 	        restaurantBA = getService(RESTAURANT_SERVICE_BA_QNAME, RESTAURANT_ENDPOINT_BA_QNAME,
+	                    restaurantBAURL, restaurantBAWSDL, IRestaurantServiceBA.class);
+ 	        
+ 	        System.out.println("restaurantBA is: " + restaurantBA);
+	        configureClientHandler((BindingProvider)restaurantBA);
+		}
+        catch (final Exception ex)
+        {
+            ex.printStackTrace();
+        }
+
+    }   
+	
+     /**
+     * configure the XTS client handler which manages transaction flow for invocations of the services
+     *
+     * @param bindingProvider
+     */
+    private void configureClientHandler(BindingProvider bindingProvider)
+    {
+        Handler handler = new JaxWSHeaderContextProcessor();
+        List<Handler> handlers = Collections.singletonList(handler);
+        bindingProvider.getBinding().setHandlerChain(handlers);
+    }
+
+
+     public Message process(Message message) throws ActionProcessingFaultException {
+         
+        Reservation reservation = (Reservation) message.getBody().get("Reservation");
+
+    	int restaurantSeats = reservation.getRestaurantSeats();
+    	 
+    	boolean restaurantStatus = restaurantBA.bookSeats(restaurantSeats);
+    	
+    	reservation.setRestaurantStatus(restaurantStatus);
+  
+    	return message;
+    	 
+     }
+
+
+     
+    /**
+     * Get an endpoint reference for a service so we can create a JaxWS port for it
+     * @param serviceName the QName of the service in question..
+     * @param endpointName the QName of the endpoint associated with the service
+     * @param address a string representation of the service URL. null is ok if this is a service located in the
+     * same app as the client
+     * @return a W3CEndpointReference from which the service port can be obtained.
+     */
+    private <T> T getService(final QName serviceName, final QName endpointName,
+                                            final String address, final String wsdlURL, final Class<T> clazz)
+            throws MalformedURLException
+    {
+        URL url = InvokeRestaurantAction.class.getResource("/" + wsdlURL);
+        Service service = Service.create(url, serviceName);
+        T port = service.getPort(endpointName, clazz);
+        return port;
+    }
+}

Copied: labs/jbossesb/workspace/jdelong/wstx/trunk/product/samples/xts/NightOut/src/main/java/org/jboss/nightout/InvokeTaxiAction.java (from rev 20543, labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/src/main/java/org/jboss/soa/esb/actions/InvokeTaxiAction.java)
===================================================================
--- labs/jbossesb/workspace/jdelong/wstx/trunk/product/samples/xts/NightOut/src/main/java/org/jboss/nightout/InvokeTaxiAction.java	                        (rev 0)
+++ labs/jbossesb/workspace/jdelong/wstx/trunk/product/samples/xts/NightOut/src/main/java/org/jboss/nightout/InvokeTaxiAction.java	2008-06-17 23:28:11 UTC (rev 20566)
@@ -0,0 +1,195 @@
+/*
+ * 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 General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * BasicClient.java
+ *
+ * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
+ *
+ * $Id: BasicClient.java,v 1.10 2004/12/02 16:52:58 kconner Exp $
+ *
+ */
+
+package org.jboss.soa.esb.actions;
+
+
+import com.arjuna.mw.wst.client.JaxWSHeaderContextProcessor;
+import com.jboss.jbosstm.xts.demo.taxi.ITaxiServiceBA;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.handler.Handler;
+
+import org.apache.log4j.Logger;
+import org.jboss.nightout.Reservation;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Collections;
+import java.util.List;
+
+/**
+  *
+ * @author Jeff DeLong (jdelong at redhat.com)
+  */
+public class InvokeTaxiAction extends AbstractActionLifecycle {
+	
+	
+	protected ConfigTree _config;
+    	
+ 
+	private Logger logger = Logger.getLogger(InvokeTaxiAction.class);
+	
+
+    /***** taxi SERVICE *****/
+
+    /**
+     * The namespace for the taxi webservice.
+     */
+    private static final String TAXI_NS = "http://www.jboss.com/jbosstm/xts/demo/Taxi" ;
+    /**
+     * The prefix for the taxi webservice.
+     */
+    private static final String TAXI_PREFIX = "taxi";
+    /**
+     * The local name for the BA taxi webservice.
+     */
+    private static final String TAXI_SERVICE_BA = "TaxiServiceBAService" ;
+    /**
+     * The QName for the AT taxi webservice.
+     */
+    private static final QName TAXI_SERVICE_BA_QNAME
+            = new QName(TAXI_NS, TAXI_SERVICE_BA, TAXI_PREFIX);
+      /**
+     * The local name for the BA taxi endpoint.
+     */
+    private static final String TAXI_ENDPOINT_BA = "TaxiServiceBA";
+    /**
+     * The QName for the BA taxi endpoint.
+     */
+    private static final QName TAXI_ENDPOINT_BA_QNAME
+            = new QName(TAXI_NS, TAXI_ENDPOINT_BA, TAXI_PREFIX);
+
+ 
+    /***** Client Handles for Service Endpoint Ports *****/
+
+     /**
+     * The business activity taxi stub.
+     */
+    private ITaxiServiceBA taxiBA;
+
+    /***** Endpoint Addresses *****/
+
+    /**
+     * URL of taxi BA
+     */
+    private String taxiBAURL ;
+    /***** WSDL file locations *****/
+
+     /**
+     * URL of taxi BA
+     */
+    private final String taxiBAWSDL = "wsdl/TaxiServiceBA.wsdl";
+ 
+     
+    final String baseURL = "http://127.0.0.1:8080/xtsdemowebservices/" ;
+
+    /**
+     * The client serial version UID.
+     */
+    private static final long serialVersionUID = 7728495576623420083L ;
+
+	public InvokeTaxiAction(ConfigTree _config) {
+		
+	
+		this._config = _config;
+		
+	}
+
+	
+	public void initialise() throws ActionLifecycleException {
+
+		try {	
+			taxiBAURL = baseURL + TAXI_SERVICE_BA;
+			System.out.println("taxiBAURL is: " + taxiBAURL);
+		
+ 	        taxiBA = getService(TAXI_SERVICE_BA_QNAME, TAXI_ENDPOINT_BA_QNAME,
+	                    taxiBAURL, taxiBAWSDL, ITaxiServiceBA.class);
+ 	        
+ 	        System.out.println("taxiBA is: " + taxiBA);
+	        configureClientHandler((BindingProvider)taxiBA);
+		}
+        catch (final Exception ex)
+        {
+            ex.printStackTrace();
+        }
+
+    }   
+	
+     /**
+     * configure the XTS client handler which manages transaction flow for invocations of the services
+     *
+     * @param bindingProvider
+     */
+    private void configureClientHandler(BindingProvider bindingProvider)
+    {
+        Handler handler = new JaxWSHeaderContextProcessor();
+        List<Handler> handlers = Collections.singletonList(handler);
+        bindingProvider.getBinding().setHandlerChain(handlers);
+    }
+
+
+     public Message process(Message message) throws ActionProcessingFaultException {
+         
+        Reservation reservation = (Reservation) message.getBody().get("Reservation");
+
+    	boolean bookTaxi = reservation.getBookTaxi();
+    	 
+    	boolean taxiStatus = taxiBA.bookTaxi();
+    	 
+    	reservation.setTaxiStatus(taxiStatus);
+  
+    	return message;
+    	 
+     }
+
+
+     
+    /**
+     * Get an endpoint reference for a service so we can create a JaxWS port for it
+     * @param serviceName the QName of the service in question..
+     * @param endpointName the QName of the endpoint associated with the service
+     * @param address a string representation of the service URL. null is ok if this is a service located in the
+     * same app as the client
+     * @return a W3CEndpointReference from which the service port can be obtained.
+     */
+    private <T> T getService(final QName serviceName, final QName endpointName,
+                                            final String address, final String wsdlURL, final Class<T> clazz)
+            throws MalformedURLException
+    {
+        URL url = InvokeTaxiAction.class.getResource("/" + wsdlURL);
+        Service service = Service.create(url, serviceName);
+        T port = service.getPort(endpointName, clazz);
+        return port;
+    }
+}

Copied: labs/jbossesb/workspace/jdelong/wstx/trunk/product/samples/xts/NightOut/src/main/java/org/jboss/nightout/InvokeTheatreAction.java (from rev 20543, labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/src/main/java/org/jboss/soa/esb/actions/InvokeTheatreAction.java)
===================================================================
--- labs/jbossesb/workspace/jdelong/wstx/trunk/product/samples/xts/NightOut/src/main/java/org/jboss/nightout/InvokeTheatreAction.java	                        (rev 0)
+++ labs/jbossesb/workspace/jdelong/wstx/trunk/product/samples/xts/NightOut/src/main/java/org/jboss/nightout/InvokeTheatreAction.java	2008-06-17 23:28:11 UTC (rev 20566)
@@ -0,0 +1,196 @@
+/*
+ * 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 General Public License, v. 2.0.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * BasicClient.java
+ *
+ * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
+ *
+ * $Id: BasicClient.java,v 1.10 2004/12/02 16:52:58 kconner Exp $
+ *
+ */
+
+package org.jboss.soa.esb.actions;
+
+
+import com.arjuna.mw.wst.client.JaxWSHeaderContextProcessor;
+import com.jboss.jbosstm.xts.demo.theatre.ITheatreServiceBA;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.handler.Handler;
+
+import org.apache.log4j.Logger;
+import org.jboss.nightout.Reservation;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Collections;
+import java.util.List;
+
+/**
+  *
+ * @author Jeff DeLong (jdelong at redhat.com)
+  */
+public class InvokeTheatreAction extends AbstractActionLifecycle {
+	
+	
+	protected ConfigTree _config;
+    	
+ 
+	private Logger logger = Logger.getLogger(InvokeTheatreAction.class);
+	
+
+    /***** theatre SERVICE *****/
+
+    /**
+     * The namespace for the theatre webservice.
+     */
+    private static final String THEATRE_NS = "http://www.jboss.com/jbosstm/xts/demo/Theatre" ;
+    /**
+     * The prefix for the theatre webservice.
+     */
+    private static final String THEATRE_PREFIX = "theatre";
+    /**
+     * The local name for the BA theatre webservice.
+     */
+    private static final String THEATRE_SERVICE_BA = "TheatreServiceBAService" ;
+    /**
+     * The QName for the AT theatre webservice.
+     */
+    private static final QName THEATRE_SERVICE_BA_QNAME
+            = new QName(THEATRE_NS, THEATRE_SERVICE_BA, THEATRE_PREFIX);
+      /**
+     * The local name for the BA theatre endpoint.
+     */
+    private static final String THEATRE_ENDPOINT_BA = "TheatreServiceBA";
+    /**
+     * The QName for the BA theatre endpoint.
+     */
+    private static final QName THEATRE_ENDPOINT_BA_QNAME
+            = new QName(THEATRE_NS, THEATRE_ENDPOINT_BA, THEATRE_PREFIX);
+
+ 
+    /***** Client Handles for Service Endpoint Ports *****/
+
+     /**
+     * The business activity theatre stub.
+     */
+    private ITheatreServiceBA theatreBA;
+
+    /***** Endpoint Addresses *****/
+
+    /**
+     * URL of theatre BA
+     */
+    private String theatreBAURL ;
+    /***** WSDL file locations *****/
+
+     /**
+     * URL of theatre BA
+     */
+    private final String theatreBAWSDL = "wsdl/TheatreServiceBA.wsdl";
+ 
+     
+    final String baseURL = "http://127.0.0.1:8080/xtsdemowebservices/" ;
+
+    /**
+     * The client serial version UID.
+     */
+    private static final long serialVersionUID = 7728495576623420083L ;
+
+	public InvokeTheatreAction(ConfigTree _config) {
+		
+	
+		this._config = _config;
+		
+	}
+
+	
+	public void initialise() throws ActionLifecycleException {
+
+		try {	
+			theatreBAURL = baseURL + THEATRE_SERVICE_BA;
+			System.out.println("theatreBAURL is: " + theatreBAURL);
+		
+ 	        theatreBA = getService(THEATRE_SERVICE_BA_QNAME, THEATRE_ENDPOINT_BA_QNAME,
+	                    theatreBAURL, theatreBAWSDL, ITheatreServiceBA.class);
+ 	        
+ 	        System.out.println("theatreBA is: " + theatreBA);
+	        configureClientHandler((BindingProvider)theatreBA);
+		}
+        catch (final Exception ex)
+        {
+            ex.printStackTrace();
+        }
+
+    }   
+	
+     /**
+     * configure the XTS client handler which manages transaction flow for invocations of the services
+     *
+     * @param bindingProvider
+     */
+    private void configureClientHandler(BindingProvider bindingProvider)
+    {
+        Handler handler = new JaxWSHeaderContextProcessor();
+        List<Handler> handlers = Collections.singletonList(handler);
+        bindingProvider.getBinding().setHandlerChain(handlers);
+    }
+
+
+     public Message process(Message message) throws ActionProcessingFaultException {
+         
+        Reservation reservation = (Reservation) message.getBody().get("Reservation");
+
+    	int theatreSeats = reservation.getTheatreSeats();
+       	int theatreArea = reservation.getTheatreSeats();
+   	 
+    	boolean theatreStatus = theatreBA.bookSeats(theatreSeats, theatreArea);
+    	 
+    	reservation.setTheatreStatus(theatreStatus);
+  
+    	return message;
+    	 
+     }
+
+
+     
+    /**
+     * Get an endpoint reference for a service so we can create a JaxWS port for it
+     * @param serviceName the QName of the service in question..
+     * @param endpointName the QName of the endpoint associated with the service
+     * @param address a string representation of the service URL. null is ok if this is a service located in the
+     * same app as the client
+     * @return a W3CEndpointReference from which the service port can be obtained.
+     */
+    private <T> T getService(final QName serviceName, final QName endpointName,
+                                            final String address, final String wsdlURL, final Class<T> clazz)
+            throws MalformedURLException
+    {
+        URL url = InvokeTheatreAction.class.getResource("/" + wsdlURL);
+        Service service = Service.create(url, serviceName);
+        T port = service.getPort(endpointName, clazz);
+        return port;
+    }
+}

Modified: labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/build.xml
===================================================================
--- labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/build.xml	2008-06-17 23:00:46 UTC (rev 20565)
+++ labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/build.xml	2008-06-17 23:28:11 UTC (rev 20566)
@@ -11,6 +11,7 @@
         <ant dir="soap" target="dist"/>
         <ant dir="spring" target="dist"/>
     	<ant dir="slsb" target="dist"/>
+       	<ant dir="xts" target="dist"/>
     </target>
 
     <target name="clean">
@@ -22,7 +23,8 @@
 		<ant dir="soap" target="clean"/>
         <ant dir="spring" target="clean"/>
     	<ant dir="slsb" target="clean"/>
-    </target>
+       	<ant dir="xts" target="clean"/>
+        </target>
 
     <target name="test">
 		<ant dir="jbossesb" target="test"/>
@@ -33,6 +35,7 @@
 		<ant dir="soap" target="test"/>
 		<ant dir="spring" target="test"/>
     	<ant dir="slsb" target="test"/>
+    	<ant dir="xts" target="test"/>
     </target>
 	
 </project>

Deleted: labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/ext/jbossesb-rosetta.jar
===================================================================
(Binary files differ)

Deleted: labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/ext/jbossesb-soap.jar
===================================================================
(Binary files differ)

Deleted: labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/ext/jbossjta.jar
===================================================================
(Binary files differ)

Copied: labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/ext/jbossjta.jar (from rev 20543, labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/jbossjta.jar)
===================================================================
(Binary files differ)

Copied: labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/ext/ws-c.jar (from rev 20543, labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/ws-c.jar)
===================================================================
(Binary files differ)

Copied: labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/ext/ws-t.jar (from rev 20543, labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/ws-t.jar)
===================================================================
(Binary files differ)

Copied: labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/ext/wsas.jar (from rev 20543, labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/wsas.jar)
===================================================================
(Binary files differ)

Copied: labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/ext/wscf.jar (from rev 20543, labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/wscf.jar)
===================================================================
(Binary files differ)

Copied: labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/ext/wstx.jar (from rev 20543, labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/wstx.jar)
===================================================================
(Binary files differ)

Deleted: labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/jbossjta.jar
===================================================================
(Binary files differ)

Deleted: labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/nightoutwebservices.jar
===================================================================
(Binary files differ)

Deleted: labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/ws-c.jar
===================================================================
(Binary files differ)

Deleted: labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/ws-t.jar
===================================================================
(Binary files differ)

Deleted: labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/wsas.jar
===================================================================
(Binary files differ)

Deleted: labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/wscf.jar
===================================================================
(Binary files differ)

Deleted: labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/lib/wstx.jar
===================================================================
(Binary files differ)

Deleted: labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/src/main/java/org/jboss/soa/esb/actions/InvokeRestaurantAction.java
===================================================================
--- labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/src/main/java/org/jboss/soa/esb/actions/InvokeRestaurantAction.java	2008-06-17 23:00:46 UTC (rev 20565)
+++ labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/src/main/java/org/jboss/soa/esb/actions/InvokeRestaurantAction.java	2008-06-17 23:28:11 UTC (rev 20566)
@@ -1,198 +0,0 @@
-/*
- * 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 General Public License, v. 2.0.
- * This program is distributed in the hope that it will be useful, but WITHOUT A 
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
- * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
- * You should have received a copy of the GNU General Public License,
- * v. 2.0 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
- * MA  02110-1301, USA.
- * 
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-/*
- * BasicClient.java
- *
- * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
- *
- * $Id: BasicClient.java,v 1.10 2004/12/02 16:52:58 kconner Exp $
- *
- */
-
-package org.jboss.soa.esb.actions;
-
-
-import com.arjuna.mw.wst.client.JaxWSHeaderContextProcessor;
-
-import com.jboss.jbosstm.xts.demo.restaurant.IRestaurantServiceBA;
-
-
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Service;
-import javax.xml.ws.handler.Handler;
-
-import org.apache.log4j.Logger;
-import org.jboss.nightout.Reservation;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Collections;
-import java.util.List;
-
-/**
-  *
- * @author Jeff DeLong (jdelong at redhat.com)
-  */
-public class InvokeRestaurantAction extends AbstractActionLifecycle {
-	
-	
-	protected ConfigTree _config;
-    	
- 
-	private Logger logger = Logger.getLogger(InvokeRestaurantAction.class);
-	
-
-    /***** RESTAURANT SERVICE *****/
-
-    /**
-     * The namespace for the Restaurant webservice.
-     */
-    private static final String RESTAURANT_NS = "http://www.jboss.com/jbosstm/xts/demo/Restaurant" ;
-    /**
-     * The prefix for the Restaurant webservice.
-     */
-    private static final String RESTAURANT_PREFIX = "restaurant";
-    /**
-     * The local name for the BA Restaurant webservice.
-     */
-    private static final String RESTAURANT_SERVICE_BA = "RestaurantServiceBAService" ;
-    /**
-     * The QName for the AT Restaurant webservice.
-     */
-    private static final QName RESTAURANT_SERVICE_BA_QNAME
-            = new QName(RESTAURANT_NS, RESTAURANT_SERVICE_BA, RESTAURANT_PREFIX);
-      /**
-     * The local name for the BA Restaurant endpoint.
-     */
-    private static final String RESTAURANT_ENDPOINT_BA = "RestaurantServiceBA";
-    /**
-     * The QName for the BA Restaurant endpoint.
-     */
-    private static final QName RESTAURANT_ENDPOINT_BA_QNAME
-            = new QName(RESTAURANT_NS, RESTAURANT_ENDPOINT_BA, RESTAURANT_PREFIX);
-
- 
-    /***** Client Handles for Service Endpoint Ports *****/
-
-     /**
-     * The business activity restaurant stub.
-     */
-    private IRestaurantServiceBA restaurantBA;
-
-    /***** Endpoint Addresses *****/
-
-    /**
-     * URL of restaurant BA
-     */
-    private String restaurantBAURL ;
-    /***** WSDL file locations *****/
-
-     /**
-     * URL of restaurant BA
-     */
-    private final String restaurantBAWSDL = "wsdl/RestaurantServiceBA.wsdl";
- 
-     
-    final String baseURL = "http://127.0.0.1:8080/xtsdemowebservices/" ;
-
-    /**
-     * The client serial version UID.
-     */
-    private static final long serialVersionUID = 7728495576623420083L ;
-
-	public InvokeRestaurantAction(ConfigTree _config) {
-		
-	
-		this._config = _config;
-		
-	}
-
-	
-	public void initialise() throws ActionLifecycleException {
-
-		try {	
-			restaurantBAURL = baseURL + RESTAURANT_SERVICE_BA;
-			System.out.println("restaurantBAURL is: " + restaurantBAURL);
-		
- 	        restaurantBA = getService(RESTAURANT_SERVICE_BA_QNAME, RESTAURANT_ENDPOINT_BA_QNAME,
-	                    restaurantBAURL, restaurantBAWSDL, IRestaurantServiceBA.class);
- 	        
- 	        System.out.println("restaurantBA is: " + restaurantBA);
-	        configureClientHandler((BindingProvider)restaurantBA);
-		}
-        catch (final Exception ex)
-        {
-            ex.printStackTrace();
-        }
-
-    }   
-	
-     /**
-     * configure the XTS client handler which manages transaction flow for invocations of the services
-     *
-     * @param bindingProvider
-     */
-    private void configureClientHandler(BindingProvider bindingProvider)
-    {
-        Handler handler = new JaxWSHeaderContextProcessor();
-        List<Handler> handlers = Collections.singletonList(handler);
-        bindingProvider.getBinding().setHandlerChain(handlers);
-    }
-
-
-     public Message process(Message message) throws ActionProcessingFaultException {
-         
-        Reservation reservation = (Reservation) message.getBody().get("Reservation");
-
-    	int restaurantSeats = reservation.getRestaurantSeats();
-    	 
-    	boolean restaurantStatus = restaurantBA.bookSeats(restaurantSeats);
-    	
-    	reservation.setRestaurantStatus(restaurantStatus);
-  
-    	return message;
-    	 
-     }
-
-
-     
-    /**
-     * Get an endpoint reference for a service so we can create a JaxWS port for it
-     * @param serviceName the QName of the service in question..
-     * @param endpointName the QName of the endpoint associated with the service
-     * @param address a string representation of the service URL. null is ok if this is a service located in the
-     * same app as the client
-     * @return a W3CEndpointReference from which the service port can be obtained.
-     */
-    private <T> T getService(final QName serviceName, final QName endpointName,
-                                            final String address, final String wsdlURL, final Class<T> clazz)
-            throws MalformedURLException
-    {
-        URL url = InvokeRestaurantAction.class.getResource("/" + wsdlURL);
-        Service service = Service.create(url, serviceName);
-        T port = service.getPort(endpointName, clazz);
-        return port;
-    }
-}

Deleted: labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/src/main/java/org/jboss/soa/esb/actions/InvokeTaxiAction.java
===================================================================
--- labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/src/main/java/org/jboss/soa/esb/actions/InvokeTaxiAction.java	2008-06-17 23:00:46 UTC (rev 20565)
+++ labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/src/main/java/org/jboss/soa/esb/actions/InvokeTaxiAction.java	2008-06-17 23:28:11 UTC (rev 20566)
@@ -1,195 +0,0 @@
-/*
- * 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 General Public License, v. 2.0.
- * This program is distributed in the hope that it will be useful, but WITHOUT A 
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
- * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
- * You should have received a copy of the GNU General Public License,
- * v. 2.0 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
- * MA  02110-1301, USA.
- * 
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-/*
- * BasicClient.java
- *
- * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
- *
- * $Id: BasicClient.java,v 1.10 2004/12/02 16:52:58 kconner Exp $
- *
- */
-
-package org.jboss.soa.esb.actions;
-
-
-import com.arjuna.mw.wst.client.JaxWSHeaderContextProcessor;
-import com.jboss.jbosstm.xts.demo.taxi.ITaxiServiceBA;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Service;
-import javax.xml.ws.handler.Handler;
-
-import org.apache.log4j.Logger;
-import org.jboss.nightout.Reservation;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Collections;
-import java.util.List;
-
-/**
-  *
- * @author Jeff DeLong (jdelong at redhat.com)
-  */
-public class InvokeTaxiAction extends AbstractActionLifecycle {
-	
-	
-	protected ConfigTree _config;
-    	
- 
-	private Logger logger = Logger.getLogger(InvokeTaxiAction.class);
-	
-
-    /***** taxi SERVICE *****/
-
-    /**
-     * The namespace for the taxi webservice.
-     */
-    private static final String TAXI_NS = "http://www.jboss.com/jbosstm/xts/demo/Taxi" ;
-    /**
-     * The prefix for the taxi webservice.
-     */
-    private static final String TAXI_PREFIX = "taxi";
-    /**
-     * The local name for the BA taxi webservice.
-     */
-    private static final String TAXI_SERVICE_BA = "TaxiServiceBAService" ;
-    /**
-     * The QName for the AT taxi webservice.
-     */
-    private static final QName TAXI_SERVICE_BA_QNAME
-            = new QName(TAXI_NS, TAXI_SERVICE_BA, TAXI_PREFIX);
-      /**
-     * The local name for the BA taxi endpoint.
-     */
-    private static final String TAXI_ENDPOINT_BA = "TaxiServiceBA";
-    /**
-     * The QName for the BA taxi endpoint.
-     */
-    private static final QName TAXI_ENDPOINT_BA_QNAME
-            = new QName(TAXI_NS, TAXI_ENDPOINT_BA, TAXI_PREFIX);
-
- 
-    /***** Client Handles for Service Endpoint Ports *****/
-
-     /**
-     * The business activity taxi stub.
-     */
-    private ITaxiServiceBA taxiBA;
-
-    /***** Endpoint Addresses *****/
-
-    /**
-     * URL of taxi BA
-     */
-    private String taxiBAURL ;
-    /***** WSDL file locations *****/
-
-     /**
-     * URL of taxi BA
-     */
-    private final String taxiBAWSDL = "wsdl/TaxiServiceBA.wsdl";
- 
-     
-    final String baseURL = "http://127.0.0.1:8080/xtsdemowebservices/" ;
-
-    /**
-     * The client serial version UID.
-     */
-    private static final long serialVersionUID = 7728495576623420083L ;
-
-	public InvokeTaxiAction(ConfigTree _config) {
-		
-	
-		this._config = _config;
-		
-	}
-
-	
-	public void initialise() throws ActionLifecycleException {
-
-		try {	
-			taxiBAURL = baseURL + TAXI_SERVICE_BA;
-			System.out.println("taxiBAURL is: " + taxiBAURL);
-		
- 	        taxiBA = getService(TAXI_SERVICE_BA_QNAME, TAXI_ENDPOINT_BA_QNAME,
-	                    taxiBAURL, taxiBAWSDL, ITaxiServiceBA.class);
- 	        
- 	        System.out.println("taxiBA is: " + taxiBA);
-	        configureClientHandler((BindingProvider)taxiBA);
-		}
-        catch (final Exception ex)
-        {
-            ex.printStackTrace();
-        }
-
-    }   
-	
-     /**
-     * configure the XTS client handler which manages transaction flow for invocations of the services
-     *
-     * @param bindingProvider
-     */
-    private void configureClientHandler(BindingProvider bindingProvider)
-    {
-        Handler handler = new JaxWSHeaderContextProcessor();
-        List<Handler> handlers = Collections.singletonList(handler);
-        bindingProvider.getBinding().setHandlerChain(handlers);
-    }
-
-
-     public Message process(Message message) throws ActionProcessingFaultException {
-         
-        Reservation reservation = (Reservation) message.getBody().get("Reservation");
-
-    	boolean bookTaxi = reservation.getBookTaxi();
-    	 
-    	boolean taxiStatus = taxiBA.bookTaxi();
-    	 
-    	reservation.setTaxiStatus(taxiStatus);
-  
-    	return message;
-    	 
-     }
-
-
-     
-    /**
-     * Get an endpoint reference for a service so we can create a JaxWS port for it
-     * @param serviceName the QName of the service in question..
-     * @param endpointName the QName of the endpoint associated with the service
-     * @param address a string representation of the service URL. null is ok if this is a service located in the
-     * same app as the client
-     * @return a W3CEndpointReference from which the service port can be obtained.
-     */
-    private <T> T getService(final QName serviceName, final QName endpointName,
-                                            final String address, final String wsdlURL, final Class<T> clazz)
-            throws MalformedURLException
-    {
-        URL url = InvokeTaxiAction.class.getResource("/" + wsdlURL);
-        Service service = Service.create(url, serviceName);
-        T port = service.getPort(endpointName, clazz);
-        return port;
-    }
-}

Deleted: labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/src/main/java/org/jboss/soa/esb/actions/InvokeTheatreAction.java
===================================================================
--- labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/src/main/java/org/jboss/soa/esb/actions/InvokeTheatreAction.java	2008-06-17 23:00:46 UTC (rev 20565)
+++ labs/jbossesb/workspace/jdelong/wstx/trunk/product/services/xts/src/main/java/org/jboss/soa/esb/actions/InvokeTheatreAction.java	2008-06-17 23:28:11 UTC (rev 20566)
@@ -1,196 +0,0 @@
-/*
- * 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 General Public License, v. 2.0.
- * This program is distributed in the hope that it will be useful, but WITHOUT A 
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
- * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
- * You should have received a copy of the GNU General Public License,
- * v. 2.0 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
- * MA  02110-1301, USA.
- * 
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-/*
- * BasicClient.java
- *
- * Copyright (c) 2003, 2004 Arjuna Technologies Ltd.
- *
- * $Id: BasicClient.java,v 1.10 2004/12/02 16:52:58 kconner Exp $
- *
- */
-
-package org.jboss.soa.esb.actions;
-
-
-import com.arjuna.mw.wst.client.JaxWSHeaderContextProcessor;
-import com.jboss.jbosstm.xts.demo.theatre.ITheatreServiceBA;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Service;
-import javax.xml.ws.handler.Handler;
-
-import org.apache.log4j.Logger;
-import org.jboss.nightout.Reservation;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Collections;
-import java.util.List;
-
-/**
-  *
- * @author Jeff DeLong (jdelong at redhat.com)
-  */
-public class InvokeTheatreAction extends AbstractActionLifecycle {
-	
-	
-	protected ConfigTree _config;
-    	
- 
-	private Logger logger = Logger.getLogger(InvokeTheatreAction.class);
-	
-
-    /***** theatre SERVICE *****/
-
-    /**
-     * The namespace for the theatre webservice.
-     */
-    private static final String THEATRE_NS = "http://www.jboss.com/jbosstm/xts/demo/Theatre" ;
-    /**
-     * The prefix for the theatre webservice.
-     */
-    private static final String THEATRE_PREFIX = "theatre";
-    /**
-     * The local name for the BA theatre webservice.
-     */
-    private static final String THEATRE_SERVICE_BA = "TheatreServiceBAService" ;
-    /**
-     * The QName for the AT theatre webservice.
-     */
-    private static final QName THEATRE_SERVICE_BA_QNAME
-            = new QName(THEATRE_NS, THEATRE_SERVICE_BA, THEATRE_PREFIX);
-      /**
-     * The local name for the BA theatre endpoint.
-     */
-    private static final String THEATRE_ENDPOINT_BA = "TheatreServiceBA";
-    /**
-     * The QName for the BA theatre endpoint.
-     */
-    private static final QName THEATRE_ENDPOINT_BA_QNAME
-            = new QName(THEATRE_NS, THEATRE_ENDPOINT_BA, THEATRE_PREFIX);
-
- 
-    /***** Client Handles for Service Endpoint Ports *****/
-
-     /**
-     * The business activity theatre stub.
-     */
-    private ITheatreServiceBA theatreBA;
-
-    /***** Endpoint Addresses *****/
-
-    /**
-     * URL of theatre BA
-     */
-    private String theatreBAURL ;
-    /***** WSDL file locations *****/
-
-     /**
-     * URL of theatre BA
-     */
-    private final String theatreBAWSDL = "wsdl/TheatreServiceBA.wsdl";
- 
-     
-    final String baseURL = "http://127.0.0.1:8080/xtsdemowebservices/" ;
-
-    /**
-     * The client serial version UID.
-     */
-    private static final long serialVersionUID = 7728495576623420083L ;
-
-	public InvokeTheatreAction(ConfigTree _config) {
-		
-	
-		this._config = _config;
-		
-	}
-
-	
-	public void initialise() throws ActionLifecycleException {
-
-		try {	
-			theatreBAURL = baseURL + THEATRE_SERVICE_BA;
-			System.out.println("theatreBAURL is: " + theatreBAURL);
-		
- 	        theatreBA = getService(THEATRE_SERVICE_BA_QNAME, THEATRE_ENDPOINT_BA_QNAME,
-	                    theatreBAURL, theatreBAWSDL, ITheatreServiceBA.class);
- 	        
- 	        System.out.println("theatreBA is: " + theatreBA);
-	        configureClientHandler((BindingProvider)theatreBA);
-		}
-        catch (final Exception ex)
-        {
-            ex.printStackTrace();
-        }
-
-    }   
-	
-     /**
-     * configure the XTS client handler which manages transaction flow for invocations of the services
-     *
-     * @param bindingProvider
-     */
-    private void configureClientHandler(BindingProvider bindingProvider)
-    {
-        Handler handler = new JaxWSHeaderContextProcessor();
-        List<Handler> handlers = Collections.singletonList(handler);
-        bindingProvider.getBinding().setHandlerChain(handlers);
-    }
-
-
-     public Message process(Message message) throws ActionProcessingFaultException {
-         
-        Reservation reservation = (Reservation) message.getBody().get("Reservation");
-
-    	int theatreSeats = reservation.getTheatreSeats();
-       	int theatreArea = reservation.getTheatreSeats();
-   	 
-    	boolean theatreStatus = theatreBA.bookSeats(theatreSeats, theatreArea);
-    	 
-    	reservation.setTheatreStatus(theatreStatus);
-  
-    	return message;
-    	 
-     }
-
-
-     
-    /**
-     * Get an endpoint reference for a service so we can create a JaxWS port for it
-     * @param serviceName the QName of the service in question..
-     * @param endpointName the QName of the endpoint associated with the service
-     * @param address a string representation of the service URL. null is ok if this is a service located in the
-     * same app as the client
-     * @return a W3CEndpointReference from which the service port can be obtained.
-     */
-    private <T> T getService(final QName serviceName, final QName endpointName,
-                                            final String address, final String wsdlURL, final Class<T> clazz)
-            throws MalformedURLException
-    {
-        URL url = InvokeTheatreAction.class.getResource("/" + wsdlURL);
-        Service service = Service.create(url, serviceName);
-        T port = service.getPort(endpointName, clazz);
-        return port;
-    }
-}




More information about the jboss-svn-commits mailing list