Package org.jibx.runtime

Examples of org.jibx.runtime.JiBXException


                case IXMLReader.START_TAG:
                    return m_reader.getName();

                case IXMLReader.END_TAG:
                    throw new JiBXException("Expected start tag, found end tag " + currentNameString() + " "
                        + buildPositionString());

                case IXMLReader.END_DOCUMENT:
                    throw new JiBXException("Expected start tag, found end of document " + buildPositionString());

            }
        }
    }
View Full Code Here


        }
        while (true) {
            switch (m_reader.next()) {

                case IXMLReader.START_TAG:
                    throw new JiBXException("Expected end tag, found start tag " + currentNameString() + " "
                        + buildPositionString());

                case IXMLReader.END_TAG:
                    return m_reader.getName();

                case IXMLReader.END_DOCUMENT:
                    throw new JiBXException("Expected end tag, found end of document " + buildPositionString());

            }
        }
    }
View Full Code Here

     */
    public int toTag() throws JiBXException {
        int type = m_reader.getEventType();
        while (type != IXMLReader.START_TAG && type != IXMLReader.END_TAG) {
            if (type == IXMLReader.END_DOCUMENT) {
                throw new JiBXException("Expected tag, found end of document " + buildPositionString());
            } else {
                type = m_reader.next();
            }
        }
        return type;
View Full Code Here

     * @throws JiBXException on any error (possibly wrapping other exception)
     */
    public void parseToStartTag(String ns, String name) throws JiBXException {
        if (toTag() == IXMLReader.START_TAG) {
            if (!m_reader.getName().equals(name) || !verifyNamespace(ns)) {
                throw new JiBXException("Expected " + buildNameString(ns, name) + " start tag, found "
                    + currentNameString() + " start tag " + buildPositionString());
            }
        } else {
            throw new JiBXException("Expected " + buildNameString(ns, name) + " start tag, found "
                + currentNameString() + " end tag " + buildPositionString());
        }
    }
View Full Code Here

        // check for match on expected end tag
        if (toTag() == IXMLReader.END_TAG) {
            if (m_reader.getName().equals(name) && verifyNamespace(ns)) {
                m_reader.nextToken();
            } else {
                throw new JiBXException("Expected " + buildNameString(ns, name) + " end tag, found "
                    + currentNameString() + " end tag " + buildPositionString());
            }
        } else {
            throw new JiBXException("Expected " + buildNameString(ns, name) + " end tag, found "
                + currentNameString() + " start tag " + buildPositionString());
        }
    }
View Full Code Here

        loop: while (true) {
            switch (m_reader.getEventType()) {

                case IXMLReader.ENTITY_REF:
                    if (m_reader.getText() == null) {
                        throw new JiBXException("Unexpanded entity reference in text at " + buildPositionString());
                    }
                    // fall through into text accumulation

                case IXMLReader.CDSECT:
                case IXMLReader.TEXT:
View Full Code Here

     * @param name local name part of name
     * @exception JiBXException always thrown
     */
    public void throwEndTagNameError(String ns, String name)
        throws JiBXException {
        throw new JiBXException("Expected " + buildNameString(ns, name)
            + " end tag, found " + currentNameString() + " end tag "
            + buildPositionString());
    }
View Full Code Here

                } else {
                    throwEndTagNameError(ns, tag);
                }

            case IXMLReader.START_TAG:
                throw new JiBXException("Expected "
                    + buildNameString(ns, tag) + " end tag, "
                    + "found " + currentNameString() + " start tag "
                    + buildPositionString());

            case IXMLReader.END_DOCUMENT:
                throw new JiBXException("Expected "
                    + buildNameString(ns, tag) + " end tag, "
                    + "found end of document " + buildPositionString());

        }
        return null;
View Full Code Here

     */
    protected void postset(IUnmarshallingContext ctx) throws JiBXException {
        try {
            init();
        } catch (WsConfigurationException e) {
            throw new JiBXException("Error initializing ServiceDefinition", e);
        }
    }
View Full Code Here

            XMLOutputFactory ofact = XMLOutputFactory.newInstance();
            XMLStreamWriter wrtr = ofact.createXMLStreamWriter(bos, enc);
            mctx.setXmlWriter(new StAXWriter(bfact.getNamespaces(), wrtr));
            mctx.marshalDocument(obj);
        } catch (XMLStreamException e) {
            throw new JiBXException("Error creating writer", e);
        }
       
        // compare with original input document
        InputStreamReader brdr = new InputStreamReader
            (new ByteArrayInputStream(bos.toByteArray()), enc);
View Full Code Here

TOP

Related Classes of org.jibx.runtime.JiBXException

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.