Package org.apache.xmlbeans

Examples of org.apache.xmlbeans.SchemaTypeLoader.findElement()


  public void testHttpImport9() throws Exception
  {
    String url = "http://localhost:8082/test9/testcase.wsdl";
    SchemaTypeLoader schemaTypes = SchemaUtils.loadSchemaTypes( url, new UrlWsdlLoader( url ) );
    assertNotNull( schemaTypes.findElement( new QName( "http://testcase/wsdl", "One" ) ) );
    assertNotNull( schemaTypes.findElement( new QName( "http://testcase/wsdl", "Two" ) ) );
    assertNotNull( schemaTypes.findType( new QName( "http://testcase/one", "OneType" ) ) );
    assertNotNull( schemaTypes.findType( new QName( "http://testcase/two", "TwoType" ) ) );

    url = new File( "src\\test-resources\\test9\\testcase.wsdl" ).toURI().toURL().toString();
View Full Code Here


  public void testHttpImport9() throws Exception
  {
    String url = "http://localhost:8082/test9/testcase.wsdl";
    SchemaTypeLoader schemaTypes = SchemaUtils.loadSchemaTypes( url, new UrlWsdlLoader( url ) );
    assertNotNull( schemaTypes.findElement( new QName( "http://testcase/wsdl", "One" ) ) );
    assertNotNull( schemaTypes.findElement( new QName( "http://testcase/wsdl", "Two" ) ) );
    assertNotNull( schemaTypes.findType( new QName( "http://testcase/one", "OneType" ) ) );
    assertNotNull( schemaTypes.findType( new QName( "http://testcase/two", "TwoType" ) ) );

    url = new File( "src\\test-resources\\test9\\testcase.wsdl" ).toURI().toURL().toString();
    schemaTypes = SchemaUtils.loadSchemaTypes( url, new UrlWsdlLoader( url ) );
View Full Code Here

    assertNotNull( schemaTypes.findType( new QName( "http://testcase/one", "OneType" ) ) );
    assertNotNull( schemaTypes.findType( new QName( "http://testcase/two", "TwoType" ) ) );

    url = new File( "src\\test-resources\\test9\\testcase.wsdl" ).toURI().toURL().toString();
    schemaTypes = SchemaUtils.loadSchemaTypes( url, new UrlWsdlLoader( url ) );
    assertNotNull( schemaTypes.findElement( new QName( "http://testcase/wsdl", "One" ) ) );
    assertNotNull( schemaTypes.findElement( new QName( "http://testcase/wsdl", "Two" ) ) );
  }

  private SchemaTypeLoader validate( String url, int cnt ) throws Exception
  {
View Full Code Here

    assertNotNull( schemaTypes.findType( new QName( "http://testcase/two", "TwoType" ) ) );

    url = new File( "src\\test-resources\\test9\\testcase.wsdl" ).toURI().toURL().toString();
    schemaTypes = SchemaUtils.loadSchemaTypes( url, new UrlWsdlLoader( url ) );
    assertNotNull( schemaTypes.findElement( new QName( "http://testcase/wsdl", "One" ) ) );
    assertNotNull( schemaTypes.findElement( new QName( "http://testcase/wsdl", "Two" ) ) );
  }

  private SchemaTypeLoader validate( String url, int cnt ) throws Exception
  {
    SchemaTypeLoader schemaTypes = SchemaUtils.loadSchemaTypes( url, new UrlWsdlLoader( url ) );
View Full Code Here

  public void testWadlImport() throws Exception
  {
    String file = new File( "src\\test-resources\\wadl\\YahooSearch.wadl" ).toURI().toURL().toString();
    SchemaTypeLoader types = SchemaUtils.loadSchemaTypes( file, new UrlSchemaLoader( file ) );

    assertNotNull( types.findElement( new QName( "urn:yahoo:yn", "ResultSet" ) ) );
    assertNotNull( types.findElement( new QName( "urn:yahoo:api", "Error" ) ) );
  }

}
View Full Code Here

  {
    String file = new File( "src\\test-resources\\wadl\\YahooSearch.wadl" ).toURI().toURL().toString();
    SchemaTypeLoader types = SchemaUtils.loadSchemaTypes( file, new UrlSchemaLoader( file ) );

    assertNotNull( types.findElement( new QName( "urn:yahoo:yn", "ResultSet" ) ) );
    assertNotNull( types.findElement( new QName( "urn:yahoo:api", "Error" ) ) );
  }

}
View Full Code Here

  public Class qname2class(QName qname) {
    logger.debug("Get XMLBeans class for Qname: " + qname);
          SchemaTypeLoader stl = XmlBeans.getContextTypeLoader();
          SchemaType st = stl.findType(qname);
          if (st == null) {
              SchemaField sf = stl.findElement(qname);
              if (sf != null) {
                  st = sf.getType();
              }
          }
View Full Code Here

     */
    private Class q2UserClass(QName qname) {
        SchemaTypeLoader stl = XmlBeans.getContextTypeLoader();
        SchemaType st = stl.findType(qname);
        if (st == null) {
            SchemaField sf = stl.findElement(qname);
            if (sf != null)
                st = sf.getType();
        }

        if (st != null && !st.isBuiltinType())
View Full Code Here

    public Class q2Class(QName qType) {

        SchemaTypeLoader stl = XmlBeans.getContextTypeLoader();
        SchemaType st = stl.findType(qType);
        if (st == null) {
            SchemaField sf = stl.findElement(qType);
            if (sf != null) {
                st = sf.getType();
            }
        }
View Full Code Here

    private Class q2UserClass(QName qname) {
        SchemaTypeLoader stl = XmlBeans.getContextTypeLoader();
        SchemaType st = stl.findType(qname);
        if (st == null) {
            SchemaField sf = stl.findElement(qname);
            if (sf != null)
                st = sf.getType();
        }
        if (st != null && !st.isBuiltinType())
            return st.getJavaClass();
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.