Search in sources :

Example 1 with CoordinatorPortType

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

the class CoordinatorClient method sendPrepared.

/**
 * Send a prepared 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 sendPrepared(final W3CEndpointReference endpoint, final MAP map, final InstanceIdentifier identifier) throws SoapFault, IOException {
    MAPEndpoint participant = getParticipant(endpoint, map);
    AddressingHelper.installFromFaultTo(map, participant, identifier);
    CoordinatorPortType port = getPort(endpoint, map, preparedAction);
    Notification prepared = new Notification();
    port.preparedOperation(prepared);
}
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 2 with CoordinatorPortType

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

the class CoordinatorClient method sendAborted.

/**
 * Send an aborted 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 sendAborted(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, abortedAction);
    Notification aborted = new Notification();
    port.abortedOperation(aborted);
}
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 3 with CoordinatorPortType

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

the class CoordinatorClient method sendCommitted.

/**
 * Send a committed 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 sendCommitted(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, committedAction);
    Notification committed = new Notification();
    port.committedOperation(committed);
}
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 4 with CoordinatorPortType

use of org.oasis_open.docs.ws_tx.wsat._2006._06.CoordinatorPortType 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 5 with CoordinatorPortType

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

the class CoordinatorClient 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 SOAP errors.
 * @throws java.io.IOException for any transport errors.
 */
public void sendSoapFault(final W3CEndpointReference endpoint, final MAP map, final SoapFault soapFault, final InstanceIdentifier identifier) throws SoapFault, IOException {
    CoordinatorPortType port = getPort(endpoint, 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 : SoapFault(com.arjuna.webservices.SoapFault) Fault(org.xmlsoap.schemas.soap.envelope.Fault) SoapFault11(com.arjuna.webservices11.SoapFault11) CoordinatorPortType(org.oasis_open.docs.ws_tx.wsat._2006._06.CoordinatorPortType)

Aggregations

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