Package org.jboss.xb.binding

Examples of org.jboss.xb.binding.MappingObjectModelProvider


   public void testMarshalStringArrayXerces() throws Exception
   {
      XercesXsMarshaller marshaller = new XercesXsMarshaller();
      marshaller.mapClassToGlobalElement(ArrayWrapper.class, "arr", "http://www.jboss.org/xml/test/arraywrapper", null, null);

      MappingObjectModelProvider provider = new MappingObjectModelProvider();
      provider.mapFieldToElement(ArrayWrapper.class, "stringArray", "http://www.jboss.org/xml/test/arraywrapper", "stringArray", null);

      StringWriter writer = new StringWriter();
      marshaller.marshal(new StringReader(XSD), provider, ArrayWrapper.STRING_ARR_INSTANCE, writer);
      assertXmlEqual(XML, writer.getBuffer().toString());
   }
View Full Code Here


   public void testMarshalStringArrayArrayXerces() throws Exception
   {
      XercesXsMarshaller marshaller = new XercesXsMarshaller();
      marshaller.mapClassToGlobalElement(ArrayWrapper.class, "arr", "http://www.jboss.org/xml/test/arraywrapper", null, null);

      MappingObjectModelProvider provider = new MappingObjectModelProvider();

      StringWriter writer = new StringWriter();
      marshaller.marshal(new StringReader(XSD), provider, ArrayWrapper.STRING_ARR_ARR_INSTANCE, writer);
      assertXmlEqual(XML_STRING_ARR_ARR, writer.getBuffer().toString());
   }
View Full Code Here

   private void marshallingTest(AbstractMarshaller marshaller) throws Exception
   {
      marshaller.setProperty(Marshaller.PROP_OUTPUT_INDENTATION, "false");
      StringWriter writer = new StringWriter();
      marshaller.marshal(new StringReader(XSD), new MappingObjectModelProvider(), GlobalElement.INSTANCE, writer);

      String marshalled = writer.getBuffer().toString();
      assertXmlEqual(XML, marshalled);
   }
View Full Code Here

   {
      StringWriter writer = new StringWriter();
      marshaller.setProperty(Marshaller.PROP_OUTPUT_XML_VERSION, "false");
      marshaller.setProperty(Marshaller.PROP_OUTPUT_INDENTATION, "false");
      marshaller.marshal(new FileReader(getUrl("xml/soapenc/test.xsd").getFile()),
         new MappingObjectModelProvider(),
         AllStruct.INSTANCE,
         writer
      );

      String xml = writer.getBuffer().toString();
View Full Code Here

TOP

Related Classes of org.jboss.xb.binding.MappingObjectModelProvider

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.