// dispelFile, clientCerts, eprFile
SSLClientSettings.setKeystores(args[1]);
SSLClientSettings.disableHostnameVerification();
Gateway mGateway;
if (args.length >= 3)
{
// mGateway = GatewayFactory.get(Patcher.patchEPR(Util.getFileContentAsEPR(args[2]), new QName("http://www.admire-project.eu/gateway", "GatewayService")));
mGateway = GatewayFactory.get(Patcher.patchEPR(Util.getFileContentAsEPR(args[2]), new QName("http://www.admire-project.eu/gateway", "GatewayService")));
}
else
{
try
{
mGateway = GatewayFactory.getDiscovered();
}
catch (InterruptedException e)
{
Thread.currentThread().interrupt();
return null;
}
}
System.out.println("gtw = " + mGateway.toString());
String dispelFile = args[0]; //Util.getFileContentAsString(args[0]);
System.out.println(dispelFile);
GatewayProcess mGatewayProcess = mGateway.submit(dispelFile);
// now can either wait for results (blocking) or sign up for
// notifications (non-blocking)
// 0 - blocking wait; 1 - wait with timeout; 2 - non-blocking