Search in sources :

Example 41 with Notification

use of org.oasis_open.docs.ws_tx.wsat._2006._06.Notification in project narayana by jbosstm.

the class CompletionCoordinatorRPCClient method sendRollback.

/**
 * Send a rollback 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 boolean sendRollback(final W3CEndpointReference endpoint, final MAP map) throws SoapFault, IOException {
    CompletionCoordinatorRPCPortType port = getPort(endpoint, map, rollbackAction);
    Notification rollback = new Notification();
    try {
        return port.rollbackOperation(rollback);
    } catch (SOAPFaultException sfe) {
        throw SoapFault11.create(sfe);
    }
}
Also used : CompletionCoordinatorRPCPortType(org.oasis_open.docs.ws_tx.wsat._2006._06.CompletionCoordinatorRPCPortType) SOAPFaultException(javax.xml.ws.soap.SOAPFaultException) Notification(org.oasis_open.docs.ws_tx.wsat._2006._06.Notification)

Example 42 with Notification

use of org.oasis_open.docs.ws_tx.wsat._2006._06.Notification in project narayana by jbosstm.

the class CoordinatorClient method sendReadOnly.

/**
 * Send a read only 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 SOAP errors.
 * @throws java.io.IOException for any transport errors.
 */
public void sendReadOnly(final W3CEndpointReference endpoint, final MAP map, final InstanceIdentifier identifier) throws SoapFault, IOException {
    MAPEndpoint participant = getParticipant(endpoint, map);
    AddressingHelper.installFaultTo(map, participant, identifier);
    CoordinatorPortType port = getPort(endpoint, map, readOnlyAction);
    Notification readOnly = new Notification();
    port.readOnlyOperation(readOnly);
}
Also used : MAPEndpoint(org.jboss.ws.api.addressing.MAPEndpoint) CoordinatorPortType(org.oasis_open.docs.ws_tx.wsat._2006._06.CoordinatorPortType) Notification(org.oasis_open.docs.ws_tx.wsat._2006._06.Notification)

Example 43 with Notification

use of org.oasis_open.docs.ws_tx.wsat._2006._06.Notification in project narayana by jbosstm.

the class CompletionCoordinatorPortTypeImpl method rollbackOperation.

/**
 * @param parameters
 */
@WebMethod(operationName = "RollbackOperation", action = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/Rollback")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/Rollback")
public void rollbackOperation(@WebParam(name = "Rollback", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsat/2006/06", partName = "parameters") Notification parameters) {
    MessageContext ctx = webServiceCtx.getMessageContext();
    final Notification rollback = parameters;
    final MAP inboundMap = AddressingHelper.inboundMap(ctx);
    final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
    TaskManager.getManager().queueTask(new Task() {

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

Example 44 with Notification

use of org.oasis_open.docs.ws_tx.wsat._2006._06.Notification in project narayana by jbosstm.

the class CompletionInitiatorPortTypeImpl method committedOperation.

/**
 * @param parameters
 */
@WebMethod(operationName = "CommittedOperation", action = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/Committed")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/Committed")
public void committedOperation(@WebParam(name = "Committed", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsat/2006/06", partName = "parameters") Notification parameters) {
    MessageContext ctx = webServiceCtx.getMessageContext();
    final Notification committed = parameters;
    final MAP inboundMap = AddressingHelper.inboundMap(ctx);
    final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
    TaskManager.getManager().queueTask(new Task() {

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

Example 45 with Notification

use of org.oasis_open.docs.ws_tx.wsat._2006._06.Notification in project narayana by jbosstm.

the class CompletionCoordinatorRPCPortTypeImpl method commitOperation.

/**
 * @param parameters
 */
@WebMethod(operationName = "CommitOperation", action = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/Commit")
@WebResult(name = "Result", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsat/2006/06", partName = "result")
public boolean commitOperation(@WebParam(name = "Commit", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsat/2006/06", partName = "parameters") Notification parameters) {
    MessageContext ctx = webServiceCtx.getMessageContext();
    final Notification commit = parameters;
    final MAP inboundMap = AddressingHelper.inboundMap(ctx);
    final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
    return CompletionCoordinatorRPCProcessor.getProcessor().commit(commit, inboundMap, arjunaContext);
}
Also used : MessageContext(javax.xml.ws.handler.MessageContext) ArjunaContext(com.arjuna.webservices11.wsarj.ArjunaContext) MAP(org.jboss.ws.api.addressing.MAP) Notification(org.oasis_open.docs.ws_tx.wsat._2006._06.Notification)

Aggregations

Notification (org.oasis_open.docs.ws_tx.wsat._2006._06.Notification)28 Notification (org.orcid.jaxb.model.notification_v2.Notification)18 ArjunaContext (com.arjuna.webservices11.wsarj.ArjunaContext)15 MAP (org.jboss.ws.api.addressing.MAP)15 MessageContext (javax.xml.ws.handler.MessageContext)13 Task (com.arjuna.services.framework.task.Task)11 Action (javax.xml.ws.Action)11 MAPEndpoint (org.jboss.ws.api.addressing.MAPEndpoint)11 HashMap (java.util.HashMap)8 Test (org.junit.Test)8 AccessControl (org.orcid.core.security.visibility.aop.AccessControl)6 NotificationAmended (org.orcid.jaxb.model.notification.amended_v2.NotificationAmended)5 NotificationPermission (org.orcid.jaxb.model.notification.permission_v2.NotificationPermission)5 NotificationInstitutionalConnection (org.orcid.model.notification.institutional_sign_in_v2.NotificationInstitutionalConnection)5 ArrayList (java.util.ArrayList)4 NotificationCustom (org.orcid.jaxb.model.notification.custom_v2.NotificationCustom)4 ProfileEntity (org.orcid.persistence.jpa.entities.ProfileEntity)4 DBUnitTest (org.orcid.test.DBUnitTest)4 URISyntaxException (java.net.URISyntaxException)3 HashSet (java.util.HashSet)3