Transport transport = clerkManager.getTransport();
security = transport.getUDDISecurityService();
System.out.print("username: ");
String uname = System.console().readLine();
char passwordArray[] = System.console().readPassword("password: ");
GetAuthToken getAuthTokenRoot = new GetAuthToken();
getAuthTokenRoot.setUserID(uname);
getAuthTokenRoot.setCred(new String(passwordArray));
authtoken = security.getAuthToken(getAuthTokenRoot).getAuthInfo();
System.out.println("Success!");
}
if (input.equals("2")) {
CompareByTModelInstanceInfoQOS.main(null);
}
if (input.equals("3")) {
new JuddiAdminService().go(authtoken);
}
if (input.equals("4")) {
SearchByQos.doFindBinding(authtoken);
}
if (input.equals("5")) {
SearchByQos.doFindService(authtoken);
}
if (input.equals("6")) {
System.out.print("businesses: ");
int biz = Integer.parseInt(System.console().readLine());
System.out.print("servicesPerBusiness: ");
int svc = Integer.parseInt(System.console().readLine());
new UddiCreatebulk().publishBusiness(authtoken, biz, svc);
}
if (input.equals("7")) {
UDDISecurityPortType security = null;
UDDIClient clerkManager = new UDDIClient("META-INF/simple-publish-uddi.xml");
Transport transport = clerkManager.getTransport();
security = transport.getUDDISecurityService();
System.out.print("Transfer from username: ");
String uname = (System.console().readLine());
char passwordArray[] = System.console().readPassword("password: ");
GetAuthToken getAuthTokenRoot = new GetAuthToken();
getAuthTokenRoot.setUserID(uname);
getAuthTokenRoot.setCred(new String(passwordArray));
String authtokenFrom = security.getAuthToken(getAuthTokenRoot).getAuthInfo();
System.out.println("Success!");
System.out.print("Transfer to username: ");
String uname2 = (System.console().readLine());
char passwordArray2[] = System.console().readPassword("password: ");
getAuthTokenRoot = new GetAuthToken();
getAuthTokenRoot.setUserID(uname2);
getAuthTokenRoot.setCred(new String(passwordArray2));
String authtokenFrom2 = security.getAuthToken(getAuthTokenRoot).getAuthInfo();
System.out.println("Success!");
System.out.print("business/tModel key to transfer: ");
String key = (System.console().readLine());
new UddiCustodyTransfer().TransferBusiness(uname, authtokenFrom, uname2, authtokenFrom2, key);
}
if (input.equals("8")) {
System.out.print("Business key to sign: ");
String key = (System.console().readLine());
new UddiDigitalSignatureBusiness().Fire(authtoken, key);
}
if (input.equals("9")) {
System.out.print("Service key to sign: ");
String key = (System.console().readLine());
new UddiDigitalSignatureService().Fire(authtoken, key);
}
if (input.equals("10")) {
System.out.print("tModel key to sign: ");
String key = (System.console().readLine());
new UddiDigitalSignatureTmodel().Fire(authtoken, key);
}
if (input.equals("11")) {
new UddiDigitalSignatureSearch().Fire(authtoken);
}
if (input.equals("12")) {
new UddiFindBinding().Fire(authtoken);
}
if (input.equals("13")) {
System.out.print("Service key to parse the endpoints: ");
String key = (System.console().readLine());
new UddiFindEndpoints().Fire(authtoken, key);
}
if (input.equals("14")) {
System.out.print("Service key: ");
String key = (System.console().readLine());
new UddiGetServiceDetails().Fire(authtoken, key);
}
if (input.equals("15")) {
System.out.print("Get FQDN: ");
String key = (System.console().readLine());
new UddiKeyGenerator().Fire(authtoken, key);
}
if (input.equals("16")) {
UDDISecurityPortType security = null;
UDDIClient clerkManager = new UDDIClient("META-INF/simple-publish-uddi.xml");
Transport transport = clerkManager.getTransport();
security = transport.getUDDISecurityService();
System.out.print("1st Business username: ");
String uname = (System.console().readLine());
char passwordArray[] = System.console().readPassword("password: ");
GetAuthToken getAuthTokenRoot = new GetAuthToken();
getAuthTokenRoot.setUserID(uname);
getAuthTokenRoot.setCred(new String(passwordArray));
String authtokenFrom = security.getAuthToken(getAuthTokenRoot).getAuthInfo();
System.out.println("Success!");
System.out.print(uname + "'s business : ");
String key = (System.console().readLine());
System.out.print("2st Business username: ");
String uname2 = (System.console().readLine());
char passwordArray2[] = System.console().readPassword("password: ");
getAuthTokenRoot = new GetAuthToken();
getAuthTokenRoot.setUserID(uname2);
getAuthTokenRoot.setCred(new String(passwordArray2));
String authtokenFrom2 = security.getAuthToken(getAuthTokenRoot).getAuthInfo();
System.out.println("Success!");
System.out.print(uname2 + "'s business : ");
String key2 = (System.console().readLine());
System.out.print("relationship (parent-child, peer-peer,or identity) : ");
String relationship = (System.console().readLine());
new UddiRelatedBusinesses().Fire(key, authtokenFrom, key2, authtokenFrom2, relationship);
}
if (input.equals("17")) {
new UddiSubscribe().Fire();
}
if (input.equals("18")) {
System.out.print("Subscription key: ");
String key = (System.console().readLine());
System.out.println("Fetching results for the past 30 days...");
new UddiSubscribeValidate().go(authtoken, input);
}
if (input.equals("19")) {
System.out.print("Path or URL to WSDL file: ");
String url = (System.console().readLine());
System.out.print("Business key to attach to: ");
String key = (System.console().readLine());
new WsdlImport().Fire(url, key, authtoken);
}
if (input.equals("20")) {
System.out.print("Path or URL to WADL file: ");
String url = (System.console().readLine());
System.out.print("Business key to attach to: ");
String key = (System.console().readLine());
new WadlImport().Fire(url, key, authtoken);
}
if (input.equals("21")) {
UDDISecurityPortType security = null;
UDDIClient clerkManager = new UDDIClient("META-INF/simple-publish-uddi.xml");
Transport transport = clerkManager.getTransport();
security = transport.getUDDISecurityService();
DiscardAuthToken getAuthTokenRoot = new DiscardAuthToken();
getAuthTokenRoot.setAuthInfo(authtoken);
security.discardAuthToken(getAuthTokenRoot);
System.out.println("Success!");
}
if (input.equals("22")) {