Package sample.servicelifecycle.bean

Examples of sample.servicelifecycle.bean.UserList


                         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));

            String tempDir = System.getProperty("java.io.tmpdir");
            File tempFile = new File(tempDir);
            File libFile = new File(tempFile, "library.xml");
            OutputStream out = new FileOutputStream(libFile);
View Full Code Here


                    OMElement omElement = (OMElement) obj;
                    lendBookList.addBook((Book) BeanUtil.deserialize(Book.class, omElement, new DefaultObjectSupplier(), "book"));
                }
            }
        }
        UserList users = new UserList();
        OMElement usersEle =
                element.getFirstChildWithName(new QName(LibraryConstants.USER_LIST));
        if (usersEle != null) {
            Iterator usre_itr = usersEle.getChildren();
            while (usre_itr.hasNext()) {
                Object obj = usre_itr.next();
                if (obj instanceof OMElement) {
                    OMElement omElement = (OMElement) obj;
                    users.addUser((User) BeanUtil.deserialize(User.class, omElement,
                            new DefaultObjectSupplier(), "user"));
                }

            }
        }
View Full Code Here

                         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));

            String tempDir = System.getProperty("java.io.tmpdir");
            File tempFile = new File(tempDir);
            File libFile = new File(tempFile, "library.xml");
            OutputStream out = new FileOutputStream(libFile);
View Full Code Here

                    OMElement omElement = (OMElement) obj;
                    lendBookList.addBook((Book) BeanUtil.deserialize(Book.class, omElement, new DefaultObjectSupplier(), "book"));
                }
            }
        }
        UserList users = new UserList();
        OMElement usersEle =
                element.getFirstChildWithName(new QName(LibraryConstants.USER_LIST));
        if (usersEle != null) {
            Iterator usre_itr = usersEle.getChildren();
            while (usre_itr.hasNext()) {
                Object obj = usre_itr.next();
                if (obj instanceof OMElement) {
                    OMElement omElement = (OMElement) obj;
                    users.addUser((User) BeanUtil.deserialize(User.class, omElement,
                            new DefaultObjectSupplier(), "user"));
                }

            }
        }
View Full Code Here

TOP

Related Classes of sample.servicelifecycle.bean.UserList

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.