//DEFAULT CREDENTIALS
String server = "<a href="http://server.maplarge.com/";
String">http://server.maplarge.com/";
String</a> user = "<a href="mailto:user@ml.com">user@ml.com</a>";
String pass = "pw123456";
int token = 123456789;
Map<String, String> params = new HashMap<String, String>();
//CREATE MAPLARGE CONNECTION WITH USER / PASSWORD
MapLargeConnector mlconnPassword = new MapLargeConnector(server, user, pass);
//CREATE MAPLARGE CONNECTION WITH USER / AUTH TOKEN
MapLargeConnector mlconnToken = new MapLargeConnector(server, user, token);
//CREATE TABLE SYNCHRONOUS (NO WEB CALL)
params.put("account", "test");
params.put("tablename", "testJavaSdkTable");
params.put("fileurl", "<a href="http://localhost/testfile.csv"">http://localhost/testfile.csv"</a>);
MapLargeConnector.NO_WEB_CALLS = true;
String response = mlconnPassword.InvokeAPIRequest("CreateTableSynchronous", params);
System.out.println(response);
MapLargeConnector.NO_WEB_CALLS = false;
//RETRIEVE REMOTE USER AUTH TOKEN
response = mlconnPassword.GetRemoteAuthToken(user, pass, "255.255.255.255");
System.out.println(response);
//LIST GROUPS
params.clear();
params.put("account", "test");
response = mlconnToken.InvokeAPIRequestPost("ListGroups", params);
System.out.println(response);
//CREATE TABLE WITH FILES SYNCHRONOUS
params.clear();
params.put("account", "test");
params.put("tablename", "PostedTableImport");
response = mlconnToken.InvokeAPIRequestPost("CreateTableWithFilesSynchronous", params, new String[] { "C:\\temp\\usa.csv" });
System.out.println(response);