use of com.arjuna.webservices11.wsarj.ArjunaContext in project narayana by jbosstm.
the class BusinessAgreementWithParticipantCompletionCoordinatorPortTypeImpl method exitOperation.
/**
* @param parameters
*/
@WebMethod(operationName = "ExitOperation", action = "http://docs.oasis-open.org/ws-tx/wsba/2006/06/Exit")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsba/2006/06/Exit")
public void exitOperation(@WebParam(name = "Exit", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsba/2006/06", partName = "parameters") NotificationType parameters) {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.trace(getClass().getSimpleName() + ".exitOperation");
}
MessageContext ctx = webServiceCtx.getMessageContext();
final NotificationType exit = parameters;
final MAP inboundMap = AddressingHelper.inboundMap(ctx);
final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
TaskManager.getManager().queueTask(new Task() {
public void executeTask() {
ParticipantCompletionCoordinatorProcessor.getProcessor().exit(exit, inboundMap, arjunaContext);
}
});
}
use of com.arjuna.webservices11.wsarj.ArjunaContext in project narayana by jbosstm.
the class BusinessAgreementWithParticipantCompletionCoordinatorPortTypeImpl method completedOperation.
/**
* @param parameters
*/
@WebMethod(operationName = "CompletedOperation", action = "http://docs.oasis-open.org/ws-tx/wsba/2006/06/Completed")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsba/2006/06/Completed")
public void completedOperation(@WebParam(name = "Completed", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsba/2006/06", partName = "parameters") NotificationType parameters) {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.trace(getClass().getSimpleName() + ".completeOperation");
}
MessageContext ctx = webServiceCtx.getMessageContext();
final NotificationType completed = parameters;
final MAP inboundMap = AddressingHelper.inboundMap(ctx);
final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
TaskManager.getManager().queueTask(new Task() {
public void executeTask() {
ParticipantCompletionCoordinatorProcessor.getProcessor().completed(completed, inboundMap, arjunaContext);
}
});
}
use of com.arjuna.webservices11.wsarj.ArjunaContext in project narayana by jbosstm.
the class BusinessAgreementWithParticipantCompletionCoordinatorPortTypeImpl method cannotComplete.
/**
* @param parameters
*/
@WebMethod(operationName = "CannotComplete", action = "http://docs.oasis-open.org/ws-tx/wsba/2006/06/CannotComplete")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsba/2006/06/CannotComplete")
public void cannotComplete(@WebParam(name = "CannotComplete", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsba/2006/06", partName = "parameters") NotificationType parameters) {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.trace(getClass().getSimpleName() + ".cannotComplete");
}
MessageContext ctx = webServiceCtx.getMessageContext();
final NotificationType cannotComplete = parameters;
final MAP inboundMap = AddressingHelper.inboundMap(ctx);
final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
TaskManager.getManager().queueTask(new Task() {
public void executeTask() {
ParticipantCompletionCoordinatorProcessor.getProcessor().cannotComplete(cannotComplete, inboundMap, arjunaContext);
}
});
}
use of com.arjuna.webservices11.wsarj.ArjunaContext in project narayana by jbosstm.
the class RegistrationTest method executeRequest.
private void executeRequest(final String messageId, final InstanceIdentifier instanceIdentifier) throws Exception {
final String protocolIdentifier = "http://foo.example.org/bar";
final W3CEndpointReference participantProtocolEndpoint = TestUtil11.getProtocolParticipantEndpoint("participant");
String identifier = (instanceIdentifier != null ? instanceIdentifier.getInstanceIdentifier() : null);
W3CEndpointReference registerEndpoint = TestUtil11.getRegistrationEndpoint(identifier);
RegisterType registerType = new RegisterType();
registerType.setProtocolIdentifier(protocolIdentifier);
registerType.setParticipantProtocolService(participantProtocolEndpoint);
RegistrationPortType port = WSCOORClient.getRegistrationPort(registerEndpoint, CoordinationConstants.WSCOOR_ACTION_REGISTER, messageId);
port.registerOperation(registerType);
final RegisterDetails details = testRegistrationCoordinatorProcessor.getRegisterDetails(messageId, 10000);
final RegisterType requestRegister = details.getRegister();
final MAP requestMap = details.getMAP();
final ArjunaContext requestArjunaContext = details.getArjunaContext();
assertEquals(requestMap.getTo(), TestUtil11.registrationCoordinatorService);
assertEquals(requestMap.getMessageID(), messageId);
if (instanceIdentifier == null) {
assertNull(requestArjunaContext);
} else {
assertEquals(instanceIdentifier.getInstanceIdentifier(), requestArjunaContext.getInstanceIdentifier().getInstanceIdentifier());
}
assertEquals(protocolIdentifier, requestRegister.getProtocolIdentifier());
}
use of com.arjuna.webservices11.wsarj.ArjunaContext in project narayana by jbosstm.
the class TerminationCoordinatorPortTypeImpl method cancelOperation.
/**
* @param parameters
*/
@WebMethod(operationName = "CancelOperation", action = "http://schemas.arjuna.com/ws/2005/10/wsarjtx/Cancel")
@Oneway
public void cancelOperation(@WebParam(name = "Cancel", targetNamespace = "http://schemas.arjuna.com/ws/2005/10/wsarjtx", partName = "parameters") NotificationType parameters) {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.trace(getClass().getSimpleName() + ".cancelOperation");
}
MessageContext ctx = webServiceCtx.getMessageContext();
final NotificationType cancel = parameters;
final MAP inboundMap = AddressingHelper.inboundMap(ctx);
final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
TaskManager.getManager().queueTask(new Task() {
public void executeTask() {
TerminationCoordinatorProcessor.getProcessor().cancel(cancel, inboundMap, arjunaContext);
}
});
}
Aggregations