public class UDDIClient extends Object
The UDDIClient is the main entry point for using the jUDDI client. The UDDICLient provides a simple way to get interact with a UDDI registry using the UDDI v3 API.
It is also possible to use the Java API for XML Registries (JAXR). Apache Scout is an implementation of this API that can be configured to -behind the scenes- use the jUDDI Client code to access either UDDIv2 or UDDIv3 registry. The advantage of using JAXR is that your code can be configured to interact with any XML Registry (such as UDDI or ebXML). The downside is that JAXR has not evolved beyond the 1.0 release and is tightly coupled to the ebXML data structures, which being mapped to the UDDI data structures. For more information on JAXR see the Apache Scout project, which is a sub project of Apache jUDDI. If programmatic acess to a UDDIv3 registry is what you want, we recommend using the UDDIv3 API with the UDDIClient.
The UDDIClient uses a XML formatted configuration file, which by default is loaded from the classpath from location META-INF/uddi.xml.
Constructor and Description |
---|
UDDIClient()
Default constructor, loads from the default config, META-INF/uddi.xml
|
UDDIClient(String configurationFile)
Manages the clerks.
|
UDDIClient(String configurationFile,
Properties properties)
Manages the clerks.
|
Modifier and Type | Method and Description |
---|---|
static BindingTemplate |
addRESTtModels(BindingTemplate bt)
adds the typical REST tmodel references, but only if they aren't
already present
|
static BindingTemplate |
addSOAPtModels(BindingTemplate bt)
adds the typical SOAP tmodel references, but only if they aren't
already present
|
static void |
clearServiceLocatorCaches() |
UDDIClerk |
getClerk(String clerkName)
Gets the UDDI Clerk, the entry point into many functions of the juddi
client
|
String |
getClientCallbackUrl()
Deprecated.
use SubscriptionCallbackListener
|
ClientConfig |
getClientConfig()
Returns a live instance of the raw configuration file
|
String |
getName()
returns getClientConfig().getClientName()
|
ServiceLocator |
getServiceLocator()
Uses the client config, and looks for a clerk called "default"
|
ServiceLocator |
getServiceLocator(String clerkName) |
Transport |
getTransport()
Deprecated.
use the getTransport(String nodeName) instead. Returns
the "default" jUDDI nodes Transport. Note: this will always return a
new instance of Transport
|
Transport |
getTransport(String nodeName)
Returns the transport defined for the node with the given nodeName.
|
void |
registerAnnotatedServices()
Registers services to UDDI using a clerk, and the uddi.xml
configuration.
|
void |
registerWSDLs()
Registers services to UDDI using a clerk, and the uddi.xml
configuration.
|
void |
restart()
calls stop and start again
|
void |
saveClerkAndNodeInfo()
Saves the clerk and node info from the uddi.xml to the home jUDDI
registry.
|
void |
start()
Initializes the UDDI Clerk.
|
protected void |
startEmbeddedServer() |
void |
stop()
Stops the clerks.
|
protected void |
stopEmbeddedServer() |
void |
unRegisterAnnotatedServices()
Removes the service and all of its bindingTemplates of the annotated
classes.
|
void |
unRegisterBindingsOfAnnotatedServices(boolean removeServiceWithNoBindingTemplates)
Removes the bindings of the services in the annotated classes.
|
void |
unRegisterWSDLs()
unregisters all config defined wsdls
|
void |
xRegister()
X-Register services listed in the uddi.xml
|
public UDDIClient() throws org.apache.commons.configuration.ConfigurationException
org.apache.commons.configuration.ConfigurationException
public UDDIClient(String configurationFile) throws org.apache.commons.configuration.ConfigurationException
org.apache.commons.configuration.ConfigurationException
public UDDIClient(String configurationFile, Properties properties) throws org.apache.commons.configuration.ConfigurationException
configurationFile
- properties
- org.apache.commons.configuration.ConfigurationException
public static void clearServiceLocatorCaches()
public ServiceLocator getServiceLocator() throws org.apache.commons.configuration.ConfigurationException
org.apache.commons.configuration.ConfigurationException
public ServiceLocator getServiceLocator(String clerkName) throws org.apache.commons.configuration.ConfigurationException
clerkName
- - if null defaults to "default"org.apache.commons.configuration.ConfigurationException
public void stop() throws org.apache.commons.configuration.ConfigurationException
org.apache.commons.configuration.ConfigurationException
public void start() throws org.apache.commons.configuration.ConfigurationException
org.apache.commons.configuration.ConfigurationException
protected void startEmbeddedServer() throws org.apache.commons.configuration.ConfigurationException
org.apache.commons.configuration.ConfigurationException
protected void stopEmbeddedServer() throws org.apache.commons.configuration.ConfigurationException
org.apache.commons.configuration.ConfigurationException
public void restart() throws org.apache.commons.configuration.ConfigurationException
org.apache.commons.configuration.ConfigurationException
public void saveClerkAndNodeInfo()
public void xRegister()
public void registerAnnotatedServices()
public void unRegisterAnnotatedServices()
public void unRegisterBindingsOfAnnotatedServices(boolean removeServiceWithNoBindingTemplates)
removeServiceWithNoBindingTemplates
- - if set to true it will
remove the service if there are no other BindingTemplates.public ClientConfig getClientConfig()
public String getName()
@Deprecated public String getClientCallbackUrl()
SubscriptionCallbackListener
public Transport getTransport() throws org.apache.commons.configuration.ConfigurationException
org.apache.commons.configuration.ConfigurationException
public Transport getTransport(String nodeName) throws org.apache.commons.configuration.ConfigurationException
nodeName
- org.apache.commons.configuration.ConfigurationException
public UDDIClerk getClerk(String clerkName)
clerkName
- - This references the uddi/client/clerk@name of the
juddi client config file. it stores credentials if necessary and
associates it with a particular UDDI node (server/cluster) If not
specified, the value of "default" will be used.public void registerWSDLs()
public void unRegisterWSDLs()
public static BindingTemplate addSOAPtModels(BindingTemplate bt)
bt
- public static BindingTemplate addRESTtModels(BindingTemplate bt)
bt
- Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.