if (custodyTransferService == null) {
if (endpointURL == null) {
UDDIClient client = UDDIClientContainer.getUDDIClient(clientName);
endpointURL = client.getClientConfig().getUDDINode(nodeName).getCustodyTransferUrl();
}
UDDIService service = new UDDIService();
custodyTransferService = service.getUDDICustodyPort();
}
if (endpointURL != null) {
Map<String, Object> requestContext = ((BindingProvider) custodyTransferService).getRequestContext();
requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointURL);
setCredentials(requestContext);