Examples of ListOfBooks


Examples of org.talend.types.demos.library.common._1.ListOfBooks

                Utils.showSeekBookError(e);

                throw e;
            }
        }
        ListOfBooks result = new ListOfBooks();
        BookType book = new BookType();
        result.getBook().add(book);
        PersonType author = new PersonType();
        book.getAuthor().add(author);
        author.setFirstName("Jack");
        author.setLastName("Icebear");
        Calendar dateOfBirth = new GregorianCalendar(101, Calendar.JANUARY, 2);
View Full Code Here

Examples of org.talend.types.demos.library.common._1.ListOfBooks

                }
                return;
            }
        }

        ListOfBooks result = new ListOfBooks();
        BookType book = new BookType();
        result.getBook().add(book);
        PersonType author = new PersonType();
        book.getAuthor().add(author);
        author.setFirstName("John");
        author.setLastName("Stripycat");
        Calendar dateOfBirth = new GregorianCalendar(202, Calendar.MAY, 17);
View Full Code Here

Examples of org.talend.types.demos.library.common._1.ListOfBooks

        System.out.println("*** Request-Response operation ********************************");
        System.out.println("***************************************************************");
        System.out.println("\nSending request for authors named Icebear");
        SearchFor request = new SearchFor();
        request.getAuthorLastName().add("Icebear");
        ListOfBooks response = libraryHttp.seekBook(request);
        System.out.println("\nResponse received:");
        Utils.showBooks(response);


        if (response.getBook().size() != 1) {
            System.out.println("An error occured: number of books found is not equal to 1");
        }

        if (!"Icebear".equals(response.getBook().get(0).getAuthor().get(0).getLastName())) {
            System.out.println("An error occured: the author of the found book is not Icebear");
        }
    }
View Full Code Here

Examples of org.talend.types.demos.library.common._1.ListOfBooks

        System.out.println("***************************************************************");
        try {
            SearchFor request = new SearchFor();
            System.out.println("\nSending request for authors named Grizzlybear");
            request.getAuthorLastName().add("Grizzlybear");
            ListOfBooks response = libraryHttp.seekBook(request);

            System.out.println("FAIL: We should get a SeekBookError here");

        } catch (SeekBookError e) {
            if (e.getFaultInfo() == null) {
View Full Code Here

Examples of org.talend.types.demos.library.common._1.ListOfBooks

    showNewBooks(listDate, book);
  }

  private void showNewBooks(final Date listDate, final List<BookType> response ){
      System.out.println("New books from " + DateFormat.getDateInstance().format(listDate));
      final ListOfBooks books = new ListOfBooks();
      books.getBook().addAll(response);
      Utils.showBooks(books);
    }   
View Full Code Here

Examples of org.talend.types.test.library.common._1.ListOfBooks

        serviceContext = startProvider(dir);

        Library client = (Library)serviceContext.getBean("libraryHttp");

        ListOfBooks response = null;

        try {
            response = searchFor(searchFor, client);
        } catch (SeekBookError e) {
            fail("Exception during service call");
View Full Code Here

Examples of org.talend.types.test.library.common._1.ListOfBooks

        System.out.println("*** Request-Response operation ********************************");
        System.out.println("***************************************************************");
        System.out.println("\nSending request for authors named Icebear");
        SearchFor request = new SearchFor();
        request.getAuthorLastName().add("Icebear");
        ListOfBooks response = libraryHttp.seekBook(request);
        System.out.println("\nResponse received:");


        if (response.getBook().size() != 1) {
            System.out.println("An error occured: number of books found is not equal to 1");
        }

        if (!"Icebear".equals(response.getBook().get(0).getAuthor().get(0).getLastName())) {
            System.out.println("An error occured: the author of the found book is not Icebear");
        }
    }
View Full Code Here

Examples of org.talend.types.test.library.common._1.ListOfBooks

        System.out.println("***************************************************************");
        try {
            SearchFor request = new SearchFor();
            System.out.println("\nSending request for authors named Grizzlybear");
            request.getAuthorLastName().add("Grizzlybear");
            ListOfBooks response = libraryHttp.seekBook(request);

            System.out.println("FAIL: We should get a SeekBookError here");

        } catch (SeekBookError e) {
            if (e.getFaultInfo() == null) {
View Full Code Here

Examples of org.talend.types.test.library.common._1.ListOfBooks

        serviceContext = startParticipants(dir);

        Library client = (Library)serviceContext.getBean("libraryHttp");

        ListOfBooks response = null;

        try {
            response = searchFor(searchFor, client);
        } catch (SeekBookError e) {
            fail("Exception during service call");
View Full Code Here

Examples of org.talend.types.test.library.common._1.ListOfBooks

                System.out.println("\nSending business fault (SeekBook error) with parameters:");

                throw e;
            }
        }
        ListOfBooks result = new ListOfBooks();
        BookType book = new BookType();
        result.getBook().add(book);
        PersonType author = new PersonType();
        book.getAuthor().add(author);
        author.setFirstName("Jack");
        author.setLastName("Icebear");
        Calendar dateOfBirth = new GregorianCalendar(101, Calendar.JANUARY, 2);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.