Examples of IUnmarshaller


Examples of org.jibx.runtime.IUnmarshaller

        m_unmarshallCtx.reset();
        m_unmarshallCtx.setDocument(xmlReader);
        String name;
        try {
            name = m_unmarshallCtx.toStart();
            IUnmarshaller unmarshaller = m_unmarshallCtx.getUnmarshaller(xmlReader.getNamespace(), name);
            if (unmarshaller != null) {
                payload = unmarshaller.unmarshal(null, m_unmarshallCtx);
            }
        } catch (JiBXException e) {
            throw new WsException("Error in unmarshalling.", e);
        }
View Full Code Here

Examples of org.jibx.runtime.IUnmarshaller

                if (clas == null) {
                    throw new JiBXException("Unable to load unmarshaller class " + mname);
                }
               
                // create and cache an instance of the class
                IUnmarshaller m = (IUnmarshaller)clas.newInstance();
                m_unmarshallers[index] = m;
               
            } catch (JiBXException e) {
                throw e;
            } catch (Exception e) {
View Full Code Here

Examples of org.jibx.runtime.IUnmarshaller

     * @throws JiBXException on any error (possibly wrapping other exception)
     */
    public Object unmarshalOptionalElement() throws JiBXException {
        int type = toTag();
        if (type == IXMLReader.START_TAG) {
            IUnmarshaller unmarshal =
                getUnmarshaller(m_reader.getNamespace(), m_reader.getName());
            if (unmarshal != null) {
                return unmarshal.unmarshal(null, this);
            }
        }
        return null;
    }
View Full Code Here

Examples of org.jibx.runtime.IUnmarshaller

     * @return unmarshalled object from element
     * @throws JiBXException on any error (possibly wrapping other exception)
     */
    public Object unmarshalElement(Class clas) throws JiBXException {
        String name = toStart();
        IUnmarshaller unmarshal =
            getUnmarshaller(m_reader.getNamespace(), name);
        if (unmarshal == null) {
            throw new JiBXException("No unmarshaller for element " +
                currentNameString() + " " + buildPositionString());
        } else {
            Object obj = unmarshal.unmarshal(null, this);
            if (!clas.isInstance(obj)) {
                throw new JiBXException("Element " + name +
                    " not compatible with expected type " + clas.getName() +
                    " " + buildPositionString());
            }
View Full Code Here

Examples of org.jibx.runtime.IUnmarshaller

     * @return unmarshalled object from element
     * @throws JiBXException on any error (possibly wrapping other exception)
     */
    public Object unmarshalElement() throws JiBXException {
        String name = toStart();
        IUnmarshaller unmarshal =
            getUnmarshaller(m_reader.getNamespace(), name);
        if (unmarshal == null) {
            throw new JiBXException("No unmarshaller for element " +
                currentNameString() + " " + buildPositionString());
        } else {
            return unmarshal.unmarshal(null, this);
        }
    }
View Full Code Here

Examples of org.jibx.runtime.IUnmarshaller

        if (pos < 0) {
            throw new JiBXException(
                EXCEPTION_LOCALIZER.format("unmarshaller-not-found",
                    "{" + uri + "} " + JIBX_FACTORY_CLASS.getName()));
        }
        IUnmarshaller unmarshaller =  delegateContext.getUnmarshaller(pos);
        final Object value = unmarshaller.unmarshal(o, delegateContext);
        postprocessUnmarshallingContext(ctx);
        return value;
    }
View Full Code Here

Examples of org.jibx.runtime.IUnmarshaller

        if (pos < 0) {
            throw new JiBXException(
                EXCEPTION_LOCALIZER.format("unmarshaller-not-found",
                    "{" + uri + "} " + getTargetClass().getName()));
        }
        IUnmarshaller unmarshaller =  delegateContext.getUnmarshaller(pos);
        return unmarshaller.unmarshal(o, delegateContext);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.