Search in sources :

Example 11 with NotificationType

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

the class TerminationCoordinatorRPCPortTypeImpl method cancelOperation.

@WebResult(name = "Cancelled", targetNamespace = "http://schemas.arjuna.com/ws/2005/10/wsarjtx", partName = "parameters")
@WebMethod(operationName = "CancelOperation", action = "http://schemas.arjuna.com/ws/2005/10/wsarjtx/Cancel")
public NotificationType cancelOperation(@WebParam(partName = "parameters", name = "Cancel", targetNamespace = "http://schemas.arjuna.com/ws/2005/10/wsarjtx") NotificationType parameters) {
    MessageContext ctx = webServiceCtx.getMessageContext();
    final NotificationType cancel = parameters;
    final MAP inboundMap = AddressingHelper.inboundMap(ctx);
    final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
    TerminationCoordinatorRPCProcessor.getProcessor().cancel(cancel, 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)

Example 12 with NotificationType

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

the class TerminationParticipantClient method sendClosed.

/**
 * Send a closed 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 sendClosed(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, closedAction);
    final NotificationType closed = new NotificationType();
    port.closedOperation(closed);
}
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 13 with NotificationType

use of com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType 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)

Example 14 with NotificationType

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

the class TerminationCoordinatorPortTypeImpl method completeOperation.

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

        public void executeTask() {
            TerminationCoordinatorProcessor.getProcessor().complete(complete, inboundMap, arjunaContext);
        }
    });
}
Also used : HttpServletRequest(javax.servlet.http.HttpServletRequest) 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 15 with NotificationType

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

the class TerminationParticipantPortTypeImpl method cancelledOperation.

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

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

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