Search in sources :

Example 16 with SoapFault11

use of com.arjuna.webservices11.SoapFault11 in project narayana by jbosstm.

the class ParticipantPortTypeImpl method completionRollback.

/**
 * @param parameters
 */
@WebMethod(operationName = "CompletionRollback", action = "http://fabrikam123.com/CompletionRollback")
@Oneway
@Action(input = "http://fabrikam123.com/CompletionRollback")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public void completionRollback(@WebParam(name = "CompletionRollback", targetNamespace = "http://fabrikam123.com", partName = "parameters") String parameters) {
    MessageContext ctx = webServiceCtx.getMessageContext();
    MAP inboundMap = AddressingHelper.inboundMap(ctx);
    try {
        ATParticipantProcessor.getParticipant().completionRollback(parameters, inboundMap);
    } catch (SoapFault11 sf) {
        sendSoapFault(inboundMap, sf);
        return;
    }
    sendResponse(inboundMap);
}
Also used : SoapFault11(com.arjuna.webservices11.SoapFault11) MessageContext(javax.xml.ws.handler.MessageContext) MAP(org.jboss.ws.api.addressing.MAP) Action(javax.xml.ws.Action) SOAPBinding(javax.jws.soap.SOAPBinding)

Example 17 with SoapFault11

use of com.arjuna.webservices11.SoapFault11 in project narayana by jbosstm.

the class ParticipantPortTypeImpl method earlyReadonly.

/**
 */
@WebMethod(operationName = "EarlyReadonly", action = "http://fabrikam123.com/EarlyReadonly")
@Oneway
@Action(input = "http://fabrikam123.com/EarlyReadonly")
@RequestWrapper(localName = "EarlyReadonly", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
public void earlyReadonly() {
    MessageContext ctx = webServiceCtx.getMessageContext();
    MAP inboundMap = AddressingHelper.inboundMap(ctx);
    CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
    try {
        ATParticipantProcessor.getParticipant().earlyReadonly(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 18 with SoapFault11

use of com.arjuna.webservices11.SoapFault11 in project narayana by jbosstm.

the class ParticipantPortTypeImpl method phase2Rollback.

/**
 */
@WebMethod(operationName = "Phase2Rollback", action = "http://fabrikam123.com/Phase2Rollback")
@Oneway
@Action(input = "http://fabrikam123.com/Phase2Rollback")
@RequestWrapper(localName = "Phase2Rollback", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
public void phase2Rollback() {
    MessageContext ctx = webServiceCtx.getMessageContext();
    MAP inboundMap = AddressingHelper.inboundMap(ctx);
    CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
    try {
        ATParticipantProcessor.getParticipant().phase2Rollback(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 19 with SoapFault11

use of com.arjuna.webservices11.SoapFault11 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 20 with SoapFault11

use of com.arjuna.webservices11.SoapFault11 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)

Aggregations

SoapFault11 (com.arjuna.webservices11.SoapFault11)104 MAP (org.jboss.ws.api.addressing.MAP)74 MessageContext (javax.xml.ws.handler.MessageContext)54 Action (javax.xml.ws.Action)51 CoordinationContextType (org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType)42 RequestWrapper (javax.xml.ws.RequestWrapper)38 SoapFault (com.arjuna.webservices.SoapFault)28 Uid (com.arjuna.ats.arjuna.common.Uid)22 InstanceIdentifier (com.arjuna.webservices11.wsarj.InstanceIdentifier)18 ArjunaContext (com.arjuna.webservices11.wsarj.ArjunaContext)10 Fault (org.xmlsoap.schemas.soap.envelope.Fault)10 Task (com.arjuna.services.framework.task.Task)9 QName (javax.xml.namespace.QName)8 SoapFaultType (com.arjuna.webservices.SoapFaultType)7 Test (org.junit.Test)7 ParticipantEngine (com.arjuna.wst11.messaging.engines.ParticipantEngine)6 SOAPBinding (javax.jws.soap.SOAPBinding)6 SystemException (com.arjuna.wst.SystemException)5 UnknownTransactionException (com.arjuna.wst.UnknownTransactionException)5 ParticipantCompletionParticipantEngine (com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine)5