Package org.apache.camel.example.cxf.jaxrs.resources

Examples of org.apache.camel.example.cxf.jaxrs.resources.BookStore


        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());
        }
       
View Full Code Here


public class JAXRSClientServerTest extends CamelSpringTestSupport {
   
    @Test
    public void testJAXWSClient() throws BookNotFoundFault {
        JAXWSClient jaxwsClient = new JAXWSClient();
        BookStore bookStore = jaxwsClient.getBookStore();
       
        bookStore.addBook(new Book("Camel User Guide", 234L));
        Book book = bookStore.getBook(123L);
        assertNotNull("We should find the book here", book);      
     
        try {
            book = bookStore.getBook(124L);
            fail("We should not have this book");
        } catch (Exception exception) {
            assertTrue("The exception should be BookNotFoundFault", exception instanceof BookNotFoundFault);
        }
    }
View Full Code Here

   
    @Test
    public void testJAXRSClient() throws BookNotFoundFault {
        // JAXRSClient invocation
        JAXRSClient jaxrsClient = new JAXRSClient();
        BookStore bookStore =  jaxrsClient.getBookStore();
       
        bookStore.addBook(new Book("Camel User Guide", 124L));
        Book book = bookStore.getBook(124L);
        assertNotNull("We should find the book here", book);  
       
        try {
            book = bookStore.getBook(126L);
            fail("We should not have this book");
        } catch (Exception exception) {
            assertTrue("The exception should be BookNotFoundFault", exception instanceof BookNotFoundFault);
        }
    }
View Full Code Here

        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);
        }
       
View Full Code Here

public class Client {
   
    void invoke() throws BookNotFoundFault {
        // 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);
        }
    }
View Full Code Here

        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());
        }
       
View Full Code Here

public class JAXRSClientServerTest extends CamelSpringTestSupport {
   
    @Test
    public void testJAXWSClient() throws BookNotFoundFault {
        JAXWSClient jaxwsClient = new JAXWSClient();
        BookStore bookStore = jaxwsClient.getBookStore();
       
        bookStore.addBook(new Book("Camel User Guide", 234L));
        Book book = bookStore.getBook(123L);
        assertNotNull("We should find the book here", book);      
     
        try {
            book = bookStore.getBook(124L);
            fail("We should not have this book");
        } catch (Exception exception) {
            assertTrue("The exception should be BookNotFoundFault", exception instanceof BookNotFoundFault);
        }
    }
View Full Code Here

    @Test
    public void testJAXRSClient() throws BookNotFoundFault {

        // JAXRSClient invocation
        JAXRSClient jaxrsClient = new JAXRSClient();
        BookStore bookStore =  jaxrsClient.getBookStore();
       
        bookStore.addBook(new Book("Camel User Guide", 124L));
        Book book = bookStore.getBook(124L);
        assertNotNull("We should find the book here", book);  
       
        try {
            book = bookStore.getBook(126L);
            fail("We should not have this book");
        } catch (Exception exception) {
            assertTrue("The exception should be BookNotFoundFault", exception instanceof BookNotFoundFault);
        }
    }
View Full Code Here

        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());
        }
       
View Full Code Here

    }
   
    @Test
    public void testJAXWSClient() throws BookNotFoundFault {
        JAXWSClient jaxwsClient = new JAXWSClient();
        BookStore bookStore = jaxwsClient.getBookStore();
       
        bookStore.addBook(new Book("Camel User Guide", 234L));
        Book book = bookStore.getBook(123L);
        assertNotNull("We should find the book here", book);      
     
        try {
            book = bookStore.getBook(124L);
            fail("We should not have this book");
        } catch (Exception exception) {
            assertTrue("The exception should be BookNotFoundFault", exception instanceof BookNotFoundFault);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.example.cxf.jaxrs.resources.BookStore

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.