use of com.jboss.transaction.wstf.webservices.sc007.generated.ParticipantPortType in project narayana by jbosstm.
the class AsyncParticipantClient method sendRetryCommit.
/**
* Send a retryCommit request.
* @param coordinationContext The coordination context.
* @param map The addressing context initialised with to, message ID and relates to.
* @throws IOException for any transport errors.
*/
public void sendRetryCommit(final CoordinationContextType coordinationContext, final MAP map) throws SoapFault, IOException {
map.setReplyTo(initiator);
ParticipantPortType port = InteropClient.getParticipantPort(map, retryCommitAction);
CoordinationContextManager.setThreadContext(coordinationContext);
try {
port.retryCommit();
} finally {
CoordinationContextManager.setThreadContext(null);
}
}
use of com.jboss.transaction.wstf.webservices.sc007.generated.ParticipantPortType in project narayana by jbosstm.
the class InteropClient method getParticipantPort.
// don't think we ever need this as we get a registration port from the endpoint ref returned by
// the activation port request
public static ParticipantPortType getParticipantPort(MAP map, String action) {
Sc007Service service = getSc007Service();
ParticipantPortType port = service.getPort(ParticipantPortType.class, new AddressingFeature(true, true));
BindingProvider bindingProvider = (BindingProvider) port;
String to = map.getTo();
List<Handler> customHandlerChain = new ArrayList<Handler>();
/*
* we need to add the coordination context handler in the case where we are passing a
* coordination context via a header element
*/
customHandlerChain.add(new CoordinationContextHandler());
/*
* we no longer have to add the JaxWS WSAddressingClientHandler because we can specify the WSAddressing feature
customHandlerChain.add(new WSAddressingClientHandler());
*/
bindingProvider.getBinding().setHandlerChain(customHandlerChain);
Map<String, Object> requestContext = bindingProvider.getRequestContext();
map.setAction(action);
map.setFrom(getInitiator());
AddressingHelper.configureRequestContext(requestContext, map, to, action);
return port;
}
use of com.jboss.transaction.wstf.webservices.sc007.generated.ParticipantPortType in project narayana by jbosstm.
the class AsyncParticipantClient method sendReadonly.
/**
* Send a readonly request.
* @param coordinationContext The coordination context.
* @param map The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
public void sendReadonly(final CoordinationContextType coordinationContext, final MAP map) throws SoapFault, IOException {
map.setReplyTo(initiator);
ParticipantPortType port = InteropClient.getParticipantPort(map, readonlyAction);
CoordinationContextManager.setThreadContext(coordinationContext);
try {
port.readonly();
} finally {
CoordinationContextManager.setThreadContext(null);
}
}
use of com.jboss.transaction.wstf.webservices.sc007.generated.ParticipantPortType in project narayana by jbosstm.
the class AsyncParticipantClient method sendRollback.
/**
* Send a rollback request.
* @param coordinationContext The coordination context.
* @param map The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
public void sendRollback(final CoordinationContextType coordinationContext, final MAP map) throws SoapFault, IOException {
map.setReplyTo(initiator);
ParticipantPortType port = InteropClient.getParticipantPort(map, rollbackAction);
CoordinationContextManager.setThreadContext(coordinationContext);
try {
port.rollback();
} finally {
CoordinationContextManager.setThreadContext(null);
}
}
use of com.jboss.transaction.wstf.webservices.sc007.generated.ParticipantPortType in project narayana by jbosstm.
the class AsyncParticipantClient method sendEarlyReadonly.
/**
* Send an earlyReadonly request.
* @param coordinationContext The coordination context.
* @param map The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
public void sendEarlyReadonly(final CoordinationContextType coordinationContext, final MAP map) throws SoapFault, IOException {
map.setReplyTo(initiator);
ParticipantPortType port = InteropClient.getParticipantPort(map, earlyReadonlyAction);
CoordinationContextManager.setThreadContext(coordinationContext);
try {
port.earlyReadonly();
} finally {
CoordinationContextManager.setThreadContext(null);
}
}
Aggregations