Search in sources :

Example 86 with ArjunaContext

use of com.arjuna.webservices11.wsarj.ArjunaContext in project narayana by jbosstm.

the class BusinessAgreementWithParticipantCompletionCoordinatorPortTypeImpl method exitOperation.

/**
 * @param parameters
 */
@WebMethod(operationName = "ExitOperation", action = "http://docs.oasis-open.org/ws-tx/wsba/2006/06/Exit")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsba/2006/06/Exit")
public void exitOperation(@WebParam(name = "Exit", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsba/2006/06", partName = "parameters") NotificationType parameters) {
    if (WSTLogger.logger.isTraceEnabled()) {
        WSTLogger.logger.trace(getClass().getSimpleName() + ".exitOperation");
    }
    MessageContext ctx = webServiceCtx.getMessageContext();
    final NotificationType exit = parameters;
    final MAP inboundMap = AddressingHelper.inboundMap(ctx);
    final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
    TaskManager.getManager().queueTask(new Task() {

        public void executeTask() {
            ParticipantCompletionCoordinatorProcessor.getProcessor().exit(exit, inboundMap, arjunaContext);
        }
    });
}
Also used : Task(com.arjuna.services.framework.task.Task) NotificationType(org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType) MessageContext(javax.xml.ws.handler.MessageContext) ArjunaContext(com.arjuna.webservices11.wsarj.ArjunaContext) MAP(org.jboss.ws.api.addressing.MAP) Action(javax.xml.ws.Action)

Example 87 with ArjunaContext

use of com.arjuna.webservices11.wsarj.ArjunaContext in project narayana by jbosstm.

the class BusinessAgreementWithParticipantCompletionCoordinatorPortTypeImpl method completedOperation.

/**
 * @param parameters
 */
@WebMethod(operationName = "CompletedOperation", action = "http://docs.oasis-open.org/ws-tx/wsba/2006/06/Completed")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsba/2006/06/Completed")
public void completedOperation(@WebParam(name = "Completed", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsba/2006/06", partName = "parameters") NotificationType parameters) {
    if (WSTLogger.logger.isTraceEnabled()) {
        WSTLogger.logger.trace(getClass().getSimpleName() + ".completeOperation");
    }
    MessageContext ctx = webServiceCtx.getMessageContext();
    final NotificationType completed = parameters;
    final MAP inboundMap = AddressingHelper.inboundMap(ctx);
    final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
    TaskManager.getManager().queueTask(new Task() {

        public void executeTask() {
            ParticipantCompletionCoordinatorProcessor.getProcessor().completed(completed, inboundMap, arjunaContext);
        }
    });
}
Also used : Task(com.arjuna.services.framework.task.Task) NotificationType(org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType) MessageContext(javax.xml.ws.handler.MessageContext) ArjunaContext(com.arjuna.webservices11.wsarj.ArjunaContext) MAP(org.jboss.ws.api.addressing.MAP) Action(javax.xml.ws.Action)

Example 88 with ArjunaContext

use of com.arjuna.webservices11.wsarj.ArjunaContext in project narayana by jbosstm.

the class BusinessAgreementWithParticipantCompletionCoordinatorPortTypeImpl method cannotComplete.

/**
 * @param parameters
 */
@WebMethod(operationName = "CannotComplete", action = "http://docs.oasis-open.org/ws-tx/wsba/2006/06/CannotComplete")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsba/2006/06/CannotComplete")
public void cannotComplete(@WebParam(name = "CannotComplete", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsba/2006/06", partName = "parameters") NotificationType parameters) {
    if (WSTLogger.logger.isTraceEnabled()) {
        WSTLogger.logger.trace(getClass().getSimpleName() + ".cannotComplete");
    }
    MessageContext ctx = webServiceCtx.getMessageContext();
    final NotificationType cannotComplete = parameters;
    final MAP inboundMap = AddressingHelper.inboundMap(ctx);
    final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
    TaskManager.getManager().queueTask(new Task() {

        public void executeTask() {
            ParticipantCompletionCoordinatorProcessor.getProcessor().cannotComplete(cannotComplete, inboundMap, arjunaContext);
        }
    });
}
Also used : Task(com.arjuna.services.framework.task.Task) NotificationType(org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType) MessageContext(javax.xml.ws.handler.MessageContext) ArjunaContext(com.arjuna.webservices11.wsarj.ArjunaContext) MAP(org.jboss.ws.api.addressing.MAP) Action(javax.xml.ws.Action)

Example 89 with ArjunaContext

use of com.arjuna.webservices11.wsarj.ArjunaContext in project narayana by jbosstm.

the class RegistrationTest method executeRequest.

private void executeRequest(final String messageId, final InstanceIdentifier instanceIdentifier) throws Exception {
    final String protocolIdentifier = "http://foo.example.org/bar";
    final W3CEndpointReference participantProtocolEndpoint = TestUtil11.getProtocolParticipantEndpoint("participant");
    String identifier = (instanceIdentifier != null ? instanceIdentifier.getInstanceIdentifier() : null);
    W3CEndpointReference registerEndpoint = TestUtil11.getRegistrationEndpoint(identifier);
    RegisterType registerType = new RegisterType();
    registerType.setProtocolIdentifier(protocolIdentifier);
    registerType.setParticipantProtocolService(participantProtocolEndpoint);
    RegistrationPortType port = WSCOORClient.getRegistrationPort(registerEndpoint, CoordinationConstants.WSCOOR_ACTION_REGISTER, messageId);
    port.registerOperation(registerType);
    final RegisterDetails details = testRegistrationCoordinatorProcessor.getRegisterDetails(messageId, 10000);
    final RegisterType requestRegister = details.getRegister();
    final MAP requestMap = details.getMAP();
    final ArjunaContext requestArjunaContext = details.getArjunaContext();
    assertEquals(requestMap.getTo(), TestUtil11.registrationCoordinatorService);
    assertEquals(requestMap.getMessageID(), messageId);
    if (instanceIdentifier == null) {
        assertNull(requestArjunaContext);
    } else {
        assertEquals(instanceIdentifier.getInstanceIdentifier(), requestArjunaContext.getInstanceIdentifier().getInstanceIdentifier());
    }
    assertEquals(protocolIdentifier, requestRegister.getProtocolIdentifier());
}
Also used : W3CEndpointReference(javax.xml.ws.wsaddressing.W3CEndpointReference) RegisterDetails(com.arjuna.wsc.tests.arq.TestRegistrationCoordinatorProcessor.RegisterDetails) RegisterType(org.oasis_open.docs.ws_tx.wscoor._2006._06.RegisterType) ArjunaContext(com.arjuna.webservices11.wsarj.ArjunaContext) MAP(org.jboss.ws.api.addressing.MAP) RegistrationPortType(org.oasis_open.docs.ws_tx.wscoor._2006._06.RegistrationPortType)

Example 90 with ArjunaContext

use of com.arjuna.webservices11.wsarj.ArjunaContext in project narayana by jbosstm.

the class TerminationCoordinatorPortTypeImpl method cancelOperation.

/**
 * @param parameters
 */
@WebMethod(operationName = "CancelOperation", action = "http://schemas.arjuna.com/ws/2005/10/wsarjtx/Cancel")
@Oneway
public void cancelOperation(@WebParam(name = "Cancel", targetNamespace = "http://schemas.arjuna.com/ws/2005/10/wsarjtx", partName = "parameters") NotificationType parameters) {
    if (WSTLogger.logger.isTraceEnabled()) {
        WSTLogger.logger.trace(getClass().getSimpleName() + ".cancelOperation");
    }
    MessageContext ctx = webServiceCtx.getMessageContext();
    final NotificationType cancel = parameters;
    final MAP inboundMap = AddressingHelper.inboundMap(ctx);
    final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
    TaskManager.getManager().queueTask(new Task() {

        public void executeTask() {
            TerminationCoordinatorProcessor.getProcessor().cancel(cancel, inboundMap, arjunaContext);
        }
    });
}
Also used : Task(com.arjuna.services.framework.task.Task) NotificationType(com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType) MessageContext(javax.xml.ws.handler.MessageContext) ArjunaContext(com.arjuna.webservices11.wsarj.ArjunaContext) MAP(org.jboss.ws.api.addressing.MAP)

Aggregations

MAP (org.jboss.ws.api.addressing.MAP)95 ArjunaContext (com.arjuna.webservices11.wsarj.ArjunaContext)83 InstanceIdentifier (com.arjuna.webservices11.wsarj.InstanceIdentifier)74 MessageContext (javax.xml.ws.handler.MessageContext)68 Task (com.arjuna.services.framework.task.Task)62 Action (javax.xml.ws.Action)54 NotificationType (org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType)29 SoapFault (com.arjuna.webservices.SoapFault)17 Notification (org.oasis_open.docs.ws_tx.wsat._2006._06.Notification)15 W3CEndpointReference (javax.xml.ws.wsaddressing.W3CEndpointReference)13 SoapFault11 (com.arjuna.webservices11.SoapFault11)12 NotificationType (com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType)10 CoordinatorCompletionCoordinatorInboundEvents (com.arjuna.webservices11.wsba.CoordinatorCompletionCoordinatorInboundEvents)10 CoordinatorCompletionParticipantInboundEvents (com.arjuna.webservices11.wsba.CoordinatorCompletionParticipantInboundEvents)10 ParticipantCompletionCoordinatorInboundEvents (com.arjuna.webservices11.wsba.ParticipantCompletionCoordinatorInboundEvents)10 ParticipantCompletionParticipantInboundEvents (com.arjuna.webservices11.wsba.ParticipantCompletionParticipantInboundEvents)9 State (com.arjuna.webservices11.wsba.State)9 ProtocolException (javax.xml.ws.ProtocolException)9 SystemException (com.arjuna.wst.SystemException)8 UnknownTransactionException (com.arjuna.wst.UnknownTransactionException)8