try {
// Get a reference to the stub.
HandlerBookService_Impl service = new HandlerBookService_Impl();
HandlerBookQuery bookQuery = (HandlerBookQuery)service.getHandlerBookQueryPort();
// Get info for each book.
StringHolder stringHolder = new StringHolder();
int count = bookQuery.getBookCount();
System.out.println("Book count = " + count);
for (int i = 0; i < count; i++) {
String title = bookQuery.getBookTitle(i);
bookQuery.getBookAuthor(title, stringHolder);
System.out.println("Title: " + title + ", author: " + stringHolder.value);
}
// Log success
bookQuery.log("HandlerBookServiceClient: success");
System.exit(0);
} catch (Throwable t) {
System.out.println("CLASS: " + t.getClass().getName() + "\n\n");
System.out.println(t.getMessage());
t.printStackTrace(System.out);
}