SubscribeResponse response = new SubscribeResponse();
response.setSubscriptionReference(createEndpointReference(subscription.getAddress()));
success = true;
return response;
} catch (EndpointRegistrationException e) {
SubscribeCreationFailedFaultType fault = new SubscribeCreationFailedFaultType();
throw new SubscribeCreationFailedFault("Unable to register endpoint", fault, e);
} finally {
if (!success && subscription != null) {
subscriptions.remove(subscription);
try {