RMDemoService service = new RMDemoService();
RMDemo port = service.getRMDemoPort();
BufferedReader reader = new BufferedReader(
new InputStreamReader(
System.in));
System.out.println("Running the RMDemo....\n"+
"Enter as many strings as you like... \n" +
"then press <Enter> to see the result and terminate this client\n");
while (true) {
String str = reader.readLine();
if (!str.equals("")) {
port.addString(str);
} else {
System.out.println(port.getResult());
((Closeable)port).close();
System.exit(0);
}
}