public static void main(String[] args) throws Exception {
// create a manager and read the config in the archive;
// you can use your config file name
UDDIClient clerkManager = new UDDIClient("META-INF/simple-publish-uddi.xml");
UDDIClerk clerk = clerkManager.getClerk("default");
// a ClerkManager can be a client to multiple UDDI nodes, so
// supply the nodeName (defined in your uddi.xml.
// The transport can be WS, inVM, RMI etc which is defined in the uddi.xml
Transport transport = clerkManager.getTransport();
// Now you create a reference to the UDDI API
security = transport.getUDDISecurityService();
publish = transport.getUDDIPublishService();
inquiry = transport.getUDDIInquiryService();
//step one, get a token
GetAuthToken getAuthTokenRoot = new GetAuthToken();
getAuthTokenRoot.setUserID("uddi");
getAuthTokenRoot.setCred("uddi");
// Making API call that retrieves the authentication token for the 'root' user.
String rootAuthToken = clerk.getAuthToken(clerk.getUDDINode().getSecurityUrl());
String uddi = security.getAuthToken(getAuthTokenRoot).getAuthInfo();
System.out.println("killing mary's business if it exists");
//first check is Mary's business exists and delete
DeleteIfExists("uddi:uddi.marypublisher.com:marybusinessone", uddi);