Examples of validateAgainst()


Examples of org.codehaus.stax2.XMLStreamReader2.validateAgainst()

            .newInstance(XMLValidationSchema.SCHEMA_ID_W3C_SCHEMA);
      // TODO: Is this good enough to get hold of package.xsd? Need to think about this.
      URL packageXsd = Thread.currentThread().getContextClassLoader().getResource("package.xsd");
      XMLValidationSchema schema = validationSchemaFactory.createSchema(packageXsd);;
      // enable validation (note: validation will happen during parse)
      xmlStreamReader.validateAgainst(schema);

      // parse the xml
      PackageType pkgMetadata = null;
      while (xmlStreamReader.hasNext())
      {
View Full Code Here

Examples of org.codehaus.stax2.XMLStreamReader2.validateAgainst()

            public void reportProblem(XMLValidationProblem problem) throws XMLValidationException {
                throw new Fault(new Message("READ_VALIDATION_ERROR", LOG, problem.getMessage()),
                                Fault.FAULT_CODE_CLIENT);
            }
        });
        reader2.validateAgainst(vs);
    }

    public void setupValidation(XMLStreamWriter writer, ServiceInfo serviceInfo) throws XMLStreamException {
        XMLStreamWriter2 writer2 = (XMLStreamWriter2)writer;
        XMLValidationSchema vs = getValidator(serviceInfo);
View Full Code Here

Examples of org.codehaus.stax2.XMLStreamWriter2.validateAgainst()

            public void reportProblem(XMLValidationProblem problem) throws XMLValidationException {
                throw new Fault(problem.getMessage(), LOG);
            }
        });
        writer2.validateAgainst(vs);
        return true;
    }

    /**
     * Create woodstox validator for a schema set.
View Full Code Here

Examples of org.codehaus.stax2.XMLStreamWriter2.validateAgainst()

    }

    public void setupValidation(XMLStreamWriter writer, ServiceInfo serviceInfo) throws XMLStreamException {
        XMLStreamWriter2 writer2 = (XMLStreamWriter2)writer;
        XMLValidationSchema vs = getValidator(serviceInfo);
        writer2.validateAgainst(vs);
    }

    /**
     * Create woodstox validator for a schema set.
     * @param schemas
View Full Code Here

Examples of org.codehaus.stax2.XMLStreamWriter2.validateAgainst()

            public void reportProblem(XMLValidationProblem problem) throws XMLValidationException {
                throw new Fault(problem.getMessage(), LOG);
            }
        });
        writer2.validateAgainst(vs);
        return true;
    }

    /**
     * Create woodstox validator for a schema set.
View Full Code Here

Examples of org.codehaus.stax2.XMLStreamWriter2.validateAgainst()

            public void reportProblem(XMLValidationProblem problem) throws XMLValidationException {
                throw new Fault(problem.getMessage(), LOG);
            }
        });
        writer2.validateAgainst(vs);
    }

    /**
     * Create woodstox validator for a schema set.
     *
 
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.