Search in sources :

Example 21 with CoordinationContextType

use of org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType in project narayana by jbosstm.

the class ParticipantPortTypeImpl method preparedAfterTimeout.

/**
 */
@WebMethod(operationName = "PreparedAfterTimeout", action = "http://fabrikam123.com/PreparedAfterTimeout")
@Oneway
@Action(input = "http://fabrikam123.com/PreparedAfterTimeout")
@RequestWrapper(localName = "PreparedAfterTimeout", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
public void preparedAfterTimeout() {
    MessageContext ctx = webServiceCtx.getMessageContext();
    MAP inboundMap = AddressingHelper.inboundMap(ctx);
    CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
    try {
        ATParticipantProcessor.getParticipant().preparedAfterTimeout(coordinationContext, inboundMap);
    } catch (SoapFault11 sf) {
        sendSoapFault(inboundMap, sf);
        return;
    }
    sendResponse(inboundMap);
}
Also used : SoapFault11(com.arjuna.webservices11.SoapFault11) MessageContext(javax.xml.ws.handler.MessageContext) CoordinationContextType(org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType) MAP(org.jboss.ws.api.addressing.MAP) Action(javax.xml.ws.Action) RequestWrapper(javax.xml.ws.RequestWrapper)

Example 22 with CoordinationContextType

use of org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType in project narayana by jbosstm.

the class ParticipantProcessor method completionCommit.

/**
 * Execute the CompletionCommit
 * @param coordinatorURI The address of the coordinator to employ
 * @param map The current addressing context.
 * @throws SoapFault11 for errors during processing
 */
public void completionCommit(final String coordinatorURI, final MAP map) throws SoapFault11 {
    try {
        final CoordinationContextType context = InteropUtil.createCoordinationContext(coordinatorURI);
        final CompletionCoordinatorParticipant participant = InteropUtil.registerCompletion(context, context.getIdentifier().getValue());
        participant.commit();
    } catch (final Throwable th) {
        throw new SoapFault11(th);
    }
}
Also used : SoapFault11(com.arjuna.webservices11.SoapFault11) CoordinationContextType(org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType) CompletionCoordinatorParticipant(com.arjuna.wst.CompletionCoordinatorParticipant)

Example 23 with CoordinationContextType

use of org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType in project narayana by jbosstm.

the class ParticipantPortTypeImpl method replayCommit.

/**
 */
@WebMethod(operationName = "ReplayCommit", action = "http://www.wstf.org/docs/scenarios/sc007/ReplayCommit")
@Oneway
@Action(input = "http://www.wstf.org/docs/scenarios/sc007/ReplayCommit")
@RequestWrapper(localName = "ReplayCommit", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.wstf.webservices.sc007.generated.TestMessageType")
public void replayCommit() {
    MessageContext ctx = webServiceCtx.getMessageContext();
    MAP inboundMap = AddressingHelper.inboundMap(ctx);
    CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
    try {
        ParticipantProcessor.getParticipant().replayCommit(coordinationContext, inboundMap);
    } catch (SoapFault11 sf) {
        sendSoapFault(inboundMap, sf);
        return;
    }
    sendResponse(inboundMap);
}
Also used : SoapFault11(com.arjuna.webservices11.SoapFault11) MessageContext(javax.xml.ws.handler.MessageContext) CoordinationContextType(org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType) MAP(org.jboss.ws.api.addressing.MAP) Action(javax.xml.ws.Action) RequestWrapper(javax.xml.ws.RequestWrapper)

Example 24 with CoordinationContextType

use of org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType in project narayana by jbosstm.

the class ParticipantPortTypeImpl method lostCommitted.

/**
 */
@WebMethod(operationName = "LostCommitted", action = "http://www.wstf.org/docs/scenarios/sc007/LostCommitted")
@Oneway
@Action(input = "http://www.wstf.org/docs/scenarios/sc007/LostCommitted")
@RequestWrapper(localName = "LostCommitted", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.wstf.webservices.sc007.generated.TestMessageType")
public void lostCommitted() {
    MessageContext ctx = webServiceCtx.getMessageContext();
    MAP inboundMap = AddressingHelper.inboundMap(ctx);
    CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
    try {
        ParticipantProcessor.getParticipant().lostCommitted(coordinationContext, inboundMap);
    } catch (SoapFault11 sf) {
        sendSoapFault(inboundMap, sf);
        return;
    }
    sendResponse(inboundMap);
}
Also used : SoapFault11(com.arjuna.webservices11.SoapFault11) MessageContext(javax.xml.ws.handler.MessageContext) CoordinationContextType(org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType) MAP(org.jboss.ws.api.addressing.MAP) Action(javax.xml.ws.Action) RequestWrapper(javax.xml.ws.RequestWrapper)

Example 25 with CoordinationContextType

use of org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType in project narayana by jbosstm.

the class ParticipantPortTypeImpl method retryPreparedCommit.

/**
 */
@WebMethod(operationName = "RetryPreparedCommit", action = "http://www.wstf.org/docs/scenarios/sc007/RetryPreparedCommit")
@Oneway
@Action(input = "http://www.wstf.org/docs/scenarios/sc007/RetryPreparedCommit")
@RequestWrapper(localName = "RetryPreparedCommit", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.wstf.webservices.sc007.generated.TestMessageType")
public void retryPreparedCommit() {
    MessageContext ctx = webServiceCtx.getMessageContext();
    MAP inboundMap = AddressingHelper.inboundMap(ctx);
    CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
    try {
        ParticipantProcessor.getParticipant().retryPreparedCommit(coordinationContext, inboundMap);
    } catch (SoapFault11 sf) {
        sendSoapFault(inboundMap, sf);
        return;
    }
    sendResponse(inboundMap);
}
Also used : SoapFault11(com.arjuna.webservices11.SoapFault11) MessageContext(javax.xml.ws.handler.MessageContext) CoordinationContextType(org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType) MAP(org.jboss.ws.api.addressing.MAP) Action(javax.xml.ws.Action) RequestWrapper(javax.xml.ws.RequestWrapper)

Aggregations

CoordinationContextType (org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType)107 SoapFault11 (com.arjuna.webservices11.SoapFault11)43 MAP (org.jboss.ws.api.addressing.MAP)41 Action (javax.xml.ws.Action)38 RequestWrapper (javax.xml.ws.RequestWrapper)38 MessageContext (javax.xml.ws.handler.MessageContext)38 CompletionCoordinatorParticipant (com.arjuna.wst.CompletionCoordinatorParticipant)30 InteropWaitState (com.jboss.transaction.txinterop.interop.states.InteropWaitState)16 CoordinationContext (org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext)13 TransactionRolledBackException (com.arjuna.wst.TransactionRolledBackException)12 InvalidCreateParametersException (com.arjuna.wsc.InvalidCreateParametersException)10 BusinessActivityTerminator (com.arjuna.wst.BusinessActivityTerminator)10 InteropWaitState (com.jboss.transaction.wstf.interop.states.InteropWaitState)10 W3CEndpointReference (javax.xml.ws.wsaddressing.W3CEndpointReference)10 TxContextImple (com.arjuna.mwlabs.wst11.at.context.TxContextImple)7 SoapFault (com.arjuna.webservices.SoapFault)6 SystemException (com.arjuna.wst.SystemException)6 SOAPEnvelope (javax.xml.soap.SOAPEnvelope)6 SOAPHeaderElement (javax.xml.soap.SOAPHeaderElement)6 TxContext (com.arjuna.mw.wst.TxContext)5