Search in sources :

Example 16 with NotificationType

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

the class TerminationParticipantPortTypeImpl method closedOperation.

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

        public void executeTask() {
            TerminationParticipantProcessor.getProcessor().handleClosed(closed, 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 17 with NotificationType

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

the class TerminationParticipantPortTypeImpl method completedOperation.

/**
 * @param parameters
 */
@WebMethod(operationName = "CompletedOperation", action = "http://schemas.arjuna.com/ws/2005/10/wsarjtx/Completed")
@Oneway
public void completedOperation(@WebParam(name = "Completed", targetNamespace = "http://schemas.arjuna.com/ws/2005/10/wsarjtx", partName = "parameters") NotificationType parameters) {
    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() {
            TerminationParticipantProcessor.getProcessor().handleCompleted(completed, 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 18 with NotificationType

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

the class TerminationCoordinatorRPCClient method sendComplete.

/**
 * Send a complete 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 sendComplete(final W3CEndpointReference coordinator, final MAP map, final InstanceIdentifier identifier) throws SoapFault11, IOException {
    final TerminationCoordinatorRPCPortType port = getPort(coordinator, map, completeAction);
    final NotificationType complete = new NotificationType();
    try {
        port.completeOperation(complete);
    } 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 19 with NotificationType

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

the class TerminationCoordinatorRPCClient method sendClose.

/**
 * Send a close 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 sendClose(final W3CEndpointReference coordinator, final MAP map, final InstanceIdentifier identifier) throws SoapFault11, IOException {
    final TerminationCoordinatorRPCPortType port = getPort(coordinator, map, closeAction);
    final NotificationType close = new NotificationType();
    try {
        port.closeOperation(close);
    } 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 20 with NotificationType

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

the class TerminationCoordinatorRPCPortTypeImpl method closeOperation.

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