Examples of XmlSchemaException


Examples of mf.org.apache.xerces.impl.xs.XMLSchemaException

            for (int j = 0; j < fElemMapSize; j++) {
                if (conflictTable[i][j] == 1) {
                    //errors.newError("cos-nonambig", new Object[]{fElemMap[i].toString(),
                    //                                             fElemMap[j].toString()});
                    // REVISIT: do we want to report all errors? or just one?
                    throw new XMLSchemaException("cos-nonambig", new Object[]{fElemMap[i].toString(),
                                                                              fElemMap[j].toString()});
                }
            }
        }
View Full Code Here

Examples of mf.org.apache.xerces.impl.xs.XMLSchemaException

        // check whether there is conflict between any two leaves
        for (int i = 0; i < fNumElements; i++) {
            for (int j = i+1; j < fNumElements; j++) {
                if (XSConstraints.overlapUPA(fAllElements[i], fAllElements[j], subGroupHandler)) {
                    // REVISIT: do we want to report all errors? or just one?
                    throw new XMLSchemaException("cos-nonambig", new Object[]{fAllElements[i].toString(),
                                                                              fAllElements[j].toString()});
                }
            }
        }
View Full Code Here

Examples of mf.org.apache.xerces.impl.xs.XMLSchemaException

            fSchemaAttrs = attrChecker.checkAttributes(root, true, this);
            // schemaAttrs == null means it's not an <xsd:schema> element
            // throw an exception, but we don't know the document systemId,
            // so we leave that to the caller.
            if (fSchemaAttrs == null) {
                throw new XMLSchemaException(null, null);
            }
            fAreLocalAttributesQualified =
                ((XInt)fSchemaAttrs[XSAttributeChecker.ATTIDX_AFORMDEFAULT]).intValue() == SchemaSymbols.FORM_QUALIFIED;
            fAreLocalElementsQualified =
                ((XInt)fSchemaAttrs[XSAttributeChecker.ATTIDX_EFORMDEFAULT]).intValue() == SchemaSymbols.FORM_QUALIFIED;
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchemaException

        // XXX: If we return null, a NPE is raised in SchemaBuilder.
        // If we return new InputSource(), a XmlSchemaException is raised
        // but without any nice error message. So let's just throw a nice error here.
        if (in == null) {
            throw new XmlSchemaException("Unable to locate imported document "
                                         + "at '" + schemaLocation + "'"
                                         + (baseUri == null
                                            ? "."
                                            : ", relative to '" + baseUri + "'."));
        } else if (in.getByteStream() != null) {
            //workaround bug in XmlSchema - XmlSchema is not closing the InputStreams
            //that are returned for imports.  Thus, with a lot of services starting up
            //or a lot of schemas imported or similar, it's easy to run out of
            //file handles.  We'll just load the file into a byte[] and return that.
            try {
                InputStream ins = IOUtils.loadIntoBAIS(in.getByteStream());
                in.setByteStream(ins);
            } catch (IOException e) {
                throw new XmlSchemaException("Unable to load imported document "
                                             + "at '" + schemaLocation + "'"
                                             + (baseUri == null
                                                ? "."
                                                : ", relative to '" + baseUri + "'."),
                                                e);
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchemaException

        // XXX: If we return null, a NPE is raised in SchemaBuilder.
        // If we return new InputSource(), a XmlSchemaException is raised
        // but without any nice error message. So let's just throw a nice error here.
        if (in == null) {
            throw new XmlSchemaException("Unable to locate imported document "
                                         + "at '" + schemaLocation + "'"
                                         + (baseUri == null
                                            ? "."
                                            : ", relative to '" + baseUri + "'."));
        } else if (in.getByteStream() != null
            && !(in.getByteStream() instanceof ByteArrayInputStream)) {
            //workaround bug in XmlSchema - XmlSchema is not closing the InputStreams
            //that are returned for imports.  Thus, with a lot of services starting up
            //or a lot of schemas imported or similar, it's easy to run out of
            //file handles.  We'll just load the file into a byte[] and return that.
            try {
                InputStream ins = IOUtils.loadIntoBAIS(in.getByteStream());
                in.setByteStream(ins);
            } catch (IOException e) {
                throw new XmlSchemaException("Unable to load imported document "
                                             + "at '" + schemaLocation + "'"
                                             + (baseUri == null
                                                ? "."
                                                : ", relative to '" + baseUri + "'."),
                                                e);
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchemaException

        // XXX: If we return null, a NPE is raised in SchemaBuilder.
        // If we return new InputSource(), a XmlSchemaException is raised
        // but without any nice error message. So let's just throw a nice error here.
        if (in == null) {
            throw new XmlSchemaException("Unable to locate imported document "
                                         + "at '" + schemaLocation + "'"
                                         + (baseUri == null
                                            ? "."
                                            : ", relative to '" + baseUri + "'."));
        } else if (in.getByteStream() != null
            && !(in.getByteStream() instanceof ByteArrayInputStream)) {
            //workaround bug in XmlSchema - XmlSchema is not closing the InputStreams
            //that are returned for imports.  Thus, with a lot of services starting up
            //or a lot of schemas imported or similar, it's easy to run out of
            //file handles.  We'll just load the file into a byte[] and return that.
            try {
                InputStream ins = IOUtils.loadIntoBAIS(in.getByteStream());
                in.setByteStream(ins);
            } catch (IOException e) {
                throw new XmlSchemaException("Unable to load imported document "
                                             + "at '" + schemaLocation + "'"
                                             + (baseUri == null
                                                ? "."
                                                : ", relative to '" + baseUri + "'."),
                                                e);
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchemaException

        // XXX: If we return null, a NPE is raised in SchemaBuilder.
        // If we return new InputSource(), a XmlSchemaException is raised
        // but without any nice error message. So let's just throw a nice error here.
        if (in == null) {
            throw new XmlSchemaException("Unable to locate imported document "
                                         + "at '" + schemaLocation + "'"
                                         + (baseUri == null
                                            ? "."
                                            : ", relative to '" + baseUri + "'."));
        }
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchemaException

        // XXX: If we return null, a NPE is raised in SchemaBuilder.
        // If we return new InputSource(), a XmlSchemaException is raised
        // but without any nice error message. So let's just throw a nice error here.
        if (in == null) {
            throw new XmlSchemaException("Unable to locate imported document "
                                         + "at '" + schemaLocation + "'"
                                         + (baseUri == null
                                            ? "."
                                            : ", relative to '" + baseUri + "'."));
        } else if (in.getByteStream() != null) {
            //workaround bug in XmlSchema - XmlSchema is not closing the InputStreams
            //that are returned for imports.  Thus, with a lot of services starting up
            //or a lot of schemas imported or similar, it's easy to run out of
            //file handles.  We'll just load the file into a byte[] and return that.
            try {
                InputStream ins = IOUtils.loadIntoBAIS(in.getByteStream());
                in.setByteStream(ins);
            } catch (IOException e) {
                throw new XmlSchemaException("Unable to load imported document "
                                             + "at '" + schemaLocation + "'"
                                             + (baseUri == null
                                                ? "."
                                                : ", relative to '" + baseUri + "'."),
                                                e);
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchemaException

        // XXX: If we return null, a NPE is raised in SchemaBuilder.
        // If we return new InputSource(), a XmlSchemaException is raised
        // but without any nice error message. So let's just throw a nice error here.
        if (in == null) {
            throw new XmlSchemaException("Unable to locate imported document "
                                         + "at '" + schemaLocation + "'"
                                         + (baseUri == null
                                            ? "."
                                            : ", relative to '" + baseUri + "'."));
        } else if (in.getByteStream() != null) {
            //workaround bug in XmlSchema - XmlSchema is not closing the InputStreams
            //that are returned for imports.  Thus, with a lot of services starting up
            //or a lot of schemas imported or similar, it's easy to run out of
            //file handles.  We'll just load the file into a byte[] and return that.
            try {
                InputStream ins = IOUtils.loadIntoBAIS(in.getByteStream());
                in.setByteStream(ins);
            } catch (IOException e) {
                throw new XmlSchemaException("Unable to load imported document "
                                             + "at '" + schemaLocation + "'"
                                             + (baseUri == null
                                                ? "."
                                                : ", relative to '" + baseUri + "'."),
                                                e);
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchemaException

        // XXX: If we return null, a NPE is raised in SchemaBuilder.
        // If we return new InputSource(), a XmlSchemaException is raised
        // but without any nice error message. So let's just throw a nice error here.
        if (in == null) {
            throw new XmlSchemaException("Unable to locate imported document "
                                         + "at '" + schemaLocation + "'"
                                         + (baseUri == null
                                            ? "."
                                            : ", relative to '" + baseUri + "'."));
        } else if (in.getByteStream() != null) {
            //workaround bug in XmlSchema - XmlSchema is not closing the InputStreams
            //that are returned for imports.  Thus, with a lot of services starting up
            //or a lot of schemas imported or similar, it's easy to run out of
            //file handles.  We'll just load the file into a byte[] and return that.
            try {
                InputStream ins = IOUtils.loadIntoBAIS(in.getByteStream());
                in.setByteStream(ins);
            } catch (IOException e) {
                throw new XmlSchemaException("Unable to load imported document "
                                             + "at '" + schemaLocation + "'"
                                             + (baseUri == null
                                                ? "."
                                                : ", relative to '" + baseUri + "'."),
                                                e);
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.