context.start();
context.addRoutes(new CamelRouterBuilder());
Thread.sleep(1000);
// JAXWSClient invocation
JAXWSClient jaxwsClient = new JAXWSClient();
BookStore bookStore = jaxwsClient.getBookStore();
bookStore.addBook(new Book("Camel User Guide", 234L));
Book book = bookStore.getBook(123L);
System.out.println("Get the book with id 123. " + book);
try {
book = bookStore.getBook(124L);
System.out.println("Get the book with id 124. " + book);
} catch (Exception exception) {
System.out.println("Get the exception " + exception);
}
// JAXRSClient invocation
JAXRSClient jaxrsClient = new JAXRSClient();
bookStore = jaxrsClient.getBookStore();
bookStore.addBook(new Book("Camel User Guide", 124L));
book = bookStore.getBook(124L);
System.out.println("Get the book with id 124. " + book);
try {
book = bookStore.getBook(126L);
System.out.println("Get the book with id 126. " + book);
} catch (Exception exception) {
System.out.println("Get the exception " + exception.getCause());
}