@Override
public UDDIInquiryPortType getUDDIInquiryService(final String endpointURL)
throws TransportException
{
final UDDIInquiryPortType current = uddiInquiryPortTypeRef.get() ;
if (current != null)
{
return current ;
}
final String inquiryUrl ;
if (endpointURL == null)
{
try
{
final UDDIClerkManager manager = UDDIClientContainer.getUDDIClerkManager(managerName) ;
inquiryUrl = manager.getClientConfig().getUDDINode(nodeName).getInquiryUrl() ;
}
catch (final ConfigurationException ce)
{
throw new TransportException("Could not discover inquiryUrl for node " + nodeName, ce) ;
}
}
else
{
inquiryUrl = endpointURL ;
}
final Object delegatePortType = createDelegate(inquiryUrl) ;
final InvocationHandler handler = new TaskHandler(delegatePortType) ;
final UDDIInquiryPortType uddiInquiryPortType = (UDDIInquiryPortType) Proxy.newProxyInstance(classLoader,
new Class[] {UDDIInquiryPortType.class}, handler) ;
if (uddiInquiryPortTypeRef.compareAndSet(null, uddiInquiryPortType))
{
return uddiInquiryPortType ;
}