if (manager != null) {
publisher.setManager(manager);
}
publisher.register();
publisher.create(registerPublisherRequest);
RegisterPublisherResponse response = new RegisterPublisherResponse();
response.setPublisherRegistrationReference(createEndpointReference(publisher.getAddress()));
success = true;
return response;
} catch (EndpointRegistrationException e) {
PublisherRegistrationFailedFaultType fault = new PublisherRegistrationFailedFaultType();
throw new PublisherRegistrationFailedFault("Unable to register new endpoint", fault, e);