Package org.apache.xmlbeans

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


                            result.schemaType());
        XmlCursor cur = result.newCursor();
        Assert.assertTrue("Should have a root element", cur.toFirstChild());
        result = cur.getObject();
        Assert.assertEquals("E=wrappedwildcard|D=wrappedwildcard@http://openuri.org/test/dyntest", result.schemaType().toString());
        Assert.assertEquals(loader.findElement(new QName("http://openuri.org/test/dyntest", "wrappedwildcard")).getType(),
                            result.schemaType());
        Assert.assertTrue("Should have a first child", cur.toFirstChild());
        Assert.assertEquals(new QName("http://www.w3.org/2001/XMLSchema", "schema"), cur.getName());
        XmlObject obj = cur.getObject();
        Assert.assertEquals(Schema.type, obj.schemaType());
View Full Code Here


  @Test
  public void testHttpImport9() throws Exception
  {
    String url = "http://localhost:" + getPort() + "/wsdls/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 = SchemaUtilsTest.class.getResource( "/wsdls/test9/testcase.wsdl" ).toURI().toURL().toString();
View Full Code Here

  public void testHttpImport9() throws Exception
  {
    String url = "http://localhost:" + getPort() + "/wsdls/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 = SchemaUtilsTest.class.getResource( "/wsdls/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 = SchemaUtilsTest.class.getResource( "/wsdls/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" ) ) );
  }

  @Test
  public void testWadlImport() throws Exception
View Full Code Here

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

    url = SchemaUtilsTest.class.getResource( "/wsdls/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" ) ) );
  }

  @Test
  public void testWadlImport() throws Exception
  {
View Full Code Here

  public void testWadlImport() throws Exception
  {
    String file = SchemaUtilsTest.class.getResource( "/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 = SchemaUtilsTest.class.getResource( "/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" ) ) );
  }


  /*
  Helpers
 
View Full Code Here

                            result.schemaType());
        XmlCursor cur = result.newCursor();
        Assert.assertTrue("Should have a root element", cur.toFirstChild());
        result = cur.getObject();
        Assert.assertEquals("E=wrappedwildcard|D=wrappedwildcard@http://openuri.org/test/dyntest", result.schemaType().toString());
        Assert.assertEquals(loader.findElement(new QName("http://openuri.org/test/dyntest", "wrappedwildcard")).getType(),
                            result.schemaType());
        Assert.assertTrue("Should have a first child", cur.toFirstChild());
        Assert.assertEquals(new QName("http://www.w3.org/2001/XMLSchema", "schema"), cur.getName());
        XmlObject obj = cur.getObject();
        Assert.assertEquals(Schema.type, obj.schemaType());
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.