use of com.arjuna.webservices11.SoapFault11 in project narayana by jbosstm.
the class TerminationParticipantClient method sendSoapFault.
/**
* Send a fault.
* @param endpoint the endpoint reference to notify
* @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 endpoint, final MAP map, final SoapFault soapFault, final InstanceIdentifier identifier) throws SoapFault, IOException {
// AddressingHelper.installFrom(map, terminationCoordinator, identifier);
AddressingHelper.installNoneReplyTo(map);
final TerminationParticipantPortType port = getPort(endpoint, map, identifier, soapFaultAction);
SoapFault11 soapFault11 = (SoapFault11) soapFault;
Fault fault = soapFault11.toFault();
port.faultOperation(fault);
}
use of com.arjuna.webservices11.SoapFault11 in project narayana by jbosstm.
the class TerminationCoordinatorPortTypeImpl method fault.
@WebMethod(operationName = "fault", action = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/fault")
@Oneway
public void fault(@WebParam(name = "Fault", targetNamespace = "http://schemas.xmlsoap.org/soap/envelope/", partName = "parameters") Fault fault) {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.trace(getClass().getSimpleName() + ".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() {
TerminationCoordinatorProcessor.getProcessor().soapFault(soapFault, inboundMap, arjunaContext);
;
}
});
}
use of com.arjuna.webservices11.SoapFault11 in project narayana by jbosstm.
the class TerminationParticipantPortTypeImpl method faultOperation.
/**
* @param parameters
*/
@WebMethod(operationName = "FaultOperation", action = "http://schemas.arjuna.com/ws/2005/10/wsarjtx/Fault")
@Oneway
public void faultOperation(@WebParam(name = "Fault", targetNamespace = "http://schemas.xmlsoap.org/soap/envelope/", partName = "parameters") Fault parameters) {
MessageContext ctx = webServiceCtx.getMessageContext();
final MAP inboundMap = AddressingHelper.inboundMap(ctx);
final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
final SoapFault soapFault = SoapFault11.fromFault(parameters);
TaskManager.getManager().queueTask(new Task() {
public void executeTask() {
TerminationParticipantProcessor.getProcessor().handleSoapFault(soapFault, inboundMap, arjunaContext);
}
});
}
use of com.arjuna.webservices11.SoapFault11 in project narayana by jbosstm.
the class ParticipantCompletionCoordinatorClient method sendSoapFault.
/**
* send a soap fault
* @param soapFault the fault to be sent
* @param participant the endpoint to send the fault to
* @param map addressing context to be used to send the fault
* @param faultAction the action to associate with the message
*/
public void sendSoapFault(SoapFault11 soapFault, W3CEndpointReference participant, MAP map, String faultAction) throws SoapFault, IOException {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.trace(getClass().getSimpleName() + ".sendSoapFault");
}
AddressingHelper.installNoneReplyTo(map);
map.setAction(faultAction);
BusinessAgreementWithParticipantCompletionCoordinatorPortType port;
port = getPort(participant, map, faultAction);
Fault fault = ((SoapFault11) soapFault).toFault();
port.soapFault(fault);
}
use of com.arjuna.webservices11.SoapFault11 in project narayana by jbosstm.
the class CoordinatorCompletionParticipantProcessorImpl method getStatus.
/**
* Get Status.
* @param getStatus The get status notification.
* @param map The addressing context.
* @param arjunaContext The arjuna context.
*/
public void getStatus(final NotificationType getStatus, final MAP map, final ArjunaContext arjunaContext) {
final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier);
if (participant != null) {
try {
participant.getStatus(getStatus, map, arjunaContext);
} catch (final Throwable th) {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.tracev("Unexpected exception thrown from getStatus:", th);
}
}
} else {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.tracev("GetStatus called on unknown participant: {0}", new Object[] { instanceIdentifier });
}
// send an invalid state fault
final String messageId = MessageId.getMessageId();
final MAP faultMAP = AddressingHelper.createFaultContext(map, messageId);
try {
final SoapFault11 soapFault = new SoapFault11(SoapFaultType.FAULT_SENDER, CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_STATE_QNAME, WSTLogger.i18NLogger.get_wst11_messaging_CoordinatorCompletionParticipantProcessorImpl_getStatus_4());
CoordinatorCompletionCoordinatorClient.getClient().sendSoapFault(soapFault, null, faultMAP, getFaultAction());
} catch (final Throwable th) {
WSTLogger.i18NLogger.info_wst11_messaging_CoordinatorCompletionParticipantProcessorImpl_getStatus_3(instanceIdentifier.toString(), th);
}
}
}
Aggregations