/**
* Construct the participant completion coordinator client.
*/
private ParticipantCompletionCoordinatorClient()
{
final AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
try {
completedAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_COMPLETED);
failAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_FAIL);
compensatedAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_COMPENSATED);
closedAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_CLOSED);
cancelledAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_CANCELLED);
exitAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_EXIT);
cannotCompleteAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_CANNOT_COMPLETE);
getStatusAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_GET_STATUS);
statusAction = builder.newURI(BusinessActivityConstants.WSBA_ACTION_STATUS);
} catch (URISyntaxException use) {
// TODO - log fault and throw exception
}
// final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
// Add WS-Addressing
// AddressingPolicy.register(handlerRegistry) ;
// Add client policies
// ClientPolicy.register(handlerRegistry) ;
final String participantCompletionParticipantURIString =
ServiceRegistry.getRegistry().getServiceURI(BusinessActivityConstants.PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_NAME, false) ;
final String secureParticipantCompletionParticipantURIString =
ServiceRegistry.getRegistry().getServiceURI(BusinessActivityConstants.PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_NAME, true) ;
try {
URI participantCompletionParticipantURI = new URI(participantCompletionParticipantURIString) ;
participantCompletionParticipant = builder.newEndpointReference(participantCompletionParticipantURI);
} catch (URISyntaxException use) {
// TODO - log fault and throw exception
}
try {
URI secureParticipantCompletionParticipantURI = new URI(secureParticipantCompletionParticipantURIString) ;
secureParticipantCompletionParticipant = builder.newEndpointReference(secureParticipantCompletionParticipantURI);
} catch (URISyntaxException use) {
// TODO - log fault and throw exception
}
}