Package org.jboss.xb.binding.sunday.marshalling

Examples of org.jboss.xb.binding.sunday.marshalling.MarshallerImpl$MarshallingContextImpl


     
      Top top = new Top();
      top.string = new ArrayList();
      top.string.add(" ");
      top.string.add("\n      newline, 6 spaces, newline, 3 spaces\n   ");
      MarshallerImpl marshaller = new MarshallerImpl();
      StringWriter writer = new StringWriter();
      marshaller.marshal(schema, null, top, writer);
     
      // TODO: the xml diff trims whitespaces...
      //assertXmlFileContent("IgnorableWhitespaceContent.xml", writer.getBuffer().toString());
      //System.out.println(writer.getBuffer().toString());
     
View Full Code Here


   }

   public void testMarshallingSunday() throws Exception
   {
      StringWriter writer = new StringWriter();
      MarshallerImpl marshaller = new MarshallerImpl();
      marshaller.setProperty(Marshaller.PROP_OUTPUT_INDENTATION, "false");
      marshaller.marshal(SCHEMA, null, E.INSTANCE, writer);
      String xml = writer.getBuffer().toString();
      assertXmlEqual(XML, xml);
   }
View Full Code Here

   {
      Binding binding = new Binding();
      binding.setName("root");
      binding.value4 = new Binding.Value4("val4");
      StringWriter writer = new StringWriter();
      MarshallerImpl marshaller = new MarshallerImpl();
      marshaller.setProperty(Marshaller.PROP_OUTPUT_INDENTATION, "false");
      String file = getPath("xml/jbxb/characters/schema1.xsd").getFile();
      marshaller.marshal(new FileReader(file), new MappingObjectModelProvider(), binding, writer);
      String xml = writer.getBuffer().toString();
      assertEquals(XML_VALUE4, xml);
   }
View Full Code Here

   }

   public void testSimpleMarshallingSunday() throws Exception
   {
      SchemaBinding schema = XsdBinder.bind(new StringReader(XSD), null);
      MarshallerImpl marshaller = new MarshallerImpl();
      marshaller.setProperty(Marshaller.PROP_OUTPUT_INDENTATION, "false");
      StringWriter writer = new StringWriter();
      marshaller.marshal(schema, null, GLOBAL_SIMPLE, writer);
      String marshalled = writer.getBuffer().toString();
      assertXmlEqual(XML_SIMPLE, marshalled);
   }
View Full Code Here

      Person person = (Person)unmarshalled;
      assertEquals(firstName, person.getFirstName());
      assertEquals(lastName, person.getLastName());

      StringWriter writer = new StringWriter();
      MarshallerImpl marshaller = new MarshallerImpl();
      marshaller.marshal(schema, null, person, writer);
      String marshalled = writer.getBuffer().toString();
      assertXmlEqual(xml, marshalled);
   }
View Full Code Here

      immutableTest(new XercesXsMarshaller());
   }

   public void testImmutableSunday() throws Exception
   {
      immutableTest(new MarshallerImpl());
   }
View Full Code Here

      dateTimeTest(new XercesXsMarshaller());
   }

   public void testDateTimeSunday() throws Exception
   {
      dateTimeTest(new MarshallerImpl());
   }
View Full Code Here

      javaUtilDateTest(new XercesXsMarshaller());
   }

   public void testJavaUtilDateSunday() throws Exception
   {
      javaUtilDateTest(new MarshallerImpl());
   }
View Full Code Here

      }
   }

   public void testMarshalStringArraySunday() throws Exception
   {
      MarshallerImpl marshaller = new MarshallerImpl();
      StringWriter writer = new StringWriter();
      marshaller.marshal(SCHEMA, null, ArrayWrapper.STRING_ARR_INSTANCE, writer);
      assertXmlEqual(XML, writer.getBuffer().toString());
   }
View Full Code Here

      assertTrue(Arrays.equals(ArrayWrapper.STRING_ARR_INSTANCE.stringArray.getValue(), aw.stringArray.getValue()));
   }

   public void testMarshalStringArrayArraySunday() throws Exception
   {
      MarshallerImpl marshaller = new MarshallerImpl();
      StringWriter writer = new StringWriter();
      marshaller.marshal(SCHEMA, null, ArrayWrapper.STRING_ARR_ARR_INSTANCE, writer);
      assertXmlEqual(XML_STRING_ARR_ARR, writer.getBuffer().toString());
   }
View Full Code Here

TOP

Related Classes of org.jboss.xb.binding.sunday.marshalling.MarshallerImpl$MarshallingContextImpl

Copyright © 2018 www.massapicom. 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.