Examples of XSParser


Examples of org.apache.ws.jaxme.xs.XSParser

         {
            ClassMapping mapping = getClassMapping(child.getClass());

            InputSource source = new InputSource(mapping.schemaUrl);

            XSParser xsParser = new XSParser();
            xsParser.setValidating(false);
            XSSchema xsSchema;
            try
            {
               xsSchema = xsParser.parse(source);
            }
            catch(Exception e)
            {
               log.error(e);
               throw new IllegalStateException(e.getMessage());
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSParser

   public void marshal(Reader schema, ObjectModelProvider provider, Object root, Writer writer)
      throws IOException, SAXException, ParserConfigurationException
   {
      InputSource source = new InputSource(schema);

      XSParser xsParser = new XSParser();
      xsParser.setValidating(false);
      XSSchema xsSchema = xsParser.parse(source);

      this.provider = provider instanceof GenericObjectModelProvider ?
         (GenericObjectModelProvider)provider : new DelegatingObjectModelProvider(provider);

      this.root = root;
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSParser

         {
            ClassMapping mapping = getClassMapping(child.getClass());

            InputSource source = new InputSource(mapping.schemaUrl);

            XSParser xsParser = new XSParser();
            xsParser.setValidating(false);
            XSSchema xsSchema;
            try
            {
               xsSchema = xsParser.parse(source);
            }
            catch(Exception e)
            {
               log.error(e);
               throw new IllegalStateException(e.getMessage());
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSParser

  /** <p>Tests whether the basic simple types can be parsed:
   * Atomic, List, and Union.</p>
   * @throws Exception
   */
  public void testSimpleTypes() throws Exception {
    XSParser xsParser = newXSParser();
    testSimpleTypes(xsParser);
    JAXBParser jaxbParser = newJAXBParser();
    testSimpleTypes(jaxbParser);
  }
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSParser

  }

  /** Tests typical attribute uses.
   */
  public void testAttributes() throws Exception {
    XSParser xsParser = newXSParser();
    testAttributes(xsParser);
    JAXBParser jaxbParser = newJAXBParser();
    testAttributes(jaxbParser);
  }
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSParser

        "</xs:schema>\n";
     
      InputSource isource = new InputSource(new StringReader(schemaSpec));
      isource.setSystemId("jira46.xsd");
      JAXBSchemaReader r = getSchemaReader();
      XSParser parser = r.getSGFactory().newXSParser();
      parser.setValidating(false);
      XSSchema schema = parser.parse(isource);
      XSAttribute[] attrs = schema.getAttributes();
      assertEquals(1, attrs.length);
      XSAttribute idAttr = attrs[0];
      assertTrue(idAttr instanceof JAXBAttribute);
      assertEquals(new XsQName(uri, "id"), idAttr.getName());
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSParser

  }

  /** Tests typical attribute group uses.
   */
  public void testAttributeGroups() throws Exception {
    XSParser xsParser = newXSParser();
    testAttributeGroups(xsParser);
    JAXBParser jaxbParser = newJAXBParser();
    testAttributeGroups(jaxbParser);
  }
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSParser

  }

  /** Tests typical element uses.
   */
  public void testElements() throws Exception {
    XSParser xsParser = newXSParser();
    testElements(xsParser);
    JAXBParser jaxbParser = newJAXBParser();
    testElements(jaxbParser);
  }
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSParser

  }

  /** Tests various facets.
   */
  public void testFacets() throws Exception {
    XSParser xsParser = newXSParser();
    testFacets(xsParser);
    JAXBParser jaxbParser = newJAXBParser();
    testFacets(jaxbParser);
  }
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSParser

    XsQName fooQualified = new XsQName("http://test.com/namespaces", "foo");
    XsQName fooUnQualified = new XsQName((String) null, "foo");
    XsQName barQualified = new XsQName("http://test.com/namespaces", "bar");
    XsQName barUnQualified = new XsQName((String) null, "bar");
   
    XSParser parser = newJAXBParser();
    InputSource isource = new InputSource(new StringReader(pSchema));
    XSSchema schema = parser.parse(isource);
    XSElement[] schemaElements = schema.getElements();
    assertEquals(1, schemaElements.length);
    assertEquals(fooQualified, schemaElements[0].getName());
    XSAttribute[] schemaAttributes = schema.getAttributes();
    assertEquals(1, schemaAttributes.length);
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.