Search in sources :

Example 1 with ParticipantPortType

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

the class ParticipantClient method sendSoapFault.

/**
 * Send a fault.
 * @param map The addressing context.
 * @param soapFault The SOAP fault.
 * @param identifier The arjuna instance identifier.
 * @throws com.arjuna.webservices.SoapFault For any errors.
 * @throws java.io.IOException for any transport errors.
 */
public void sendSoapFault(final MAP map, final SoapFault soapFault, final InstanceIdentifier identifier) throws SoapFault, IOException {
    ParticipantPortType port = getPort(null, map, faultAction);
    // convert fault to the wire format and dispatch it to the initiator
    soapFault.setAction(faultAction);
    Fault fault = ((SoapFault11) soapFault).toFault();
    port.soapFault(fault);
}
Also used : ParticipantPortType(org.oasis_open.docs.ws_tx.wsat._2006._06.ParticipantPortType) SoapFault(com.arjuna.webservices.SoapFault) Fault(org.xmlsoap.schemas.soap.envelope.Fault) SoapFault11(com.arjuna.webservices11.SoapFault11)

Example 2 with ParticipantPortType

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

the class ParticipantClient 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 void sendRollback(final W3CEndpointReference endpoint, final MAP map, final InstanceIdentifier identifier) throws SoapFault, IOException {
    MAPEndpoint coordinator = getCoordinator(endpoint, map);
    AddressingHelper.installFromFaultTo(map, coordinator, identifier);
    ParticipantPortType port = getPort(endpoint, map, rollbackAction);
    Notification rollback = new Notification();
    port.rollbackOperation(rollback);
}
Also used : MAPEndpoint(org.jboss.ws.api.addressing.MAPEndpoint) ParticipantPortType(org.oasis_open.docs.ws_tx.wsat._2006._06.ParticipantPortType) Notification(org.oasis_open.docs.ws_tx.wsat._2006._06.Notification)

Example 3 with ParticipantPortType

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

the class ParticipantClient method sendCommit.

/**
 * Send a commit 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 sendCommit(final W3CEndpointReference endpoint, final MAP map, final InstanceIdentifier identifier) throws SoapFault, IOException {
    MAPEndpoint coordinator = getCoordinator(endpoint, map);
    AddressingHelper.installFromFaultTo(map, coordinator, identifier);
    ParticipantPortType port = getPort(endpoint, map, commitAction);
    Notification commit = new Notification();
    port.commitOperation(commit);
}
Also used : MAPEndpoint(org.jboss.ws.api.addressing.MAPEndpoint) ParticipantPortType(org.oasis_open.docs.ws_tx.wsat._2006._06.ParticipantPortType) Notification(org.oasis_open.docs.ws_tx.wsat._2006._06.Notification)

Example 4 with ParticipantPortType

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

the class ParticipantClient method sendPrepare.

/**
 * Send a prepare 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 sendPrepare(final W3CEndpointReference endpoint, final MAP map, final InstanceIdentifier identifier) throws SoapFault, IOException {
    MAPEndpoint coordinator = getCoordinator(endpoint, map);
    AddressingHelper.installFromFaultTo(map, coordinator, identifier);
    ParticipantPortType port = getPort(endpoint, map, prepareAction);
    Notification prepare = new Notification();
    port.prepareOperation(prepare);
}
Also used : MAPEndpoint(org.jboss.ws.api.addressing.MAPEndpoint) ParticipantPortType(org.oasis_open.docs.ws_tx.wsat._2006._06.ParticipantPortType) Notification(org.oasis_open.docs.ws_tx.wsat._2006._06.Notification)

Aggregations

ParticipantPortType (org.oasis_open.docs.ws_tx.wsat._2006._06.ParticipantPortType)4 MAPEndpoint (org.jboss.ws.api.addressing.MAPEndpoint)3 Notification (org.oasis_open.docs.ws_tx.wsat._2006._06.Notification)3 SoapFault (com.arjuna.webservices.SoapFault)1 SoapFault11 (com.arjuna.webservices11.SoapFault11)1 Fault (org.xmlsoap.schemas.soap.envelope.Fault)1