// aquire a jUDDI datastore instance
DataStore dataStore = DataStoreFactory.getDataStore();
// aquire a jUDDI Authenticator instance
Authenticator authenticator = AuthenticatorFactory.getAuthenticator();
try
{
// begin this transaction
dataStore.beginTrans();
// authenticate the requestor's credentials
String publisherID = authenticator.authenticate(userID,cred);
if (publisherID == null)
throw new UnknownUserException("user ID: "+userID);
// ensure the user has the authority to publish
Publisher publisher = dataStore.getPublisher(publisherID);