Package sample.servicelifecycle.bean

Examples of sample.servicelifecycle.bean.BookList


    }

    public void shutDown(ConfigurationContext configctx,
                         AxisService service) {
        try {
            BookList availableBookList = (BookList) service.getParameterValue(LibraryConstants.AVAILABLE_BOOK);
            BookList allBookList = (BookList) service.getParameterValue(LibraryConstants.ALL_BOOK);
            BookList lendBookList = (BookList) service.getParameterValue(LibraryConstants.LEND_BOOK);
            UserList userList = (UserList) service.getParameterValue(LibraryConstants.USER_LIST);
            OMFactory fac = OMAbstractFactory.getOMFactory();
            OMElement libElement = fac.createOMElement("library", null);
            Book[] bookList = allBookList.getBookList();
            libElement.addChild(BeanUtil.getOMElement(
                    new QName(LibraryConstants.ALL_BOOK),
                    bookList, new QName("book"), false, null));
            libElement.addChild(BeanUtil.getOMElement(
                    new QName(LibraryConstants.AVAILABLE_BOOK),
                    availableBookList.getBookList(), new QName("book"), false, null));
            libElement.addChild(BeanUtil.getOMElement(
                    new QName(LibraryConstants.LEND_BOOK),
                    lendBookList.getBookList(), new QName("book"), false, null));

            libElement.addChild(BeanUtil.getOMElement(
                    new QName(LibraryConstants.USER_LIST),
                    userList.getUsers(), new QName("user"), false, null));
View Full Code Here


            log.info(e);
        }
    }

    private void processOmelemnt(OMElement element, AxisService service, boolean fileFound) throws AxisFault {
        BookList allBookList = new BookList(LibraryConstants.ALL_BOOK);
        OMElement bookEle = element.getFirstChildWithName(new QName(LibraryConstants.ALL_BOOK));
        Iterator book_itr = bookEle.getChildren();
        while (book_itr.hasNext()) {
            Object obj = book_itr.next();
            if (obj instanceof OMElement) {
                OMElement omElement = (OMElement) obj;
                allBookList.addBook((Book) BeanUtil.deserialize(Book.class, omElement, new DefaultObjectSupplier(), "book"));
            }
        }

        BookList availableBookList = new BookList(LibraryConstants.AVAILABLE_BOOK);
        OMElement avaliableBooksEle =
                element.getFirstChildWithName(new QName(LibraryConstants.AVAILABLE_BOOK));
        if (avaliableBooksEle != null) {
            Iterator available_book_itr = avaliableBooksEle.getChildren();
            while (available_book_itr.hasNext()) {
                Object obj = available_book_itr.next();
                if (obj instanceof OMElement) {
                    OMElement omElement = (OMElement) obj;
                    availableBookList.addBook((Book) BeanUtil.deserialize(Book.class, omElement, new DefaultObjectSupplier(), "book"));
                }

            }
        }


        BookList lendBookList = new BookList(LibraryConstants.LEND_BOOK);
        OMElement lendBooksEle =
                element.getFirstChildWithName(new QName(LibraryConstants.LEND_BOOK));
        if (lendBooksEle != null) {
            Iterator lend_book_itr = lendBooksEle.getChildren();
            while (lend_book_itr.hasNext()) {
                Object obj = lend_book_itr.next();
                if (obj instanceof OMElement) {
                    OMElement omElement = (OMElement) obj;
                    lendBookList.addBook((Book) BeanUtil.deserialize(Book.class, omElement, new DefaultObjectSupplier(), "book"));
                }
            }
        }
        UserList users = new UserList();
        OMElement usersEle =
View Full Code Here

    }

    public void shutDown(ConfigurationContext configctx,
                         AxisService service) {
        try {
            BookList availableBookList = (BookList) service.getParameterValue(LibraryConstants.AVAILABLE_BOOK);
            BookList allBookList = (BookList) service.getParameterValue(LibraryConstants.ALL_BOOK);
            BookList lendBookList = (BookList) service.getParameterValue(LibraryConstants.LEND_BOOK);
            UserList userList = (UserList) service.getParameterValue(LibraryConstants.USER_LIST);
            OMFactory fac = OMAbstractFactory.getOMFactory();
            OMElement libElement = fac.createOMElement("library", null);
            Book[] bookList = allBookList.getBookList();
            libElement.addChild(BeanUtil.getOMElement(
                    new QName(LibraryConstants.ALL_BOOK),
                    bookList, new QName("book"), false, null));
            libElement.addChild(BeanUtil.getOMElement(
                    new QName(LibraryConstants.AVAILABLE_BOOK),
                    availableBookList.getBookList(), new QName("book"), false, null));
            libElement.addChild(BeanUtil.getOMElement(
                    new QName(LibraryConstants.LEND_BOOK),
                    lendBookList.getBookList(), new QName("book"), false, null));

            libElement.addChild(BeanUtil.getOMElement(
                    new QName(LibraryConstants.USER_LIST),
                    userList.getUsers(), new QName("user"), false, null));
View Full Code Here

            log.info(e);
        }
    }

    private void processOmelemnt(OMElement element, AxisService service, boolean fileFound) throws AxisFault {
        BookList allBookList = new BookList(LibraryConstants.ALL_BOOK);
        OMElement bookEle = element.getFirstChildWithName(new QName(LibraryConstants.ALL_BOOK));
        Iterator book_itr = bookEle.getChildren();
        while (book_itr.hasNext()) {
            Object obj = book_itr.next();
            if (obj instanceof OMElement) {
                OMElement omElement = (OMElement) obj;
                allBookList.addBook((Book) BeanUtil.deserialize(Book.class, omElement, new DefaultObjectSupplier(), "book"));
            }
        }

        BookList availableBookList = new BookList(LibraryConstants.AVAILABLE_BOOK);
        OMElement avaliableBooksEle =
                element.getFirstChildWithName(new QName(LibraryConstants.AVAILABLE_BOOK));
        if (avaliableBooksEle != null) {
            Iterator available_book_itr = avaliableBooksEle.getChildren();
            while (available_book_itr.hasNext()) {
                Object obj = available_book_itr.next();
                if (obj instanceof OMElement) {
                    OMElement omElement = (OMElement) obj;
                    availableBookList.addBook((Book) BeanUtil.deserialize(Book.class, omElement, new DefaultObjectSupplier(), "book"));
                }

            }
        }


        BookList lendBookList = new BookList(LibraryConstants.LEND_BOOK);
        OMElement lendBooksEle =
                element.getFirstChildWithName(new QName(LibraryConstants.LEND_BOOK));
        if (lendBooksEle != null) {
            Iterator lend_book_itr = lendBooksEle.getChildren();
            while (lend_book_itr.hasNext()) {
                Object obj = lend_book_itr.next();
                if (obj instanceof OMElement) {
                    OMElement omElement = (OMElement) obj;
                    lendBookList.addBook((Book) BeanUtil.deserialize(Book.class, omElement, new DefaultObjectSupplier(), "book"));
                }
            }
        }
        UserList users = new UserList();
        OMElement usersEle =
View Full Code Here

TOP

Related Classes of sample.servicelifecycle.bean.BookList

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.