private static HashMap<String, String> createConfig(URI registryUrl, String username, String password) throws RepositoryException, RegistryException {
HashMap<String, String> config = new HashMap<String,String>();
config.put(AiravataClient.JCR,registryUrl.toString());
config.put(AiravataClient.JCR_USERNAME,username);
config.put(AiravataClient.JCR_PASSWORD,password);
AiravataRegistry registryObject = getRegistryObject(registryUrl, username, password);
if (registryObject!=null){
List<URI> URLList = registryObject.getEventingServiceURLList();
config.put(AiravataClient.BROKER,URLList==null || URLList.size()==0? "http://localhost:8080/axis2/services/EventingService":URLList.get(0).toString());
URLList = registryObject.getMessageBoxServiceURLList();
config.put(AiravataClient.MSGBOX,URLList==null || URLList.size()==0? "http://localhost:8080/axis2/services/MsgBoxService":URLList.get(0).toString());
URLList = registryObject.getInterpreterServiceURLList();
config.put(AiravataClient.WORKFLOWSERVICEURL,URLList==null || URLList.size()==0? "http://localhost:8080/axis2/services/WorkflowInterpretor?wsdl":URLList.get(0).toString());
config.put(AiravataClient.WITHLISTENER,"true");
}
return config;
}