Package commonj.sdo.helper

Examples of commonj.sdo.helper.XMLHelper.save()


    DataObject lastNameProperty = customerType.createDataObject("property");
    lastNameProperty.set("name", "lastName");
    lastNameProperty.set("type", stringType);

    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    xmlHelper.save(customerType, "commonj.sdo", "type", baos);
   
    ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
    XMLDocument xdoc = xmlHelper.load(bais);

    customerType = xdoc.getRootObject();
View Full Code Here


    assertEquals(type.getProperty("custNum").getType(), intType);
    assertEquals(type.getProperty("firstName").getType(), stringType);
    assertEquals(type.getProperty("lastName").getType(), stringType);
   
    baos = new ByteArrayOutputStream();
    xmlHelper.save(
      customer1,
      "http://example.com/customer",
      "Customer", baos);
    assertTrue(
      TestUtil.equalXmlFiles(
View Full Code Here

      TestUtil.equalXmlFiles(
        new ByteArrayInputStream(baos.toByteArray()),
        getClass().getResource(CUSTOMER1_XML)));
   
    baos = new ByteArrayOutputStream();
    xmlHelper.save(
      customer2,
      "http://example.com/customer",
      "Customer", baos);
    assertTrue(
        TestUtil.equalXmlFiles(
View Full Code Here

    assertEquals(type.getProperty("custNum").getType(), intType);
    assertEquals(type.getProperty("firstName").getType(), stringType);
    assertEquals(type.getProperty("lastName").getType(), stringType);
   
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    xmlHelper.save(
      customer1,
      "http://example.com/customer",
      "Customer", baos);
    assertTrue(
      TestUtil.equalXmlFiles(
View Full Code Here

      TestUtil.equalXmlFiles(
        new ByteArrayInputStream(baos.toByteArray()),
        getClass().getResource(CUSTOMER1_XML)));
   
    baos = new ByteArrayOutputStream();
    xmlHelper.save(
      customer2,
      "http://example.com/customer",
      "Customer", baos);
    assertTrue(
        TestUtil.equalXmlFiles(
View Full Code Here

    assertNotNull(type.getProperty("custNum"));
    assertNotNull(type.getProperty("firstName"));
    assertNotNull(type.getProperty("lastName"));
   
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    xmlHelper.save(
      customer1,
      "http://example.com/customer",
      "Customer", baos);
    assertTrue(
      TestUtil.equalXmlFiles(
View Full Code Here

      TestUtil.equalXmlFiles(
        new ByteArrayInputStream(baos.toByteArray()),
        getClass().getResource(CUSTOMER1_XML)));
   
    baos = new ByteArrayOutputStream();
    xmlHelper.save(
      customer2,
      "http://example.com/customer",
      "Customer", baos);
    assertTrue(
        TestUtil.equalXmlFiles(
View Full Code Here

    assertEquals(type.getProperty("custNum").getType(), intType);
    assertEquals(type.getProperty("firstName").getType(), stringType);
    assertEquals(type.getProperty("lastName").getType(), stringType)
   
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    xmlHelper.save(
      customer1,
      "http://example.com/customer",
      "Customer", baos);
    assertTrue(
      TestUtil.equalXmlFiles(
View Full Code Here

      TestUtil.equalXmlFiles(
        new ByteArrayInputStream(baos.toByteArray()),
        getClass().getResource(CUSTOMER1_XML)));
   
    baos = new ByteArrayOutputStream();
    xmlHelper.save(
      customer2,
      "http://example.com/customer",
      "Customer", baos);
    assertTrue(
        TestUtil.equalXmlFiles(
View Full Code Here

    sequence.add("price", new BigDecimal("1000.0"));

    sequence.add("\n");

    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    xmlHelper.save(quote, "http://www.example.com/mixed", "mixedStockQuote", baos);
    assertTrue(TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(MIXED_XML)));
  }
 
  public void testDefineSequencedOpenType() throws Exception
  {
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.