use of org.talend.types.test.library.common._1.SearchFor in project tesb-rt-se by Talend.
the class LibraryServerImpl method seekBook.
@Override
public ListOfBooks seekBook(SearchFor body) throws SeekBookError {
System.out.println("***************************************************************");
System.out.println("*** seekBook request (Request-Response operation) is received *");
System.out.println("***************************************************************");
showSeekBookRequest(body);
List<String> authorsLastNames = body.getAuthorLastName();
if (authorsLastNames != null && authorsLastNames.size() > 0) {
String authorsLastName = authorsLastNames.get(0);
if (authorsLastName != null && authorsLastName.length() > 0 && !"Icebear".equalsIgnoreCase(authorsLastName)) {
SeekBookError e = prepareException("No book available from author " + authorsLastName);
System.out.println("No book available from author " + authorsLastName);
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);
author.setDateOfBirth(dateOfBirth.getTime());
book.getTitle().add("Survival in the Arctic");
book.getPublisher().add("Frosty Edition");
book.setYearPublished("2010");
System.out.println("Book(s) is found:");
showSeekBookResponse(result);
return result;
}
use of org.talend.types.test.library.common._1.SearchFor in project tesb-rt-se by Talend.
the class CompressionAssertionTest method searchFor.
private ListOfBooks searchFor(String authorLastName, String isbn, Library client) throws SeekBookError {
SearchFor request = new SearchFor();
request.getAuthorLastName().add(authorLastName);
request.setISBNNumber(isbn);
return client.seekBook(request);
}
use of org.talend.types.test.library.common._1.SearchFor in project tesb-rt-se by Talend.
the class CompressionFeatureTest method searchFor.
private ListOfBooks searchFor(String authorLastName, String isbn, Library client) throws SeekBookError {
SearchFor request = new SearchFor();
request.getAuthorLastName().add(authorLastName);
request.setISBNNumber(isbn);
return client.seekBook(request);
}
use of org.talend.types.test.library.common._1.SearchFor in project tesb-rt-se by Talend.
the class CorrelationFeatureTest method searchFor.
private ListOfBooks searchFor(String authorLastName, Library client) throws SeekBookError {
SearchFor request = new SearchFor();
request.getAuthorLastName().add(authorLastName);
request.setPublisher("Frosty Edition");
return client.seekBook(request);
}
use of org.talend.types.test.library.common._1.SearchFor in project tesb-rt-se by Talend.
the class CorrelationIdAssertionTest method searchFor.
private ListOfBooks searchFor(String authorLastName, Library client) throws SeekBookError {
SearchFor request = new SearchFor();
request.getAuthorLastName().add(authorLastName);
request.setPublisher("Frosty Edition");
return client.seekBook(request);
}
Aggregations