Search in sources :

Example 26 with SoapFault

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

the class BusinessAgreementWithParticipantCompletionParticipantPortTypeImpl method soapFault.

@WebMethod(operationName = "fault", action = "http://docs.oasis-open.org/ws-tx/wscoor/2006/06/fault")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wscoor/2006/06/fault")
public void soapFault(@WebParam(name = "Fault", targetNamespace = "http://schemas.xmlsoap.org/soap/envelope/", partName = "parameters") Fault fault) {
    MessageContext ctx = webServiceCtx.getMessageContext();
    final MAP inboundMap = AddressingHelper.inboundMap(ctx);
    final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
    final SoapFault soapFault = SoapFault11.fromFault(fault);
    TaskManager.getManager().queueTask(new Task() {

        public void executeTask() {
            ParticipantCompletionParticipantProcessor.getProcessor().soapFault(soapFault, inboundMap, arjunaContext);
            ;
        }
    });
}
Also used : SoapFault(com.arjuna.webservices.SoapFault) 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) Action(javax.xml.ws.Action)

Example 27 with SoapFault

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

Example 28 with SoapFault

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

the class CompletionInitiatorPortTypeImpl method soapFault.

@WebMethod(operationName = "SoapFault", action = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/fault")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/fault")
public void soapFault(@WebParam(name = "Fault", targetNamespace = "http://schemas.xmlsoap.org/soap/envelope/", partName = "parameters") Fault fault) {
    MessageContext ctx = webServiceCtx.getMessageContext();
    final MAP inboundMap = AddressingHelper.inboundMap(ctx);
    final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
    final SoapFault soapFault = SoapFault11.fromFault(fault);
    TaskManager.getManager().queueTask(new Task() {

        public void executeTask() {
            CompletionInitiatorProcessor.getProcessor().handleSoapFault(soapFault, inboundMap, arjunaContext);
            ;
        }
    });
}
Also used : SoapFault(com.arjuna.webservices.SoapFault) 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) Action(javax.xml.ws.Action)

Example 29 with SoapFault

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

the class CoordinatorPortTypeImpl method soapFault.

@WebMethod(operationName = "SoapFault", action = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/fault")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/fault")
public void soapFault(@WebParam(name = "Fault", targetNamespace = "http://schemas.xmlsoap.org/soap/envelope/", partName = "parameters") Fault fault) {
    MessageContext ctx = webServiceCtx.getMessageContext();
    final MAP inboundMap = AddressingHelper.inboundMap(ctx);
    final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
    final SoapFault soapFault = SoapFault11.fromFault(fault);
    TaskManager.getManager().queueTask(new Task() {

        public void executeTask() {
            CoordinatorProcessor.getProcessor().soapFault(soapFault, inboundMap, arjunaContext);
            ;
        }
    });
}
Also used : SoapFault(com.arjuna.webservices.SoapFault) 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) Action(javax.xml.ws.Action)

Example 30 with SoapFault

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

the class BusinessAgreementWithParticipantCompletionCoordinatorPortTypeImpl method soapFault.

@WebMethod(operationName = "fault", action = "http://docs.oasis-open.org/ws-tx/wscoor/2006/06/fault")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wscoor/2006/06/fault")
public void soapFault(@WebParam(name = "Fault", targetNamespace = "http://schemas.xmlsoap.org/soap/envelope/", partName = "parameters") Fault fault) {
    if (WSTLogger.logger.isTraceEnabled()) {
        WSTLogger.logger.trace(getClass().getSimpleName() + ".soapFault");
    }
    MessageContext ctx = webServiceCtx.getMessageContext();
    final MAP inboundMap = AddressingHelper.inboundMap(ctx);
    final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
    final SoapFault soapFault = SoapFault11.fromFault(fault);
    TaskManager.getManager().queueTask(new Task() {

        public void executeTask() {
            ParticipantCompletionCoordinatorProcessor.getProcessor().soapFault(soapFault, inboundMap, arjunaContext);
            ;
        }
    });
}
Also used : SoapFault(com.arjuna.webservices.SoapFault) 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) Action(javax.xml.ws.Action)

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