Search in sources :

Example 6 with NotificationType

use of com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType in project narayana by jbosstm.

the class TerminationParticipantClient method sendCancelled.

/**
 * Send a cancelled request.
 * @param map addressing context initialised with to and message ID.
 * @param identifier The identifier of the initiator.
 * @throws com.arjuna.webservices.SoapFault For any errors.
 * @throws java.io.IOException for any transport errors.
 */
public void sendCancelled(final W3CEndpointReference participant, final MAP map, final InstanceIdentifier identifier) throws SoapFault, IOException {
    MAPEndpoint coordinator = getCoordinator(participant);
    AddressingHelper.installFromFaultTo(map, coordinator, identifier);
    final TerminationParticipantPortType port = getPort(participant, map, identifier, cancelledAction);
    final NotificationType cancelled = new NotificationType();
    port.cancelledOperation(cancelled);
}
Also used : TerminationParticipantPortType(com.arjuna.schemas.ws._2005._10.wsarjtx.TerminationParticipantPortType) MAPEndpoint(org.jboss.ws.api.addressing.MAPEndpoint) NotificationType(com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType)

Example 7 with NotificationType

use of com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType in project narayana by jbosstm.

the class TerminationCoordinatorPortTypeImpl method closeOperation.

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

        public void executeTask() {
            TerminationCoordinatorProcessor.getProcessor().close(close, 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)

Example 8 with NotificationType

use of com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType in project narayana by jbosstm.

the class TerminationParticipantPortTypeImpl method faultedOperation.

/**
 * @param parameters
 */
@WebMethod(operationName = "FaultedOperation", action = "http://schemas.arjuna.com/ws/2005/10/wsarjtx/Faulted")
@Oneway
public void faultedOperation(@WebParam(name = "Faulted", targetNamespace = "http://schemas.arjuna.com/ws/2005/10/wsarjtx", partName = "parameters") NotificationType parameters) {
    MessageContext ctx = webServiceCtx.getMessageContext();
    final NotificationType faulted = parameters;
    final MAP inboundMap = AddressingHelper.inboundMap(ctx);
    final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
    TaskManager.getManager().queueTask(new Task() {

        public void executeTask() {
            TerminationParticipantProcessor.getProcessor().handleFaulted(faulted, 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)

Example 9 with NotificationType

use of com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType in project narayana by jbosstm.

the class TerminationCoordinatorRPCClient method sendCancel.

/**
 * Send a cancel request.
 * @param map addressing context initialised with to and message ID.
 * @param identifier The identifier of the initiator.
 * @throws com.arjuna.webservices.SoapFault For any errors.
 * @throws java.io.IOException for any transport errors.
 */
public void sendCancel(final W3CEndpointReference coordinator, final MAP map, final InstanceIdentifier identifier) throws SoapFault11, IOException {
    final TerminationCoordinatorRPCPortType port = getPort(coordinator, map, cancelAction);
    final NotificationType cancel = new NotificationType();
    try {
        port.cancelOperation(cancel);
    } catch (SOAPFaultException sfe) {
        throw SoapFault11.create(sfe);
    }
}
Also used : NotificationType(com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType) SOAPFaultException(javax.xml.ws.soap.SOAPFaultException) TerminationCoordinatorRPCPortType(com.arjuna.schemas.ws._2005._10.wsarjtx.TerminationCoordinatorRPCPortType)

Example 10 with NotificationType

use of com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType in project narayana by jbosstm.

the class TerminationCoordinatorRPCPortTypeImpl method completeOperation.

@WebResult(name = "Completed", targetNamespace = "http://schemas.arjuna.com/ws/2005/10/wsarjtx", partName = "parameters")
@WebMethod(operationName = "CompleteOperation", action = "http://schemas.arjuna.com/ws/2005/10/wsarjtx/Complete")
public NotificationType completeOperation(@WebParam(partName = "parameters", name = "Complete", targetNamespace = "http://schemas.arjuna.com/ws/2005/10/wsarjtx") NotificationType parameters) {
    MessageContext ctx = webServiceCtx.getMessageContext();
    final NotificationType complete = parameters;
    final MAP inboundMap = AddressingHelper.inboundMap(ctx);
    final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
    TerminationCoordinatorRPCProcessor.getProcessor().complete(complete, inboundMap, arjunaContext);
    ;
    return new NotificationType();
}
Also used : 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

NotificationType (com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType)20 ArjunaContext (com.arjuna.webservices11.wsarj.ArjunaContext)10 MessageContext (javax.xml.ws.handler.MessageContext)10 MAP (org.jboss.ws.api.addressing.MAP)10 Task (com.arjuna.services.framework.task.Task)7 MAPEndpoint (org.jboss.ws.api.addressing.MAPEndpoint)7 TerminationParticipantPortType (com.arjuna.schemas.ws._2005._10.wsarjtx.TerminationParticipantPortType)4 TerminationCoordinatorPortType (com.arjuna.schemas.ws._2005._10.wsarjtx.TerminationCoordinatorPortType)3 TerminationCoordinatorRPCPortType (com.arjuna.schemas.ws._2005._10.wsarjtx.TerminationCoordinatorRPCPortType)3 SOAPFaultException (javax.xml.ws.soap.SOAPFaultException)3 HttpServletRequest (javax.servlet.http.HttpServletRequest)1