Package org.apache.axis2.engine

Examples of org.apache.axis2.engine.DefaultObjectSupplier


                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


    private OMElement omElement;
    private OMNamespace xsiNamespace;
   
    @Override
    protected void setUp() throws Exception {
        objectSupplier = new DefaultObjectSupplier();
       
        omFactory = OMAbstractFactory.getSOAP12Factory();
        xsiNamespace = omFactory.createOMNamespace(Constants.XSI_NAMESPACE, "xsi");
        omElement = omFactory.createOMElement(new QName("hello"));
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

        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

    private void printBookData(OMElement element) throws Exception {
        if (element != null) {
            Iterator values = element.getChildrenWithName(new QName("http://servicelifecycle.sample/xsd", "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

            response = super.sendReceive(opName, omElement);
        } else {
            response = super.sendReceive(omElement);
        }
        return BeanUtil.deserialize(response, returnTypes,
                new DefaultObjectSupplier());
    }
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

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

            throw new AxisFault("method : " + methodName +
                    " : does not find in the service implementation class : " +
                    serviceImpleClass);
        }
        //gets the object array from the request OMElement
        ObjectSupplier obj1 = new DefaultObjectSupplier();
        Object[] objectArray = RPCUtil.processRequest(methodElement, method, obj1);
        //reflective invocation
        Object resObject ;
        try {
            resObject = method.invoke(obj, objectArray);
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

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.