Package sample.servicelifecycle.bean

Examples of sample.servicelifecycle.bean.Book


        ArrayList args = new ArrayList();
        args.add(isbn);
        args.add(userName);
        Object obj [] = rpcClient.invokeBlocking(new QName("http://servicelifecycle.sample",
                "lendBook"), args.toArray(), new Class[]{Book.class});
        Book book = (Book) obj[0];
        System.out.println("Title : " + book.getTitle());
        System.out.println("Isbn : " + book.getIsbn());
        System.out.println("Author : " + book.getAuthor());

    }
View Full Code Here


    private void printBookData(OMElement element) throws Exception {
        if (element != null) {
            Iterator values = element.getChildrenWithName(new QName("http://servicelifecycle.sample", "return"));
            while (values.hasNext()) {
                OMElement omElement = (OMElement) values.next();
                Book book = (Book) BeanUtil.deserialize(Book.class, omElement, new DefaultObjectSupplier(), "book");
                System.out.println("Isbn : " + book.getIsbn());
                System.out.println("Author : " + book.getAuthor());
                System.out.println("Title : " + book.getTitle());
                System.out.println("");
            }

        }
    }
View Full Code Here

        return lendBookList.getBookList();
    }

    public Book lendBook(String isbn, String userName) throws AxisFault {
        if (isLooged(userName)) {
            Book book = availableBookList.getBook(isbn);
            if (book == null) {
                book = lendBookList.getBook(isbn);
                if (book != null) {
                    throw new AxisFault("Someone has borrowed the book");
                }
View Full Code Here

            throw new AxisFault("First log into system");
        }
    }

    public void returnBook(String isbn) {
        Book tempBook = allBookList.getBook(isbn);
        availableBookList.addBook(tempBook);
        lendBookList.removeBook(tempBook);
    }
View Full Code Here

        return lendBookList.getBookList();
    }

    public Book lendBook(String isbn, String userName) throws AxisFault {
        if (isLogged(userName)) {
            Book book = availableBookList.getBook(isbn);
            if (book == null) {
                book = lendBookList.getBook(isbn);
                if (book != null) {
                    throw new AxisFault("Someone has borrowed the book");
                }
View Full Code Here

            throw new AxisFault("First log into system");
        }
    }

    public void returnBook(String isbn) {
        Book tempBook = allBookList.getBook(isbn);
        availableBookList.addBook(tempBook);
        lendBookList.removeBook(tempBook);
    }
View Full Code Here

        ArrayList args = new ArrayList();
        args.add(isbn);
        args.add(userName);
        Object obj [] = rpcClient.invokeBlocking(new QName("http://servicelifecycle.sample",
                "lendBook"), args.toArray(), new Class[]{Book.class});
        Book book = (Book) obj[0];
        System.out.println("Title : " + book.getTitle());
        System.out.println("Isbn : " + book.getIsbn());
        System.out.println("Author : " + book.getAuthor());

    }
View Full Code Here

    private void printBookData(OMElement element) throws Exception {
        if (element != null) {
            Iterator values = element.getChildrenWithName(new QName("http://servicelifecycle.sample", "return"));
            while (values.hasNext()) {
                OMElement omElement = (OMElement) values.next();
                Book book = (Book) BeanUtil.deserialize(Book.class, omElement, new DefaultObjectSupplier(), "book");
                System.out.println("Isbn : " + book.getIsbn());
                System.out.println("Author : " + book.getAuthor());
                System.out.println("Title : " + book.getTitle());
                System.out.println("");
            }

        }
    }
View Full Code Here

        return lendBookList.getBookList();
    }

    public Book lendBook(String isbn, String userName) throws AxisFault {
        if (isLooged(userName)) {
            Book book = availableBookList.getBook(isbn);
            if (book == null) {
                book = lendBookList.getBook(isbn);
                if (book != null) {
                    throw new AxisFault("Someone has borrowed the book");
                }
View Full Code Here

            throw new AxisFault("First log into system");
        }
    }

    public void returnBook(String isbn) {
        Book tempBook = allBookList.getBook(isbn);
        availableBookList.addBook(tempBook);
        lendBookList.removeBook(tempBook);
    }
View Full Code Here

TOP

Related Classes of sample.servicelifecycle.bean.Book

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.