Added: 
webservices/kandula/trunk/java/src/org/apache/kandula/wsba/BACoordinatorCompletionParticipantServiceSkeleton.java
URL: 
http://svn.apache.org/viewvc/webservices/kandula/trunk/java/src/org/apache/kandula/wsba/BACoordinatorCompletionParticipantServiceSkeleton.java?view=auto&rev=507487
==============================================================================
--- 
webservices/kandula/trunk/java/src/org/apache/kandula/wsba/BACoordinatorCompletionParticipantServiceSkeleton.java
 (added)
+++ 
webservices/kandula/trunk/java/src/org/apache/kandula/wsba/BACoordinatorCompletionParticipantServiceSkeleton.java
 Wed Feb 14 03:08:23 2007
@@ -0,0 +1,289 @@
+/*
+ * Copyright  2004 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.kandula.wsba;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.kandula.Constants;
+import org.apache.kandula.context.AbstractContext;
+import org.apache.kandula.context.impl.ParticipantContext;
+import org.apache.kandula.faults.AbstractKandulaException;
+import org.apache.kandula.faults.NoActivityException;
+import org.apache.kandula.participant.ba.BAParticipantTransactionCoordinator;
+import org.apache.kandula.storage.StorageUtils;
+
+/**
+ * BACoordinatorCompletionParticipantServiceSkeleton java skeleton for the
+ * axisService
+ */
+public class BACoordinatorCompletionParticipantServiceSkeleton {
+
+       private static final Log log = LogFactory
+                       
.getLog(BACoordinatorCompletionParticipantServiceSkeleton.class);
+
+       public void 
CloseOperation(org.oasis_open.docs.ws_tx.wsba._2006._06.Close param1)
+                       throws AxisFault {
+               OMElement header = 
MessageContext.getCurrentMessageContext().getEnvelope().getHeader();
+               OMElement firstChildWithName = header
+                               
.getFirstChildWithName(Constants.REQUESTER_ID_PARAMETER);
+               if (firstChildWithName != null) {
+                       String requesterID = firstChildWithName.getText();
+                       AbstractContext context2 = 
StorageUtils.getContext(requesterID);
+                       try {
+                       if (context2!=null)
+                       {
+                       ParticipantContext context = (ParticipantContext) 
context2;
+                       BAParticipantTransactionCoordinator 
participantCoordinator = new BAParticipantTransactionCoordinator();
+                               participantCoordinator.close(context);
+                       }else {
+                               log.fatal("WS_BA : message "+ 
MessageContext.getCurrentMessageContext().getMessageID()
+                                               + " : CompensatedOperation : 
Business Activity Not Found");
+                               throw new 
NoActivityException("CompensateOperation : Business Activity Not Found");
+                       }
+                       } catch (AbstractKandulaException e) {
+                               log.fatal("WS_BA : Message ID : " + 
MessageContext.getCurrentMessageContext().getMessageID()
+                                               + " : close Operation :" + e);
+                               throw new AxisFault(e);
+                       }
+               } else {
+                       AxisFault e = new AxisFault(
+                                       "Requester ID header is not found in 
the message. Please check whether ws-addressing is enabled in the 
coordinator.");
+                       log.fatal("WS_BA : Message ID "
+                                       + 
MessageContext.getCurrentMessageContext().getMessageID()
+                                       + " : CloseOperation :" + e);
+                       throw e;
+               }
+       }
+
+       public void 
CompleteOperation(org.oasis_open.docs.ws_tx.wsba._2006._06.Complete param4)
+                       throws AxisFault {
+               OMElement header = 
MessageContext.getCurrentMessageContext().getEnvelope().getHeader();
+               OMElement firstChildWithName = header
+                               
.getFirstChildWithName(Constants.REQUESTER_ID_PARAMETER);
+               if (firstChildWithName != null) {
+                       String requesterID = firstChildWithName.getText();
+                       AbstractContext context2 = 
StorageUtils.getContext(requesterID);
+                       if (context2 != null) {
+                               ParticipantContext context = 
(ParticipantContext) context2;
+                               BAParticipantTransactionCoordinator 
participantCoordinator = new BAParticipantTransactionCoordinator();
+                               try {
+                                       
participantCoordinator.complete(context);
+                               } catch (AbstractKandulaException e) {
+                                       log.fatal("WS_BA : " + 
context.getCoordinationContext().getActivityID()
+                                                       + " : Complete 
Operation :" + e);
+                                       throw new AxisFault(e);
+                               }
+                       } else {
+                               log.fatal("WS_BA : Message ID "
+                                               + 
MessageContext.getCurrentMessageContext().getMessageID()
+                                               + " : CompleteOperation : 
Participant Context Not Found.");
+                               throw new AxisFault("CompleteOperation : 
Participant Context Not Found.");
+                       }
+               } else {
+                       AxisFault e = new AxisFault(
+                                       "Requester ID header is not found in 
the message. Please check whether ws-addressing is enabled in the 
coordinator.");
+                       log.fatal("WS_BA : Message ID "
+                                       + 
MessageContext.getCurrentMessageContext().getMessageID()
+                                       + " : Complete Operation :" + e);
+                       throw e;
+               }
+       }
+
+       public void 
CancelOperation(org.oasis_open.docs.ws_tx.wsba._2006._06.Cancel param3)
+                       throws AxisFault {
+               OMElement header = 
MessageContext.getCurrentMessageContext().getEnvelope().getHeader();
+               OMElement firstChildWithName = header
+                               
.getFirstChildWithName(Constants.REQUESTER_ID_PARAMETER);
+               if (firstChildWithName != null) {
+                       String requesterID = firstChildWithName.getText();
+                       AbstractContext context2 = 
StorageUtils.getContext(requesterID);
+                       if (context2 != null) {
+                               ParticipantContext context = 
(ParticipantContext) context2;
+                               BAParticipantTransactionCoordinator 
participantCoordinator = new BAParticipantTransactionCoordinator();
+                               try {
+                                       participantCoordinator.cancel(context);
+                               } catch (AbstractKandulaException e) {
+                                       log.fatal("WS_BA : " + 
context.getCoordinationContext().getActivityID()
+                                                       + " : CancelOperation 
:" + e);
+                                       throw new AxisFault(e);
+                               }
+                       } else
+                       // participant context migt have been already removed 
by an earlier
+                       // cancel
+                       {
+                               log.info("WS_BA : Message ID "
+                                               + 
MessageContext.getCurrentMessageContext().getMessageID()
+                                               + " : CancelOperation : 
Participant Context Not Found.");
+                       }
+               } else {
+                       AxisFault e = new AxisFault(
+                                       "Requester ID header is not found in 
the message. Please check whether ws-addressing is enabled in the 
coordinator.");
+                       log.fatal("WS_BA : Message ID "
+                                       + 
MessageContext.getCurrentMessageContext().getMessageID()
+                                       + " : CancelOperation :" + e);
+                       throw e;
+               }
+       }
+
+       public void 
ExitedOperation(org.oasis_open.docs.ws_tx.wsba._2006._06.Exited param8)
+                       throws AxisFault
+       {
+               OMElement header = 
MessageContext.getCurrentMessageContext().getEnvelope().getHeader();
+               OMElement firstChildWithName = header
+                               
.getFirstChildWithName(Constants.REQUESTER_ID_PARAMETER);
+               if (firstChildWithName != null) {
+                       String requesterID = firstChildWithName.getText();
+                       AbstractContext context2 = 
StorageUtils.getContext(requesterID);
+                       if (context2 != null) {
+                               ParticipantContext context = 
(ParticipantContext) context2;
+                               BAParticipantTransactionCoordinator 
participantCoordinator = new BAParticipantTransactionCoordinator();
+                               try {
+                                       participantCoordinator.exited(context);
+                               } catch (AbstractKandulaException e) {
+                                       log.fatal("WS_BA : " + 
context.getCoordinationContext().getActivityID()
+                                                       + " : ExitedOperation 
:" + e);
+                                       throw new AxisFault(e);
+                               }
+                       } else
+                       // participant context migt have been already removed 
by an earlier
+                       // exited
+                       {
+                               log.info("WS_BA : Message ID "
+                                               + 
MessageContext.getCurrentMessageContext().getMessageID()
+                                               + " : ExitedOperation : 
Participant Context Not Found.");
+                       }
+               } else {
+                       AxisFault e = new AxisFault(
+                                       "Requester ID header is not found in 
the message. Please check whether ws-addressing is enabled in the 
coordinator.");
+                       log.fatal("WS_BA : Message ID "
+                                       + 
MessageContext.getCurrentMessageContext().getMessageID()
+                                       + " : ExitedOperation :" + e);
+                       throw e;
+               }
+       }
+       
+       public void 
CompensateOperation(org.oasis_open.docs.ws_tx.wsba._2006._06.Compensate param2) 
throws AxisFault
+
+       {
+               OMElement header = 
MessageContext.getCurrentMessageContext().getEnvelope().getHeader();
+               OMElement firstChildWithName = header
+                               
.getFirstChildWithName(Constants.REQUESTER_ID_PARAMETER);
+               if (firstChildWithName != null) {
+                       String requesterID = firstChildWithName.getText();
+                       AbstractContext context2 = 
StorageUtils.getContext(requesterID);
+                       try {
+                               if (context2 != null) {
+                                       ParticipantContext context = 
(ParticipantContext) context2;
+                                       BAParticipantTransactionCoordinator 
participantCoordinator = new BAParticipantTransactionCoordinator();
+                                       
participantCoordinator.compensate(context);
+                               } else {
+                                       log.fatal("WS_BA : message "+ 
MessageContext.getCurrentMessageContext().getMessageID()
+                                                       + " : 
CompensatedOperation : Business Activity Not Found");
+                                       throw new 
NoActivityException("CompensateOperation : Business Activity Not Found");
+                               }
+                       } catch (AbstractKandulaException e) {
+                               log.fatal("WS_BA : Message ID : " + 
MessageContext.getCurrentMessageContext().getMessageID()
+                                               + " : CompensateOperation :" + 
e);
+                               throw new AxisFault(e);
+                       }
+               } else {
+                       AxisFault e = new AxisFault(
+                                       "Requester ID header is not found in 
the message. Please check whether ws-addressing is enabled in the 
coordinator.");
+                       log.fatal("WS_BA : Message ID "
+                                       + 
MessageContext.getCurrentMessageContext().getMessageID()
+                                       + " : CompensateOperation :" + e);
+                       throw e;
+               }
+       }
+
+       public void 
FailedOperation(org.oasis_open.docs.ws_tx.wsba._2006._06.Failed param0) throws 
AxisFault
+
+       {
+               OMElement header = 
MessageContext.getCurrentMessageContext().getEnvelope().getHeader();
+               OMElement firstChildWithName = header
+                               
.getFirstChildWithName(Constants.REQUESTER_ID_PARAMETER);
+               if (firstChildWithName != null) {
+                       String requesterID = firstChildWithName.getText();
+                       AbstractContext context2 = 
StorageUtils.getContext(requesterID);
+                       if (context2 != null) {
+                               ParticipantContext context = 
(ParticipantContext) context2;
+                               BAParticipantTransactionCoordinator 
participantCoordinator = new BAParticipantTransactionCoordinator();
+                               try {
+                                       participantCoordinator.Faulted(context);
+                               } catch (AbstractKandulaException e) {
+                                       log.fatal("WS_BA : " + 
context.getCoordinationContext().getActivityID()
+                                                       + " : FailedOperation 
:" + e);
+                                       throw new AxisFault(e);
+                               }
+                       } else
+                       // participant context migt have been already removed 
by an earlier
+                       // exited
+                       {
+                               log.info("WS_BA : Message ID "
+                                               + 
MessageContext.getCurrentMessageContext().getMessageID()
+                                               + " : FailedOperation : 
Participant Context Not Found.");
+                       }
+               } else {
+                       AxisFault e = new AxisFault(
+                                       "Requester ID header is not found in 
the message. Please check whether ws-addressing is enabled in the 
coordinator.");
+                       log.fatal("WS_BA : Message ID "
+                                       + 
MessageContext.getCurrentMessageContext().getMessageID()
+                                       + " : FailedOperation :" + e);
+                       throw e;
+               }
+       }
+
+       /**
+        * Auto generated method signature
+        * 
+        * @param param5
+        * 
+        */
+       public void 
GetStatusOperation(org.oasis_open.docs.ws_tx.wsba._2006._06.GetStatus param5) {
+               // Todo fill this with the necessary business logic
+       }
+
+       /**
+        * Auto generated method signature
+        * 
+        * @param param6
+        * 
+        */
+       public void 
NotCompleted(org.oasis_open.docs.ws_tx.wsba._2006._06.NotCompleted param6)
+
+       {
+               // Todo fill this with the necessary business logic
+
+       }
+
+       /**
+        * Auto generated method signature
+        * 
+        * @param param7
+        * 
+        */
+       public void 
StatusOperation(org.oasis_open.docs.ws_tx.wsba._2006._06.Status param7)
+
+       {
+               // Todo fill this with the necessary business logic
+
+       }
+}

Added: 
webservices/kandula/trunk/java/src/org/apache/kandula/wsba/BAParticipantCompletionCoordinatorServiceSkeleton.java
URL: 
http://svn.apache.org/viewvc/webservices/kandula/trunk/java/src/org/apache/kandula/wsba/BAParticipantCompletionCoordinatorServiceSkeleton.java?view=auto&rev=507487
==============================================================================
--- 
webservices/kandula/trunk/java/src/org/apache/kandula/wsba/BAParticipantCompletionCoordinatorServiceSkeleton.java
 (added)
+++ 
webservices/kandula/trunk/java/src/org/apache/kandula/wsba/BAParticipantCompletionCoordinatorServiceSkeleton.java
 Wed Feb 14 03:08:23 2007
@@ -0,0 +1,180 @@
+package org.apache.kandula.wsba;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.kandula.Constants;
+import org.apache.kandula.context.AbstractContext;
+import org.apache.kandula.context.impl.BAActivityContext;
+import org.apache.kandula.coordinator.ba.BACoordinator;
+import org.apache.kandula.faults.AbstractKandulaException;
+import org.apache.kandula.storage.StorageUtils;
+
+/**
+ * BAParticipantCompletionCoordinatorServiceSkeleton java skeleton for the
+ * axisService
+ */
+public class BAParticipantCompletionCoordinatorServiceSkeleton {
+
+       private static final Log log = LogFactory
+                       
.getLog(BAParticipantCompletionCoordinatorServiceSkeleton.class);
+
+       public void 
CompletedOperation(org.oasis_open.docs.ws_tx.wsba._2006._06.Completed param3)
+                       throws AxisFault
+
+       {
+               OMElement header = 
MessageContext.getCurrentMessageContext().getEnvelope().getHeader();
+               String activityId = 
header.getFirstChildWithName(Constants.TRANSACTION_ID_PARAMETER)
+                               .getText();
+               String enlistmentId = 
header.getFirstChildWithName(Constants.ENLISTMENT_ID_PARAMETER)
+                               .getText();
+               try {
+                       BAActivityContext baContext = (BAActivityContext) 
StorageUtils.getContext(activityId);
+                       BACoordinator atomicBACoordinator = new BACoordinator();
+                       atomicBACoordinator.completedOperation(baContext, 
enlistmentId);
+               } catch (AbstractKandulaException e) {
+                       log.fatal("WS_BA : message " + 
MessageContext.getCurrentMessageContext().getMessageID()
+                                       + " : CompletedOperation :" + e);
+                       throw new AxisFault(e);
+               }
+       }
+
+       public void 
ClosedOperation(org.oasis_open.docs.ws_tx.wsba._2006._06.Closed param1)
+                       throws AxisFault
+
+       {
+               OMElement header = 
MessageContext.getCurrentMessageContext().getEnvelope().getHeader();
+               String activityId = 
header.getFirstChildWithName(Constants.TRANSACTION_ID_PARAMETER)
+                               .getText();
+               String enlistmentId = 
header.getFirstChildWithName(Constants.ENLISTMENT_ID_PARAMETER)
+                               .getText();
+               try {
+                       AbstractContext context = 
StorageUtils.getContext(activityId);
+                       if (context != null) {
+                               BAActivityContext baContext = 
(BAActivityContext) context;
+                               BACoordinator atomicBACoordinator = new 
BACoordinator();
+                               atomicBACoordinator.closedOperation(baContext, 
enlistmentId);
+                       }
+               } catch (AbstractKandulaException e) {
+                       log.fatal("WS_BA : message " + 
MessageContext.getCurrentMessageContext().getMessageID()
+                                       + " : ClosedOperation :" + e);
+                       throw new AxisFault(e);
+               }
+       }
+
+       public void 
CanceledOperation(org.oasis_open.docs.ws_tx.wsba._2006._06.Canceled param8) 
throws AxisFault
+
+       {
+               OMElement header = 
MessageContext.getCurrentMessageContext().getEnvelope().getHeader();
+               String activityId = 
header.getFirstChildWithName(Constants.TRANSACTION_ID_PARAMETER)
+                               .getText();
+               String enlistmentId = 
header.getFirstChildWithName(Constants.ENLISTMENT_ID_PARAMETER)
+                               .getText();
+               try {
+                       AbstractContext context = 
StorageUtils.getContext(activityId);
+                       if (context != null) {
+                               BAActivityContext baContext = 
(BAActivityContext) context;
+                               BACoordinator atomicBACoordinator = new 
BACoordinator();
+                               
atomicBACoordinator.canceledOperation(baContext, enlistmentId);
+                       }
+               } catch (AbstractKandulaException e) {
+                       log.fatal("WS_BA : message " + 
MessageContext.getCurrentMessageContext().getMessageID()
+                                       + " : CanceledOperation :" + e);
+                       throw new AxisFault(e);
+               }
+
+       }
+       
+       public void 
CompensatedOperation(org.oasis_open.docs.ws_tx.wsba._2006._06.Compensated 
param0)
+
+       {
+/*             try {
+                       OMElement header = 
MessageContext.getCurrentMessageContext().getEnvelope().getHeader();
+                       String requesterID = 
header.getFirstChildWithName(Constants.REQUESTER_ID_PARAMETER)
+                                       .getText();
+                       AbstractContext contextx = (AbstractContext) 
StorageUtils.getContext(requesterID);
+                       BAParticipantTransactionSentCoordinator BAStxManager = 
new BAParticipantTransactionSentCoordinator();
+                       BAStxManager.Fault(contextx, Constants.WS_BA_PC);
+               } catch (Exception e) {
+               }
+               // =====================end=========================z //Todo 
fill this
+               // with the necessary business logic
+*/
+       }
+
+       /**
+        * Auto generated method signature
+        * 
+        * @param param2
+        * 
+        */
+       public void ExitOperation(org.oasis_open.docs.ws_tx.wsba._2006._06.Exit 
param2)
+
+       {
+               // Todo fill this with the necessary business logic
+               try {
+                       OMElement header = 
MessageContext.getCurrentMessageContext().getEnvelope().getHeader();
+                       String requesterID = 
header.getFirstChildWithName(Constants.REQUESTER_ID_PARAMETER)
+                                       .getText();
+                       AbstractContext context = (AbstractContext) 
StorageUtils.getContext(requesterID);
+                       // BAParticipantTransactionSentCoordinator BAStxManager 
= new
+                       // BAParticipantTransactionSentCoordinator();
+                       // BAStxManager.exit(context);
+               } catch (Exception e) {
+               }
+       }
+
+       /**
+        * Auto generated method signature
+        * 
+        * @param param4
+        * 
+        */
+       public void 
CannotComplete(org.oasis_open.docs.ws_tx.wsba._2006._06.CannotComplete param4)
+
+       {
+               // Todo fill this with the necessary business logic
+
+       }
+
+       /**
+        * Auto generated method signature
+        * 
+        * @param param5
+        * 
+        */
+       public void 
GetStatusOperation(org.oasis_open.docs.ws_tx.wsba._2006._06.GetStatus param5)
+
+       {
+               // Todo fill this with the necessary business logic
+
+       }
+
+       /**
+        * Auto generated method signature
+        * 
+        * @param param6
+        * 
+        */
+       public void FailOperation(org.oasis_open.docs.ws_tx.wsba._2006._06.Fail 
param6)
+
+       {
+               // Todo fill this with the necessary business logic
+
+       }
+
+       /**
+        * Auto generated method signature
+        * 
+        * @param param7
+        * 
+        */
+       public void 
StatusOperation(org.oasis_open.docs.ws_tx.wsba._2006._06.Status param7)
+
+       {
+               // Todo fill this with the necessary business logic
+
+       }
+}

Added: 
webservices/kandula/trunk/java/src/org/apache/kandula/wsba/BAParticipantCompletionParticipantServiceSkeleton.java
URL: 
http://svn.apache.org/viewvc/webservices/kandula/trunk/java/src/org/apache/kandula/wsba/BAParticipantCompletionParticipantServiceSkeleton.java?view=auto&rev=507487
==============================================================================
--- 
webservices/kandula/trunk/java/src/org/apache/kandula/wsba/BAParticipantCompletionParticipantServiceSkeleton.java
 (added)
+++ 
webservices/kandula/trunk/java/src/org/apache/kandula/wsba/BAParticipantCompletionParticipantServiceSkeleton.java
 Wed Feb 14 03:08:23 2007
@@ -0,0 +1,220 @@
+
+    /**
+     * BAParticipantCompletionParticipantServiceSkeleton.java
+     *
+     * This file was auto-generated from WSDL
+     * by the Apache Axis2 version: #axisVersion# #today#
+     */
+    package org.apache.kandula.wsba;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axis2.context.MessageContext;
+import org.apache.kandula.Constants;
+import org.apache.kandula.context.AbstractContext;
+import org.apache.kandula.faults.AbstractKandulaException;
+import org.apache.kandula.participant.ba.BAParticipantTransactionCoordinator;
+import org.apache.kandula.storage.Store;
+    /**
+     *  BAParticipantCompletionParticipantServiceSkeleton java skeleton for 
the axisService
+     */
+    public class BAParticipantCompletionParticipantServiceSkeleton{
+     
+         
+        /**
+         * Auto generated method signature
+         
+          * @param param0
+         
+         */
+        public  void FailedOperation
+                  (
+          org.oasis_open.docs.ws_tx.wsba._2006._06.Failed param0
+          )
+         
+           {
+               //==filed by nis===========================================
+               try{
+//             StorageFactory.getInstance().setConfigurationContext(
+//                     
MessageContext.getCurrentMessageContext().getServiceContext().getConfigurationContext());
+//             OMElement header = 
MessageContext.getCurrentMessageContext().getEnvelope().getHeader();
+//             String requesterID = header.getFirstChildWithName(
+//                             Constants.REQUESTER_ID_PARAMETER).getText();
+//             Store store = StorageFactory.getInstance().getStore();
+//             AbstractContext context = (AbstractContext) 
store.get(requesterID);
+//             BAParticipantTransactionCoordinator BAtxManager = new 
BAParticipantTransactionCoordinator();
+//             BAtxManager.Faulted(context,Constants.WS_BA_PC);
+               }catch(Exception e){}
+               //=====================end=========================z
+                
+        }
+     
+         
+        /**
+         * Auto generated method signature
+         
+          * @param param1
+         
+         */
+        public  void CloseOperation
+                  (
+          org.oasis_open.docs.ws_tx.wsba._2006._06.Close param1
+          )
+         
+           {
+               try{
+               //==============filled by nis======================
+//             StorageFactory.getInstance().setConfigurationContext(
+//                             
MessageContext.getCurrentMessageContext().getServiceContext().getConfigurationContext());
+//             OMElement header = 
MessageContext.getCurrentMessageContext().getEnvelope().getHeader();
+//             String requesterID = header.getFirstChildWithName(
+//                             Constants.REQUESTER_ID_PARAMETER).getText();
+//             Store store = StorageFactory.getInstance().getStore();
+//             AbstractContext context = (AbstractContext) 
store.get(requesterID);
+//             BAParticipantTransactionCoordinator BAtxManager = new 
BAParticipantTransactionCoordinator();
+//             BAtxManager.Close(context,Constants.WS_BA_PC);
+           }catch(Exception e){}
+               
+               //=====================end===============================
+                //Todo fill this with the necessary business logic
+                
+        }
+     
+         
+        /**
+         * Auto generated method signature
+         
+          * @param param2
+         
+         */
+        public  void CompensateOperation
+                  (
+          org.oasis_open.docs.ws_tx.wsba._2006._06.Compensate param2
+          )
+         
+           {
+               try{
+               //  == filled by nis===============================
+//             StorageFactory.getInstance().setConfigurationContext(
+//                             
MessageContext.getCurrentMessageContext().getServiceContext().getConfigurationContext());
+//             OMElement header = 
MessageContext.getCurrentMessageContext().getEnvelope().getHeader();
+//             String requesterID = header.getFirstChildWithName(
+//                             Constants.REQUESTER_ID_PARAMETER).getText();
+//             Store store = StorageFactory.getInstance().getStore();
+//             AbstractContext context = (AbstractContext) 
store.get(requesterID);
+//             BAParticipantTransactionCoordinator batxManager = new 
BAParticipantTransactionCoordinator();
+//              
+//             batxManager.Compensate(context,Constants.WS_BA_PC);//Todo fill 
this with the necessary business logic
+           //=====================end===================================       
+               }catch(Exception e){
+                       
+                       
+               } }
+     
+         
+        /**
+         * Auto generated method signature
+         
+          * @param param3
+         
+         */
+        public  void CancelOperation( 
org.oasis_open.docs.ws_tx.wsba._2006._06.Cancel param3)
+           {
+//             StorageFactory.getInstance().setConfigurationContext(
+//                                     
MessageContext.getCurrentMessageContext().getServiceContext().getConfigurationContext());
+//                     OMElement header = 
MessageContext.getCurrentMessageContext().getEnvelope().getHeader();
+//                     String requesterID = header.getFirstChildWithName(
+//                                     
Constants.REQUESTER_ID_PARAMETER).getText();
+//                     Store store = StorageFactory.getInstance().getStore();
+//                     AbstractContext context = (AbstractContext) 
store.get(requesterID);
+//                     //Need a BAParticipantTransactionCoordinator
+//                     BAParticipantTransactionCoordinator 
baParticipantTxManager = new BAParticipantTransactionCoordinator();
+//                     try {
+//                             
baParticipantTxManager.Cancel(context,Constants.WS_BA_PC);
+//                     } catch (AbstractKandulaException e) {
+//                             
+//                     }
+               
+        }
+     
+        /**
+         * Auto generated method signature
+         
+          * @param param4
+         
+         */
+        public  void GetStatusOperation
+                  (
+          org.oasis_open.docs.ws_tx.wsba._2006._06.GetStatus param4
+          )
+         
+           {
+               //Todo fill this with the necessary business logic
+                
+        }
+     
+         
+        /**
+         * Auto generated method signature
+         
+          * @param param5
+         
+         */
+        public  void NotCompleted
+                  (
+          org.oasis_open.docs.ws_tx.wsba._2006._06.NotCompleted param5
+          )
+         
+           {
+                //Todo fill this with the necessary business logic
+                
+        }
+     
+         
+        /**
+         * Auto generated method signature
+         
+          * @param param6
+         
+         */
+        public  void StatusOperation
+                  (
+          org.oasis_open.docs.ws_tx.wsba._2006._06.Status param6
+          )
+         
+           {
+                //Todo fill this with the necessary business logic
+                
+        }
+     
+         
+        /**
+         * Auto generated method signature
+         
+          * @param param7
+         
+         */
+        public  void ExitedOperation
+                  (
+          org.oasis_open.docs.ws_tx.wsba._2006._06.Exited param7
+          )
+         
+           {
+               try{
+               //== filled by nis===============================
+//             StorageFactory.getInstance().setConfigurationContext(
+//                             
MessageContext.getCurrentMessageContext().getServiceContext().getConfigurationContext());
+//             OMElement header = 
MessageContext.getCurrentMessageContext().getEnvelope().getHeader();
+//             String requesterID = header.getFirstChildWithName(
+//                             Constants.REQUESTER_ID_PARAMETER).getText();
+//             Store store = StorageFactory.getInstance().getStore();
+//             AbstractContext context = (AbstractContext) 
store.get(requesterID);
+//             BAParticipantTransactionCoordinator batxManager = new 
BAParticipantTransactionCoordinator();
+//     //=======================================end=====================
+//             batxManager.Exited(context,Constants.WS_BA_PC);   
+               }catch(Exception e){
+                       
+                       
+               } }
+     
+    }
+    
\ No newline at end of file

Modified: 
webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationServiceSkeleton.java
URL: 
http://svn.apache.org/viewvc/webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationServiceSkeleton.java?view=diff&rev=507487&r1=507486&r2=507487
==============================================================================
--- 
webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationServiceSkeleton.java
 (original)
+++ 
webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationServiceSkeleton.java
 Wed Feb 14 03:08:23 2007
@@ -69,7 +69,7 @@
                        Coordinator coordinator = new Coordinator();
                        AbstractContext context = 
coordinator.createCoordinationContext(coordinationType,
                                        expiresL);
-                       StorageUtils.putContext(context);
+//                     StorageUtils.putContext(context);
 
                        CoordinationContext coordinationContext = 
context.getCoordinationContext();
 
@@ -82,7 +82,7 @@
                        coordinationContext_type3.setExpires(expires_type0);
 
                        
coordinationContext_type3.setRegistrationService(EndpointReferenceFactory
-                                       
.getADBEPRTypeFromEPR(coordinationContext.getRegistrationService()));
+                                       
.getEPRTypeFromEPR(coordinationContext.getRegistrationService()));
 
                        Identifier_type1 identifier_type1 = new 
Identifier_type1();
                        identifier_type1.setAnyURI(new URI("http", "thilina"));

Modified: 
webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationServiceSkeleton.java
URL: 
http://svn.apache.org/viewvc/webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationServiceSkeleton.java?view=diff&rev=507487&r1=507486&r2=507487
==============================================================================
--- 
webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationServiceSkeleton.java
 (original)
+++ 
webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationServiceSkeleton.java
 Wed Feb 14 03:08:23 2007
@@ -51,6 +51,7 @@
                String protocolIdentifier;
                EndpointReference participantEPR;
                String activityId;
+               String participantId=null;
                /*
                 * Extracting data from the received message
                 */
@@ -63,6 +64,11 @@
                                .getEnvelope().getHeader();
                activityId = header.getFirstChildWithName(
                                Constants.TRANSACTION_ID_PARAMETER).getText();
+               OMElement participantIDElement = header.getFirstChildWithName(
+                               Constants.PARTICIPANT_ID_PARAMETER);
+               if (participantIDElement != null) {
+                       participantId = participantIDElement.getText();
+               }
                /*
                 * Registering the participant for the activity for the given 
protocol
                 */
@@ -75,10 +81,10 @@
                                                "No Activity Found for this 
Activity ID");
                        }
                        EndpointReference epr = 
coordinator.registerParticipant(context,
-                                       protocolIdentifier, participantEPR);
+                                       protocolIdentifier, 
participantEPR,participantId);
                        
                        RegisterResponseType registerResponseType = new 
RegisterResponseType();
-                       
registerResponseType.setCoordinatorProtocolService(EndpointReferenceFactory.getADBEPRTypeFromEPR(epr));
+                       
registerResponseType.setCoordinatorProtocolService(EndpointReferenceFactory.getEPRTypeFromEPR(epr));
                        RegisterResponse registerResponse = new 
RegisterResponse();
                        
registerResponse.setRegisterResponse(registerResponseType);
                        return registerResponse;



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to