public class UDDIClerk extends Object implements Serializable
UDDIClient uddiClient = new UDDIClient();
UDDIClerk clerk = uddiClient.getClerk(clerkName);
where the clerkName "MyClerk" is defined as attribute on the clerk
element
<clerks registerOnStartup="true">
<clerk name="MyClerk" node="default" publisher="root" password="root" isPasswordEncrypted="false" cryptoProvider="">
<class>org.apache.juddi.example.HelloWorldImpl</class>
</clerk>
</clerks>
Credentials: In the clerk section you need to specify the publisher to
be used, as well the password. The password can be encrypted and a
cryptoProvider class can be set.
UDDI Annotations: If you want to register classes containing UDDIAnnotations,
then you need to set registerOnStartup="true" and you can list the classes
with the annotations as subelements. See the HelloWorldImpl class above, as
well as the uddi-annotations example.Modifier and Type | Class and Description |
---|---|
static class |
UDDIClerk.WSDL
Internal classed used for wsdl registration
|
Modifier and Type | Field and Description |
---|---|
protected String |
name |
protected String |
password |
protected String |
publisher |
protected UDDINode |
uddiNode |
Constructor and Description |
---|
UDDIClerk()
use caution calling the default constructor, many of the functions of
the UDDI Clerk will not function unless manually set.
|
UDDIClerk(Clerk clerk) |
Modifier and Type | Method and Description |
---|---|
static TModel |
createKeyGenator(String partitionName,
String DescriptiveName,
String DescriptiveNameLanguage)
A helper function to create a tModel key generator.
Why would I want a key generator? In UDDIv3, you're suppose to specify what you want the keys (unique identifiers) to be, however there's a number of naming rules associated with the keys. |
static TModelInstanceInfo |
createServiceInterfaceVersion(String version,
String lang)
This is a convenience function that will build and return a
TModelInstanceInfo as described in the following link that will
enable you to tag web services registered in UDDI with some kind of
version information.
Article source: http://www.ibm.com/developerworks/webservices/library/ws-version/ When using this tModel as a tModelInstance, it can be used to describe a version associated with either a service interface, a bindingTemplate service instance. |
void |
discardAuthToken()
kills the current auth token, aka Logout current Node
|
void |
discardAuthToken(String token)
kills the provided auth token, aka Logout
|
void |
discardAuthToken(String token,
String endpoint)
kills the provided auth token, aka Logout
|
BusinessEntity |
findBusiness(String businessKey)
Deprecated.
Use getBusinessDetail instead
|
BusinessEntity |
findBusiness(String businessKey,
Node node)
Deprecated.
Use getBusinessDetail instead
|
RelatedBusinessesList |
findRelatedBusinesses(String businessKey,
Node node)
Looks up the BusinessEntity in the registry for "related" businesses.
|
BusinessService |
findService(String serviceKey)
Deprecated.
see getServiceDetail
|
BusinessService |
findService(String serviceKey,
Node node)
Deprecated.
see getServiceDetail
|
BindingTemplate |
findServiceBinding(String bindingKey)
Deprecated.
see getServiceBindingDetail
|
BindingTemplate |
findServiceBinding(String bindingKey,
Node node)
Deprecated.
use getServiceBindingDetail instead
|
TModelList |
findTModel(FindTModel findTModel)
finds a tmodel.
|
TModelList |
findTModel(FindTModel findTModel,
Node node)
finds a tModel
|
Clerk |
getApiClerk()
The API Clerk is the JAXWS generated "Clerk" element that is used
both on the jUDDI Client and on the jUDDI Web Service (not part of
the UDDI spec).
|
String |
getAuthToken()
Gets an auth token from the uddi server using the uddi auth token
Notice: never log auth tokens! Treat it like a password Calls |
String |
getAuthToken(String endpointURL)
Gets an auth token from the uddi server using the uddi auth token
Notice: never log auth tokens! Treat it like a password notes: changed to public to have access from the subscription callback API 8/20/2013 AO |
static Set<BindingTemplate> |
getBindingByVersion(String version,
List<BindingTemplate> bindingTemplate)
This is a convenience function that will filter a list of binding
templates and return a list of bindings matching the specified
version number.
|
BusinessEntity |
getBusinessDetail(String businessKey)
Looks up the BusinessEntiry in the registry, will return null if is
not found.
|
BusinessEntity |
getBusinessDetail(String businessKey,
Node node)
Looks up the BusinessEntiry in the registry, will return null if is
not found.
|
String[] |
getClassWithAnnotations()
A list of classes defined in the config file that have UDDI
Annotations on them for automated registration
client.clerks.clerk(" + i + ").class |
String |
getCryptoProvider()
client.clerks.clerk(" + i + ")[@cryptoProvider]
|
List<String> |
getEndpoints(String serviceKey)
JUDDI-700 This implements the "find_endpoints" pattern as described
in Alex O'Ree's Master's Thesis on UDDI.
|
boolean |
getIsPasswordEncrypted()
client.clerks.clerk(" + i + ")[@isPasswordEncrypted]
|
String |
getManagerName()
The client manager name as defined in the config file client[@name]
|
String |
getName()
client.clerks.clerk(" + i + ")[@name]
|
String |
getPassword()
If the password is encrypted, it will be decrypted if possible,
otherwise the cipher text will be returned.
|
String |
getPublisher()
This is the username client.clerks.clerk(" + i + ")[@publisher]
|
String |
getRawPassword()
If the password is encrypted, it cipher text is returned, otherwise
the clear text will be returned.
|
BindingTemplate |
getServiceBindingDetail(String bindingKey)
gets a binding detail by key
|
BindingTemplate |
getServiceBindingDetail(String bindingKey,
Node node)
Gets the details of a specific service binding key
|
ServiceDetail |
getServiceDetail(GetServiceDetail getDetail)
Gets service details or NULL if it doesn't exist or an error occurred
|
ServiceDetail |
getServiceDetail(GetServiceDetail getDetail,
Node node)
Gets service details or NULL if it doesn't exist or an error occurred
|
BusinessService |
getServiceDetail(String serviceKey)
Finds a service by the key, .
|
BusinessService |
getServiceDetail(String serviceKey,
Node node)
Finds a service by the key, referencing the specific Node from the
configuration file
|
Map<String,Properties> |
getServices()
Deprecated.
|
TModelDetail |
getTModelDetail(GetTModelDetail getTModelDetail)
Gets the details of a tModel by the key.
|
TModelDetail |
getTModelDetail(GetTModelDetail getTModelDetail,
Node node)
Gets the details of a tModel by the key using the referenced Node
from the config file
|
TModelDetail |
getTModelDetail(String tModelKey)
Gets the details of a tModel by the key.
|
UDDINode |
getUDDINode()
Returns the UDDI node that this clerk is associated with
client.clerks.clerk(" + i + ")@node
|
UDDINode |
getUDDINode(Node apinode) |
UDDIClerk.WSDL[] |
getWsdls()
Used for the automated registration of services via WSDL2UDDI
config file: client.clerks.clerk(" + i + ").wsdl |
BindingTemplate |
register(BindingTemplate binding)
Register a BindingTemplate, using the node of current clerk ('this').
|
BindingTemplate |
register(BindingTemplate binding,
Node node)
Register a BindingTemplate.
|
BusinessEntity |
register(BusinessEntity business)
registers a UDDI business.
|
BusinessEntity |
register(BusinessEntity business,
Node node)
Registers a UDDI Business referencing the specified Node from the
config file
|
BusinessService |
register(BusinessService service)
Register a service, using the node of current clerk ('this').
|
BusinessService |
register(BusinessService service,
Node node)
Register a service.
|
Subscription |
register(Subscription subscription)
Registers the Subscription that is passed in to the UDDI node for
this clerk.
|
Subscription |
register(Subscription subscription,
Node node)
Register a Subscription to UDDI node passed in.
|
TModelDetail |
register(TModel tModel)
Register a tModel, using the node of current clerk ('this').
|
TModelDetail |
register(TModel tModel,
Node node)
Register a tModel.
|
void |
registerWsdls()
Performans the process of parsing the configuration defined wsdls to
UDDI.
|
void |
registerWsdls(javax.wsdl.Definition wsdlDefinition,
String keyDomain,
String businessKey)
Registers a WSDL Definition onto the UDDI node referenced by the
clerk.
|
void |
registerWsdls(URL localizerBaseUrl)
Registers the WSDL files referenced in the clerk onto the UDDI node
referenced by the clerk.
|
ClerkDetail |
saveClerk(UDDIClerk senderClerk)
This calls a jUDDI implementation specific API call and is used to
help configure internode communication between jUDDI servers.
|
NodeDetail |
saveNode(Node node)
This calls a jUDDI implementation specific API call and is used to
help configure internode communication between jUDDI servers.
|
void |
setClassWithAnnotations(String[] classWithAnnotations)
A list of classes defined in the config file that have UDDI
Annotations on them for automated registration
client.clerks.clerk(" + i + ").class |
void |
setCryptoProvider(String clazz)
client.clerks.clerk(" + i + ")[@cryptoProvider]
|
void |
setIsPasswordEncrypted(boolean option)
client.clerks.clerk(" + i + ")[@isPasswordEncrypted] default is false
|
void |
setManagerName(String managerName)
The client manager name as defined in the config file client[@name]
|
void |
setName(String name)
client.clerks.clerk(" + i + ")[@name]
|
void |
setPassword(String password)
Use with caution, don't forget to set the IsEncrypted and Crypto
provider client.clerks.clerk(" + i + ")[@password]
|
void |
setPublisher(String publisher)
This is the username client.clerks.clerk(" + i + ")[@publisher]
|
void |
setServices(Map<String,Properties> services)
Deprecated.
|
void |
setUDDINode(UDDINode uddiNode)
client.clerks.clerk(" + i + ")[@node] reference to UDDI Node
|
void |
setWsdls(UDDIClerk.WSDL[] wsdls)
Used for the automated registration of services via WSDL2UDDI
config file: client.clerks.clerk(" + i + ").wsdl |
void |
unRegisterBinding(String bindingKey)
removes a binding by key.
|
void |
unRegisterBinding(String bindingKey,
Node node)
Unregisters the BindingTemplate with specified bindingKey and
referenced node defined in the config file Note, if registration
fails, no exception is thrown
|
void |
unRegisterBusiness(String businessKey)
removes a business from UDDI.
|
void |
unRegisterBusiness(String businessKey,
Node node)
Unregisters the service with specified serviceKey using the specified
Node, as defined in the config file Note, if registration fails, no
exception is thrown
|
void |
unRegisterService(String serviceKey)
removes a service by key.
|
void |
unRegisterService(String serviceKey,
Node node)
Unregisters the service with specified serviceKey.
|
void |
unRegisterSubscription(String subscriptionKey)
removes a subscription by key.
|
void |
unRegisterSubscription(String subscriptionKey,
Node node)
removes a subscription by key, referencing the specified node in the
config file Note, if registration fails, no exception is thrown
|
void |
unRegisterTModel(String tModelKey)
removes a tModel.
|
void |
unRegisterTModel(String tModelKey,
Node node)
Unregisters the BindingTemplate with specified bindingKey.
|
void |
unRegisterWsdls()
Removes the UDDI data structures belonging to the WSDLs for this
clerk from the UDDI node.
|
protected String name
protected UDDINode uddiNode
protected String publisher
protected String password
public UDDIClerk()
public UDDIClerk(Clerk clerk)
public String[] getClassWithAnnotations()
UDDIService
,
UDDIServiceBinding
public UDDINode getUDDINode()
public void setClassWithAnnotations(String[] classWithAnnotations)
UDDIService
,
UDDIServiceBinding
@Deprecated public Map<String,Properties> getServices()
@Deprecated public void setServices(Map<String,Properties> services)
services
- public String getManagerName()
public void setManagerName(String managerName)
managerName
- public void registerWsdls()
public void registerWsdls(URL localizerBaseUrl)
<clerks registerOnStartup="false">
<clerk name="joe" node="default" publisher="joepublisher" password="joepublisher" isPasswordEncrypted="false" cryptoProvider="">
<wsdl businessName="WSDL-Business">wsdl/helloworld.wsdl</wsdl>
</clerk>
</clerks>
localizerBaseUrl
- - The baseUrl part which will be used when
building the bindingTemplate.public void registerWsdls(javax.wsdl.Definition wsdlDefinition, String keyDomain, String businessKey)
wsdlDefinition
- - the WSDL DefinitionkeyDomain
- - the keyDomain which will be used to construct the
UDDI key IDs. If left null the keyDomain defined in the node's
properties will be used.businessKey
- - the key of the business to which this service
belongs. If left null the businessKey defined in the node's
properties will be used.public void unRegisterWsdls()
public Subscription register(Subscription subscription)
subscription
- public Subscription register(Subscription subscription, Node node)
subscription
- a UDDI subscription, remember only one filter
type is allowed by UDDInode
- the UDDI node referenced from the config filepublic TModelDetail register(TModel tModel)
tModel
- public TModelDetail register(TModel tModel, Node node)
tModel
- node
- public BindingTemplate register(BindingTemplate binding)
binding
- public BindingTemplate register(BindingTemplate binding, Node node)
binding
- node
- public BusinessService register(BusinessService service)
service
- public BusinessService register(BusinessService service, Node node)
service
- the element returned by the server, it may be modified
from the originalnode
- public BusinessEntity register(BusinessEntity business)
business
- public BusinessEntity register(BusinessEntity business, Node node)
business
- node
- public void unRegisterBusiness(String businessKey)
businessKey
- public void unRegisterBusiness(String businessKey, Node node)
businessKey
- node
- public void unRegisterService(String serviceKey)
serviceKey
- public void unRegisterService(String serviceKey, Node node)
serviceKey
- node
- public void unRegisterBinding(String bindingKey)
bindingKey
- public void unRegisterBinding(String bindingKey, Node node)
bindingKey
- node
- public void unRegisterTModel(String tModelKey)
tModelKey
- public void unRegisterTModel(String tModelKey, Node node)
tModelKey
- node
- public void unRegisterSubscription(String subscriptionKey)
subscriptionKey
- public void unRegisterSubscription(String subscriptionKey, Node node)
subscriptionKey
- node
- public TModelList findTModel(FindTModel findTModel) throws RemoteException, org.apache.commons.configuration.ConfigurationException, TransportException
findTModel
- RemoteException
org.apache.commons.configuration.ConfigurationException
TransportException
public TModelList findTModel(FindTModel findTModel, Node node) throws RemoteException, TransportException, org.apache.commons.configuration.ConfigurationException
findTModel
- node
- RemoteException
TransportException
org.apache.commons.configuration.ConfigurationException
public TModelDetail getTModelDetail(String tModelKey) throws RemoteException, org.apache.commons.configuration.ConfigurationException, TransportException
tModelKey
- RemoteException
org.apache.commons.configuration.ConfigurationException
TransportException
public TModelDetail getTModelDetail(GetTModelDetail getTModelDetail) throws RemoteException, org.apache.commons.configuration.ConfigurationException, TransportException
getTModelDetail
- RemoteException
org.apache.commons.configuration.ConfigurationException
TransportException
public TModelDetail getTModelDetail(GetTModelDetail getTModelDetail, Node node) throws RemoteException, TransportException, org.apache.commons.configuration.ConfigurationException
getTModelDetail
- node
- RemoteException
TransportException
org.apache.commons.configuration.ConfigurationException
public BusinessService getServiceDetail(String serviceKey) throws RemoteException, TransportException, org.apache.commons.configuration.ConfigurationException
serviceKey
- RemoteException
TransportException
org.apache.commons.configuration.ConfigurationException
@Deprecated public BusinessService findService(String serviceKey) throws RemoteException, TransportException, org.apache.commons.configuration.ConfigurationException
serviceKey
- RemoteException
TransportException
org.apache.commons.configuration.ConfigurationException
@Deprecated public BusinessService findService(String serviceKey, Node node) throws RemoteException, TransportException, org.apache.commons.configuration.ConfigurationException
serviceKey
- node
- RemoteException
TransportException
org.apache.commons.configuration.ConfigurationException
public BusinessService getServiceDetail(String serviceKey, Node node) throws RemoteException, TransportException, org.apache.commons.configuration.ConfigurationException
serviceKey
- node
- RemoteException
TransportException
org.apache.commons.configuration.ConfigurationException
@Deprecated public BindingTemplate findServiceBinding(String bindingKey) throws DispositionReportFaultMessage, RemoteException, TransportException, org.apache.commons.configuration.ConfigurationException
bindingKey
- DispositionReportFaultMessage
RemoteException
TransportException
org.apache.commons.configuration.ConfigurationException
public BindingTemplate getServiceBindingDetail(String bindingKey) throws DispositionReportFaultMessage, RemoteException, TransportException, org.apache.commons.configuration.ConfigurationException
bindingKey
- DispositionReportFaultMessage
RemoteException
TransportException
org.apache.commons.configuration.ConfigurationException
@Deprecated public BindingTemplate findServiceBinding(String bindingKey, Node node) throws DispositionReportFaultMessage, RemoteException, TransportException, org.apache.commons.configuration.ConfigurationException
bindingKey
- node
- DispositionReportFaultMessage
RemoteException
TransportException
org.apache.commons.configuration.ConfigurationException
public BindingTemplate getServiceBindingDetail(String bindingKey, Node node) throws DispositionReportFaultMessage, RemoteException, TransportException, org.apache.commons.configuration.ConfigurationException
bindingKey
- node
- DispositionReportFaultMessage
RemoteException
TransportException
org.apache.commons.configuration.ConfigurationException
@Deprecated public BusinessEntity findBusiness(String businessKey) throws RemoteException, TransportException, org.apache.commons.configuration.ConfigurationException
businessKey
- RemoteException
TransportException
org.apache.commons.configuration.ConfigurationException
@Deprecated public BusinessEntity findBusiness(String businessKey, Node node) throws RemoteException, TransportException, org.apache.commons.configuration.ConfigurationException
businessKey
- - the key we are looking fornode
- - the node which is going to be queriedRemoteException
TransportException
org.apache.commons.configuration.ConfigurationException
public BusinessEntity getBusinessDetail(String businessKey) throws RemoteException, TransportException, org.apache.commons.configuration.ConfigurationException
businessKey
- - the key we are looking forRemoteException
TransportException
org.apache.commons.configuration.ConfigurationException
public BusinessEntity getBusinessDetail(String businessKey, Node node) throws RemoteException, TransportException, org.apache.commons.configuration.ConfigurationException
businessKey
- - the key we are looking fornode
- - the node which is going to be queriedRemoteException
TransportException
org.apache.commons.configuration.ConfigurationException
public RelatedBusinessesList findRelatedBusinesses(String businessKey, Node node) throws RemoteException, TransportException, org.apache.commons.configuration.ConfigurationException
businessKey
- - the key we are looking fornode
- - the node which is going to be queriedRemoteException
TransportException
org.apache.commons.configuration.ConfigurationException
PublisherAssertion
,
PublisherAssertions
public void discardAuthToken()
public void discardAuthToken(String token)
token
- public void discardAuthToken(String token, String endpoint)
token
- endpoint
- public String getAuthToken() throws TransportException, DispositionReportFaultMessage, RemoteException
TransportException
DispositionReportFaultMessage
RemoteException
public String getAuthToken(String endpointURL) throws TransportException, DispositionReportFaultMessage, RemoteException
endpointURL
- TransportException
DispositionReportFaultMessage
RemoteException
public NodeDetail saveNode(Node node)
node
- public ClerkDetail saveClerk(UDDIClerk senderClerk)
senderClerk
- public Clerk getApiClerk()
public String getName()
public void setName(String name)
name
- public void setUDDINode(UDDINode uddiNode)
uddiNode
- public String getPublisher()
public void setPublisher(String publisher)
publisher
- public String getPassword()
public String getRawPassword()
public void setPassword(String password)
password
- public UDDIClerk.WSDL[] getWsdls()
WSDL2UDDI
public void setWsdls(UDDIClerk.WSDL[] wsdls)
wsdls
- WSDL2UDDI
public void setCryptoProvider(String clazz)
clazz
- public void setIsPasswordEncrypted(boolean option)
option
- public String getCryptoProvider()
public boolean getIsPasswordEncrypted()
public static TModel createKeyGenator(String partitionName, String DescriptiveName, String DescriptiveNameLanguage)
UDDIClerk clerk = ... TModel keygen = UDDIClerk.createKeyGenator("uddi:mydomain.com:keygenerator", "my domain", "en"); clerk.register(keygen);
partitionName
- think of this as the domain, i.e. juddi.apache.org, but it can really be anything you want. This will become part of the
key associated with the tModel generator (uddi:juddi.apache.org:keygenerator). The colon ":" is the delimitor, so avoid using them unless you want to
create nested key domains. If you're missing the "uddi:" prefix or the ":keygenerator" suffix, it will be added automatically.DescriptiveName
- required. max length is 255 charDescriptiveNameLanguage
- optional, max length is 26 charpublic static TModelInstanceInfo createServiceInterfaceVersion(String version, String lang) throws IllegalArgumentException
version
- From the article, no specificity is provided on what
to use as a value, but we recommend that you use the string
representation of major.minor[.build[.revision]].IllegalArgumentException
public static Set<BindingTemplate> getBindingByVersion(String version, List<BindingTemplate> bindingTemplate) throws IllegalArgumentException
createServiceInterfaceVersion
for more informationversion
- From the article, no specificity is provided on what
to use as a value, but we recommend that you use the string
representation of major.minor[.build[.revision]].bindingTemplate
- the input binding template, must not be nullIllegalArgumentException
- if the version or bindingTemplate is nullpublic List<String> getEndpoints(String serviceKey)
serviceKey
- public ServiceDetail getServiceDetail(GetServiceDetail getDetail) throws RemoteException, org.apache.commons.configuration.ConfigurationException, TransportException
getDetail
- RemoteException
org.apache.commons.configuration.ConfigurationException
TransportException
public ServiceDetail getServiceDetail(GetServiceDetail getDetail, Node node) throws RemoteException, TransportException, org.apache.commons.configuration.ConfigurationException
getDetail
- node
- RemoteException
TransportException
org.apache.commons.configuration.ConfigurationException
Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.