You are viewing a plain text version of this content. The canonical link for it is here.
Posted to kandula-dev@ws.apache.org by da...@apache.org on 2007/06/19 00:29:33 UTC
svn commit: r548513 -
/webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/
Author: dasarath
Date: Mon Jun 18 15:29:32 2007
New Revision: 548513
URL: http://svn.apache.org/viewvc?view=rev&rev=548513
Log:
Hannes Erven <ha...@erven.at>
Added:
webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/
webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocolPortType_AllProtocols.java
webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocolPortType_Atomic.java
webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocolPortType_Mixed.java
webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocol_AtomicBinding.java
webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocol_MixedBinding.java
webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocol_ServiceLocator.java
Added: webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocolPortType_AllProtocols.java
URL: http://svn.apache.org/viewvc/webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocolPortType_AllProtocols.java?view=auto&rev=548513
==============================================================================
--- webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocolPortType_AllProtocols.java (added)
+++ webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocolPortType_AllProtocols.java Mon Jun 18 15:29:32 2007
@@ -0,0 +1,56 @@
+package org.apache.kandula.wsbai;
+
+import java.rmi.RemoteException;
+
+import org.apache.kandula.wsbai.BAParticipantReferenceType;
+import org.apache.kandula.wsbai.BAParticipantType;
+import org.apache.kandula.wsbai.GetCoordCtxWCodeReqType;
+
+/**
+ * This interface defines all methods in the initiator interface
+ * common to mixed and atomic coordination context.
+ *
+ * @see org.apache.kandula.wsbai.CoordinatorInitiatorPortType_AtomicOutcome_StubInterface
+ * @see org.apache.kandula.wsbai.CoordinatorInitiatorPortType_MixedOutcome_StubInterface
+ *
+ * @author Hannes Erven, Georg Hicker (C) 2006
+ *
+ */
+public interface CoordinatorInitiatorProtocolPortType_AllProtocols {
+
+ /**
+ * Return a new CoordinationContext for the given transation, tagged with
+ * a participant matchode.
+ * @param withMatchcode The matchcode to register.
+ * @return A fresh coordinationContext object that includes the tagged registration service.
+ * @throws java.rmi.RemoteException
+ */
+ public org.apache.kandula.wscoor.CreateCoordinationContextResponseType getCoordinationContextWithMatchcode(GetCoordCtxWCodeReqType withMatchcode) throws java.rmi.RemoteException;
+
+ /**
+ * List all registered and to-be-registered participants by their matchcodes.
+ * @param req The request object.
+ * @return An unsorted array auf Business Activity participants, complete with matchcodes and states.
+ * @throws java.rmi.RemoteException Exception.
+ */
+ public org.apache.kandula.wsbai.BAParticipantType[] listParticipants(org.apache.kandula.wsbai.ListParticipantsReqType req) throws java.rmi.RemoteException;
+
+ /**
+ * Tells the coordinator to complete the selected participants. This is valid
+ * both in transaction with the "mixed outcome" and the "atomic outcome" assertions.
+ *
+ * This method may be called as many times as the initiator wishes. If a
+ * selected participant is in a state where it is not allowed to complete,
+ * it is silently ignored.
+ * Hence, the initiator must check the return for the participants' current
+ * states.
+ * @param participantsToComplete The matchcodes of the participants to complete.
+ *
+ * @return A list of the current participants and their states.
+ * @throws RemoteException
+ */
+ public BAParticipantType[] completeParticipants(
+ final BAParticipantReferenceType[] participantsToComplete
+ ) throws RemoteException;
+
+}
Added: webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocolPortType_Atomic.java
URL: http://svn.apache.org/viewvc/webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocolPortType_Atomic.java?view=auto&rev=548513
==============================================================================
--- webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocolPortType_Atomic.java (added)
+++ webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocolPortType_Atomic.java Mon Jun 18 15:29:32 2007
@@ -0,0 +1,18 @@
+package org.apache.kandula.wsbai;
+
+import org.apache.kandula.wsbai.CoordinatorInitiatorPortType_AtomicOutcome_StubInterface;
+
+/**
+ * This interface is implemented by the initiator protocol work class
+ * that is responsible for atomic outcome.
+ *
+ * @author Hannes Erven, Georg Hicker (C) 2006
+ *
+ */
+public interface CoordinatorInitiatorProtocolPortType_Atomic
+extends
+ CoordinatorInitiatorProtocolPortType_AllProtocols,
+ CoordinatorInitiatorPortType_AtomicOutcome_StubInterface
+{
+ // No more methods
+}
Added: webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocolPortType_Mixed.java
URL: http://svn.apache.org/viewvc/webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocolPortType_Mixed.java?view=auto&rev=548513
==============================================================================
--- webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocolPortType_Mixed.java (added)
+++ webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocolPortType_Mixed.java Mon Jun 18 15:29:32 2007
@@ -0,0 +1,18 @@
+package org.apache.kandula.wsbai;
+
+import org.apache.kandula.wsbai.CoordinatorInitiatorPortType_MixedOutcome_StubInterface;
+
+/**
+ * This interface is implemented by the initiator protocol work class
+ * that is responsible for atomic outcome.
+ *
+ * @author Hannes Erven, Georg Hicker (C) 2006
+ *
+ */
+public interface CoordinatorInitiatorProtocolPortType_Mixed
+extends
+ CoordinatorInitiatorProtocolPortType_AllProtocols,
+ CoordinatorInitiatorPortType_MixedOutcome_StubInterface
+{
+ // No more methods
+}
Added: webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocol_AtomicBinding.java
URL: http://svn.apache.org/viewvc/webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocol_AtomicBinding.java?view=auto&rev=548513
==============================================================================
--- webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocol_AtomicBinding.java (added)
+++ webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocol_AtomicBinding.java Mon Jun 18 15:29:32 2007
@@ -0,0 +1,52 @@
+package org.apache.kandula.wsbai;
+
+import java.net.URL;
+
+import org.apache.axis.AxisFault;
+import org.apache.axis.message.addressing.EndpointReference;
+import org.apache.kandula.utils.AddressingHeaders;
+import org.apache.kandula.utils.Service;
+import org.apache.kandula.wsbai.CoordinatorInitiator_Atomic_BindingStub;
+
+/**
+ * Binding for the initiator service's stub, suitable for business activities
+ * with atomic outcome.
+ * (For use with @see org.apache.kandula.coordinator.ba.initiator.CoordinatorIProxy )
+ *
+ * @author Hannes Erven, Georg Hicker (C) 2006
+ *
+ */
+public class CoordinatorInitiatorProtocol_AtomicBinding
+extends CoordinatorInitiator_Atomic_BindingStub
+implements CoordinatorInitiatorProtocolPortType_Atomic
+{
+ /**
+ * The appropriate addressing headers.
+ */
+ final AddressingHeaders headers;
+
+ /**
+ * Default constructor, calls super().
+ * @param endpointURL Endpoint's URL
+ * @param epr EPR
+ *
+ * @throws AxisFault Throws axis fault.
+ */
+ public CoordinatorInitiatorProtocol_AtomicBinding(
+ final URL endpointURL,
+ final EndpointReference epr
+ ) throws AxisFault {
+ super(endpointURL, new Service());
+
+ this.headers = new AddressingHeaders(epr, null);
+ ((org.apache.kandula.utils.Service) this.service).setAddressingHeaders(this.headers);
+ }
+
+ /**
+ * Fetch the appropriate AddressingHeaders
+ * @return The AddressingHeaders.
+ */
+ public AddressingHeaders getAddressingHeaders(){
+ return this.headers;
+ }
+}
Added: webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocol_MixedBinding.java
URL: http://svn.apache.org/viewvc/webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocol_MixedBinding.java?view=auto&rev=548513
==============================================================================
--- webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocol_MixedBinding.java (added)
+++ webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocol_MixedBinding.java Mon Jun 18 15:29:32 2007
@@ -0,0 +1,56 @@
+package org.apache.kandula.wsbai;
+
+import java.net.URL;
+
+import org.apache.axis.AxisFault;
+import org.apache.axis.message.addressing.EndpointReference;
+import org.apache.kandula.utils.AddressingHeaders;
+import org.apache.kandula.utils.Service;
+
+import org.apache.kandula.wsbai.CoordinatorInitiator_Mixed_BindingStub;
+
+
+
+/**
+ * Binding for the initiator service's stub, suitable for business activities
+ * with mixed outcome.
+ * (For use with @see org.apache.kandula.coordinator.ba.initiator.CoordinatorIProxy )
+ *
+ * @author Hannes Erven, Georg Hicker (C) 2006
+ *
+ */
+public class CoordinatorInitiatorProtocol_MixedBinding
+extends CoordinatorInitiator_Mixed_BindingStub
+implements CoordinatorInitiatorProtocolPortType_Mixed
+{
+
+ /**
+ * The appropriate addressing headers.
+ */
+ final AddressingHeaders headers;
+
+ /**
+ * Default constructor, calls super().
+ *
+ * @param endpointURL Endpoint's URL
+ * @param epr EPR
+ * @throws AxisFault Throws axis fault.
+ */
+ public CoordinatorInitiatorProtocol_MixedBinding(
+ final URL endpointURL,
+ final EndpointReference epr
+ ) throws AxisFault {
+ super(endpointURL, new Service());
+
+ this.headers = new AddressingHeaders(epr, null);
+ ((org.apache.kandula.utils.Service) this.service).setAddressingHeaders(this.headers);
+ }
+
+ /**
+ * Fetch the appropriate AddressingHeaders
+ * @return The AddressingHeaders.
+ */
+ public AddressingHeaders getAddressingHeaders(){
+ return this.headers;
+ }
+}
Added: webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocol_ServiceLocator.java
URL: http://svn.apache.org/viewvc/webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocol_ServiceLocator.java?view=auto&rev=548513
==============================================================================
--- webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocol_ServiceLocator.java (added)
+++ webservices/kandula/branches/Kandula_1/src/java/org/apache/kandula/wsbai/CoordinatorInitiatorProtocol_ServiceLocator.java Mon Jun 18 15:29:32 2007
@@ -0,0 +1,71 @@
+package org.apache.kandula.wsbai;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.apache.axis.AxisFault;
+import org.apache.axis.message.addressing.EndpointReference;
+import org.apache.kandula.coordinator.CoordinationContext;
+import org.apache.kandula.coordinator.ba.coordinator.BACoordinator;
+
+
+/**
+ * This is a convenience class for creating business activity initiator protocol#
+ * service stubs.
+ *
+ * @author Hannes Erven, Georg Hicker (C) 2006
+ *
+ */
+public abstract class CoordinatorInitiatorProtocol_ServiceLocator {
+
+ /**
+ * Get an initiator service stub for an "atomic outcome" coordination context.
+ * @param ctx The coordination context.
+ * @param initiatorServiceEPR The initiator service's EPR.
+ * @return A new stub.
+ * @throws AxisFault Fault creating the stub
+ * @throws MalformedURLException The URI contained in the EPR was invalid.
+ */
+ public static CoordinatorInitiatorProtocol_AtomicBinding getAtomicStub(
+ final CoordinationContext ctx,
+ final EndpointReference initiatorServiceEPR
+ ) throws AxisFault, MalformedURLException{
+ if(BACoordinator.COORDINATION_TYPE__ATOMIC.equals(ctx.getCoordinationType())){
+ throw new IllegalArgumentException("Sorry, getAtomicStub is only valid with an atomic outcome!");
+ }
+
+ final CoordinatorInitiatorProtocol_AtomicBinding r =
+ new CoordinatorInitiatorProtocol_AtomicBinding(
+ new URL(initiatorServiceEPR.getAddress().toString()),
+ initiatorServiceEPR
+ );
+
+ return r;
+ }
+
+ /**
+ * Get an initiator service stub for a "mixed outcome" coordination context.
+ * @param ctx The coordination context.
+ * @param initiatorServiceEPR The initiator service's EPR.
+ * @return A new stub.
+ * @throws AxisFault Fault creating the stub
+ * @throws MalformedURLException The URI contained in the EPR was invalid.
+ */
+ public static CoordinatorInitiatorProtocol_MixedBinding getMixedStub(
+ final CoordinationContext ctx,
+ final EndpointReference initiatorServiceEPR
+ ) throws AxisFault, MalformedURLException{
+ if(BACoordinator.COORDINATION_TYPE__MIXED.equals(ctx.getCoordinationType())){
+ throw new IllegalArgumentException("Sorry, getMixedStub is only valid with a mixed outcome!");
+ }
+
+ final CoordinatorInitiatorProtocol_MixedBinding r =
+ new CoordinatorInitiatorProtocol_MixedBinding(
+ new URL(initiatorServiceEPR.getAddress().toString()),
+ initiatorServiceEPR
+ );
+
+ return r;
+ }
+
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: kandula-dev-help@ws.apache.org