Search in sources :

Example 1 with SoapFault

use of com.arjuna.webservices.SoapFault in project narayana by jbosstm.

the class CompletionInitiatorClient method sendSoapFault.

/**
 * Send a fault for an unknown participant.
 * @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 {
    CompletionInitiatorPortType 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 : SoapFault(com.arjuna.webservices.SoapFault) Fault(org.xmlsoap.schemas.soap.envelope.Fault) SoapFault11(com.arjuna.webservices11.SoapFault11) CompletionInitiatorPortType(org.oasis_open.docs.ws_tx.wsat._2006._06.CompletionInitiatorPortType)

Example 2 with SoapFault

use of com.arjuna.webservices.SoapFault in project narayana by jbosstm.

the class CompletionInitiatorClient 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 W3CEndpointReference participant, final MAP map, final SoapFault soapFault, final InstanceIdentifier identifier) throws SoapFault, IOException {
    CompletionInitiatorPortType port = getPort(participant, 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) CompletionInitiatorPortType(org.oasis_open.docs.ws_tx.wsat._2006._06.CompletionInitiatorPortType)

Example 3 with SoapFault

use of com.arjuna.webservices.SoapFault 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 4 with SoapFault

use of com.arjuna.webservices.SoapFault in project narayana by jbosstm.

the class TerminationParticipantClient 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 SoapFault soapFault, final MAP map, final InstanceIdentifier identifier) throws SoapFault, IOException {
    final TerminationParticipantPortType port = getPort(map, identifier, soapFaultAction);
    SoapFault11 soapFault11 = (SoapFault11) soapFault;
    Fault fault = soapFault11.toFault();
    port.faultOperation(fault);
}
Also used : TerminationParticipantPortType(com.arjuna.schemas.ws._2005._10.wsarjtx.TerminationParticipantPortType) SoapFault11(com.arjuna.webservices11.SoapFault11) SoapFault(com.arjuna.webservices.SoapFault) Fault(org.xmlsoap.schemas.soap.envelope.Fault)

Example 5 with SoapFault

use of com.arjuna.webservices.SoapFault in project narayana by jbosstm.

the class UserBusinessActivityStandaloneImple method startTransaction.

private final Context startTransaction(int timeout, TxContextImple current) throws InvalidCreateParametersException, SystemException {
    try {
        final Long expires = (timeout > 0 ? new Long(timeout) : null);
        final String messageId = MessageId.getMessageId();
        final CoordinationContext currentContext = (current != null ? getContext(current) : null);
        final CoordinationContextType coordinationContext = ActivationCoordinator.createCoordinationContext(_activationCoordinatorService, messageId, BusinessActivityConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME, expires, currentContext);
        if (coordinationContext == null) {
            throw new SystemException(wstxLogger.i18NLogger.get_mwlabs_wst11_ba_remote_UserBusinessActivityImple_2());
        }
        return new ContextImple(coordinationContext);
    } catch (final InvalidCreateParametersException icpe) {
        throw icpe;
    } catch (final SoapFault sf) {
        throw new SystemException(sf.getMessage());
    } catch (final Exception ex) {
        throw new SystemException(ex.toString());
    }
}
Also used : SoapFault(com.arjuna.webservices.SoapFault) TxContextImple(com.arjuna.mwlabs.wst11.ba.context.TxContextImple) ContextImple(com.arjuna.mwlabs.wst11.ba.ContextImple) SystemException(com.arjuna.wst.SystemException) CoordinationContextType(org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType) InvalidCreateParametersException(com.arjuna.wsc.InvalidCreateParametersException) UnknownTransactionException(com.arjuna.wst.UnknownTransactionException) WrongStateException(com.arjuna.wst.WrongStateException) SystemException(com.arjuna.wst.SystemException) InvalidCreateParametersException(com.arjuna.wsc.InvalidCreateParametersException) TransactionRolledBackException(com.arjuna.wst.TransactionRolledBackException) CoordinationContext(org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext)

Aggregations

SoapFault (com.arjuna.webservices.SoapFault)40 MAP (org.jboss.ws.api.addressing.MAP)24 SoapFault11 (com.arjuna.webservices11.SoapFault11)19 SystemException (com.arjuna.wst.SystemException)15 UnknownTransactionException (com.arjuna.wst.UnknownTransactionException)15 InstanceIdentifier (com.arjuna.webservices11.wsarj.InstanceIdentifier)14 ArjunaContext (com.arjuna.webservices11.wsarj.ArjunaContext)10 Fault (org.xmlsoap.schemas.soap.envelope.Fault)10 Task (com.arjuna.services.framework.task.Task)9 TransactionRolledBackException (com.arjuna.wst.TransactionRolledBackException)9 MessageContext (javax.xml.ws.handler.MessageContext)9 Action (javax.xml.ws.Action)7 CoordinationContextType (org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType)6 QName (javax.xml.namespace.QName)5 InvalidCreateParametersException (com.arjuna.wsc.InvalidCreateParametersException)4 FaultedException (com.arjuna.wst.FaultedException)4 WrongStateException (com.arjuna.wst.WrongStateException)4 W3CEndpointReference (javax.xml.ws.wsaddressing.W3CEndpointReference)4 CoordinationContext (org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext)4 TxContextImple (com.arjuna.mwlabs.wst11.at.context.TxContextImple)3