Author: dasarath
Date: Mon Jan  2 11:13:33 2006
New Revision: 365398

URL: http://svn.apache.org/viewcvs?rev=365398&view=rev
Log: (empty)

Modified:
    
webservices/kandula/branches/Kandula_1/src/java/org/apache/ws/transaction/coordinator/Coordinator.java
    
webservices/kandula/branches/Kandula_1/src/java/org/apache/ws/transaction/coordinator/CoordinatorImpl.java

Modified: 
webservices/kandula/branches/Kandula_1/src/java/org/apache/ws/transaction/coordinator/Coordinator.java
URL: 
http://svn.apache.org/viewcvs/webservices/kandula/branches/Kandula_1/src/java/org/apache/ws/transaction/coordinator/Coordinator.java?rev=365398&r1=365397&r2=365398&view=diff
==============================================================================
--- 
webservices/kandula/branches/Kandula_1/src/java/org/apache/ws/transaction/coordinator/Coordinator.java
 (original)
+++ 
webservices/kandula/branches/Kandula_1/src/java/org/apache/ws/transaction/coordinator/Coordinator.java
 Mon Jan  2 11:13:33 2006
@@ -4,6 +4,9 @@
  */
 package org.apache.ws.transaction.coordinator;
 
+import javax.xml.namespace.QName;
+
+import org.apache.axis.AxisFault;
 import org.apache.ws.transaction.utility.Callback;
 import org.apache.ws.transaction.wscoor.RegistrationPortTypeRPC;
 
@@ -12,7 +15,25 @@
  *  
  */
 public interface Coordinator extends RegistrationPortTypeRPC, Callback {
+
+       AxisFault ALREADY_REGISTERED_SOAP_FAULT = new AxisFault(
+                       new 
QName("http://schemas.xmlsoap.org/ws/2004/10/wscoor";,
+                                       "AlreadyRegistered"),
+                       "The participant has already registered for the same 
protocol.",
+                       null, null);
+
+       AxisFault INVALID_PROTOCOL_SOAP_FAULT = new AxisFault(new QName(
+                       "http://schemas.xmlsoap.org/ws/2004/10/wscoor";, 
"InvalidProtocol"),
+                       "The protocol is invalid or is not supported by the 
coordinator.",
+                       null, null);
+
+       AxisFault INVALID_STATE_SOAP_FAULT = new AxisFault(new QName(
+                       "http://schemas.xmlsoap.org/ws/2004/10/wscoor";, 
"InvalidState"),
+                       "The message was invalid for the current state of the 
activity.",
+                       null, null);
+
        String getID();
 
        CoordinationContext getCoordinationContext();
+
 }

Modified: 
webservices/kandula/branches/Kandula_1/src/java/org/apache/ws/transaction/coordinator/CoordinatorImpl.java
URL: 
http://svn.apache.org/viewcvs/webservices/kandula/branches/Kandula_1/src/java/org/apache/ws/transaction/coordinator/CoordinatorImpl.java?rev=365398&r1=365397&r2=365398&view=diff
==============================================================================
--- 
webservices/kandula/branches/Kandula_1/src/java/org/apache/ws/transaction/coordinator/CoordinatorImpl.java
 (original)
+++ 
webservices/kandula/branches/Kandula_1/src/java/org/apache/ws/transaction/coordinator/CoordinatorImpl.java
 Mon Jan  2 11:13:33 2006
@@ -6,6 +6,7 @@
 
 import java.rmi.RemoteException;
 
+import org.apache.axis.AxisFault;
 import org.apache.axis.components.uuid.UUIDGen;
 import org.apache.axis.components.uuid.UUIDGenFactory;
 import org.apache.axis.message.addressing.EndpointReference;
@@ -22,7 +23,8 @@
 
        private CoordinationContext ctx;
 
-       public CoordinatorImpl(String coordinationType) throws 
MalformedURIException {
+       public CoordinatorImpl(String coordinationType)
+                       throws MalformedURIException {
                UUIDGen gen = UUIDGenFactory.getUUIDGen();
                id = "uuid:" + gen.nextUUID();
                CoordinationService cs = CoordinationService.getInstance();
@@ -39,20 +41,16 @@
        }
 
        public abstract EndpointReference register(String prot,
-                       EndpointReference pps) throws 
InvalidCoordinationProtocolException;
+                       EndpointReference pps) throws AxisFault;
 
-       public synchronized RegisterResponseType registerOperation(RegisterType 
params)
-                       throws RemoteException {
+       public synchronized RegisterResponseType registerOperation(
+                       RegisterType params) throws RemoteException {
                EndpointReference epr = null;
-               try {
-                       epr = 
register(params.getProtocolIdentifier().toString(),
-                               new 
EndpointReference(params.getParticipantProtocolService()));
-               } catch (InvalidCoordinationProtocolException e) {
-                       e.printStackTrace();
-                       throw new RemoteException(e.getMessage());
-               }
+               epr = register(params.getProtocolIdentifier().toString(),
+                       new 
EndpointReference(params.getParticipantProtocolService()));
                RegisterResponseType r = new RegisterResponseType();
                r.setCoordinatorProtocolService(epr);
                return r;
        }
+
 }



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

Reply via email to