Package org.apache.axis2.engine

Examples of org.apache.axis2.engine.DefaultObjectSupplier


        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 =
                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"));
                }

            }
        }
        if (fileFound) {
View Full Code Here


                .doPrivileged(new PrivilegedAction() {
                    public Object run() {
                        return Thread.currentThread().getContextClassLoader();
                    }
                });
        objectSupplier = new DefaultObjectSupplier();
        dataLocators = new HashMap();
        dataLocatorClassNames = new HashMap();

    }
View Full Code Here

        return objs.toArray();
    }

    public MyBean beanOM(OMElement element, int val) throws AxisFault {
        MyBean bean = (MyBean)BeanUtil
                .deserialize(MyBean.class, element, new DefaultObjectSupplier(), null);
        bean.setAge(val);
        return bean;
    }
View Full Code Here

        return bean;
    }

    public boolean omrefs(OMElement element, OMElement element2) throws AxisFault {
        MyBean bean = (MyBean)BeanUtil
                .deserialize(MyBean.class, element, new DefaultObjectSupplier(), null);
        MyBean bean2 = (MyBean)BeanUtil
                .deserialize(MyBean.class, element2, new DefaultObjectSupplier(), null);
        return bean2 != null && bean != null;
    }
View Full Code Here

        ArrayList pss = com.getPersons();
        ArrayList tems = new ArrayList();
        for (int i = 0; i < pss.size(); i++) {
            OMElement omElement = (OMElement)pss.get(i);
            Person p = (Person)BeanUtil
                    .deserialize(Person.class, omElement, new DefaultObjectSupplier(), null);
            tems.add(p);
        }
        com.setPersons(tems);
        return com;
    }
View Full Code Here

        SOAPEnvelope env = responseMessageContx.getEnvelope();

        OMElement response = env.getBody().getFirstElement();
        MyBean resBean = (MyBean)BeanUtil.deserialize(MyBean.class, response.getFirstElement(),
                                                      new DefaultObjectSupplier(), null);
        assertNotNull(resBean);
        assertEquals(resBean.getAge(), 159);
    }
View Full Code Here

        SOAPEnvelope env = responseMessageContx.getEnvelope();

        OMElement response = env.getBody().getFirstElement();
        MyBean resBean = (MyBean)BeanUtil.deserialize(MyBean.class, response.getFirstElement(),
                                                      new DefaultObjectSupplier(), null);
        assertNotNull(resBean);
        assertEquals(resBean.getAge(), 159);
    }
View Full Code Here

        ArrayList args = new ArrayList();
        args.add(boolean.class);

        Object [] resBean =
                BeanUtil.deserialize(response, args.toArray(), new DefaultObjectSupplier());
        assertNotNull(resBean);
        assertEquals(((Boolean)resBean[0]).booleanValue(), true);
    }
View Full Code Here

                opClinet.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);

        SOAPEnvelope env = responseMessageContx.getEnvelope();

        Employee emp = (Employee)BeanUtil.deserialize(Employee.class, env.getBody()
                .getFirstElement().getFirstElement(), new DefaultObjectSupplier(), null);
        assertNotNull(emp);
    }
View Full Code Here

            response = super.sendReceive(opName, omElement);
        } else {
            response = super.sendReceive(omElement);
        }
        return BeanUtil.deserialize(response, returnTypes,
                                    new DefaultObjectSupplier());
    }
View Full Code Here

TOP

Related Classes of org.apache.axis2.engine.DefaultObjectSupplier

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.