use of com.arjuna.webservices11.SoapFault11 in project narayana by jbosstm.
the class ParticipantPortTypeImpl method volatileAndDurable.
/**
*/
@WebMethod(operationName = "VolatileAndDurable", action = "http://www.wstf.org/docs/scenarios/sc007/VolatileAndDurable")
@Oneway
@Action(input = "http://www.wstf.org/docs/scenarios/sc007/VolatileAndDurable")
@RequestWrapper(localName = "VolatileAndDurable", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.wstf.webservices.sc007.generated.TestMessageType")
public void volatileAndDurable() {
MessageContext ctx = webServiceCtx.getMessageContext();
MAP inboundMap = AddressingHelper.inboundMap(ctx);
CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
try {
ParticipantProcessor.getParticipant().volatileAndDurable(coordinationContext, inboundMap);
} catch (SoapFault11 sf) {
sendSoapFault(inboundMap, sf);
return;
}
sendResponse(inboundMap);
}
use of com.arjuna.webservices11.SoapFault11 in project narayana by jbosstm.
the class ParticipantPortTypeImpl method retryPreparedAbort.
/**
*/
@WebMethod(operationName = "RetryPreparedAbort", action = "http://www.wstf.org/docs/scenarios/sc007/RetryPreparedAbort")
@Oneway
@Action(input = "http://www.wstf.org/docs/scenarios/sc007/RetryPreparedAbort")
@RequestWrapper(localName = "RetryPreparedAbort", targetNamespace = "http://www.wstf.org/sc007", className = "com.jboss.transaction.wstf.webservices.sc007.generated.TestMessageType")
public void retryPreparedAbort() {
MessageContext ctx = webServiceCtx.getMessageContext();
MAP inboundMap = AddressingHelper.inboundMap(ctx);
CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
try {
ParticipantProcessor.getParticipant().retryPreparedAbort(coordinationContext, inboundMap);
} catch (SoapFault11 sf) {
sendSoapFault(inboundMap, sf);
return;
}
sendResponse(inboundMap);
}
use of com.arjuna.webservices11.SoapFault11 in project narayana by jbosstm.
the class InitiatorPortTypeImpl method soapFault.
@WebMethod(operationName = "SoapFault", action = "http://www.wstf.org/docs/scenarios/sc007/SoapFault")
@Oneway
@Action(input = "http://www.wstf.org/docs/scenarios/sc007/SoapFault")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public void soapFault(@WebParam(name = "Fault", targetNamespace = "http://schemas.xmlsoap.org/soap/envelope/", partName = "parameters") Fault fault) {
MessageContext ctx = webServiceCtx.getMessageContext();
MAP inboundMap = AddressingHelper.inboundMap(ctx);
SoapFault11 soapFaultInternal = SoapFault11.fromFault(fault);
InitiatorProcessor.getInitiator().handleSoapFault(soapFaultInternal, inboundMap);
}
use of com.arjuna.webservices11.SoapFault11 in project narayana by jbosstm.
the class InitiatorPortTypeImpl method soapFault.
@WebMethod(operationName = "SoapFault", action = "http://fabrikam123.com/SoapFault")
@Oneway
@Action(input = "http://fabrikam123.com/SoapFault")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public void soapFault(@WebParam(name = "Fault", targetNamespace = "http://schemas.xmlsoap.org/soap/envelope/", partName = "parameters") Fault fault) {
MessageContext ctx = webServiceCtx.getMessageContext();
MAP inboundMap = AddressingHelper.inboundMap(ctx);
SoapFault11 soapFaultInternal = SoapFault11.fromFault(fault);
ATInitiatorProcessor.getInitiator().handleSoapFault(soapFaultInternal, inboundMap);
}
use of com.arjuna.webservices11.SoapFault11 in project narayana by jbosstm.
the class CompletionCoordinatorProcessorImpl method commit.
/**
* Commit.
* @param commit The commit notification.
* @param map The addressing context.
* @param arjunaContext The arjuna context.
*/
public void commit(final Notification commit, final MAP map, final ArjunaContext arjunaContext) {
final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
final CompletionCoordinatorParticipant participant = getParticipant(instanceIdentifier);
try {
if (participant != null) {
final String messageId = MessageId.getMessageId();
try {
participant.commit();
} catch (final TransactionRolledBackException trbe) {
final MAP responseAddressingContext = AddressingHelper.createResponseContext(map, messageId);
CompletionInitiatorClient.getClient().sendAborted(participant.getParticipant(), responseAddressingContext, instanceIdentifier);
return;
} catch (final UnknownTransactionException ute) {
final MAP faultAddressingContext = AddressingHelper.createFaultContext(map, messageId);
final SoapFault soapFault = new SoapFault11(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME, WSTLogger.i18NLogger.get_wst11_messaging_CompletionCoordinatorProcessorImpl_1());
CompletionInitiatorClient.getClient().sendSoapFault(participant.getParticipant(), faultAddressingContext, soapFault, instanceIdentifier);
return;
} catch (final SystemException se) {
final MAP faultAddressingContext = AddressingHelper.createFaultContext(map, messageId);
final String pattern = WSTLogger.i18NLogger.get_wst11_messaging_CompletionCoordinatorProcessorImpl_2();
final String message = MessageFormat.format(pattern, new Object[] { se });
final SoapFault soapFault = new SoapFault11(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNERROR_ERROR_CODE_QNAME, message);
CompletionInitiatorClient.getClient().sendSoapFault(participant.getParticipant(), faultAddressingContext, soapFault, instanceIdentifier);
return;
} catch (final Throwable th) {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.tracev("Unexpected exception thrown from commit:", th);
}
final MAP faultAddressingContext = AddressingHelper.createFaultContext(map, MessageId.getMessageId());
final SoapFault soapFault = new SoapFault11(th);
CompletionInitiatorClient.getClient().sendSoapFault(participant.getParticipant(), faultAddressingContext, soapFault, instanceIdentifier);
return;
}
final MAP responseAddressingContext = AddressingHelper.createResponseContext(map, messageId);
CompletionInitiatorClient.getClient().sendCommitted(participant.getParticipant(), responseAddressingContext, instanceIdentifier);
} else {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.tracev("Commit called on unknown participant: {0}", new Object[] { instanceIdentifier });
}
final MAP faultAddressingContext = AddressingHelper.createFaultContext(map, MessageId.getMessageId());
final SoapFault soapFault = new SoapFault11(SoapFaultType.FAULT_SENDER, ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME, WSTLogger.i18NLogger.get_wst11_messaging_CompletionCoordinatorProcessorImpl_5());
CompletionInitiatorClient.getClient().sendSoapFault(faultAddressingContext, soapFault, instanceIdentifier);
}
} catch (Throwable throwable) {
throwable.printStackTrace(System.err);
}
}
Aggregations