Examples of XercesXsMarshaller


Examples of org.jboss.xb.binding.XercesXsMarshaller

      assertXmlEqual(XML_SIMPLE, marshalled);
   }

   public void testSimpleMarshallingXerces() throws Exception
   {
      XercesXsMarshaller marshaller = new XercesXsMarshaller();
      marshaller.setProperty(Marshaller.PROP_OUTPUT_INDENTATION, "false");
      StringWriter writer = new StringWriter();
      marshaller.marshal(new StringReader(XSD), new MappingObjectModelProvider(), GLOBAL_SIMPLE, writer);
      String marshalled = writer.getBuffer().toString();
      assertXmlEqual(XML_SIMPLE, marshalled);
   }
View Full Code Here

Examples of org.jboss.xb.binding.XercesXsMarshaller

      assertXmlEqual(xml, marshalled);
   }

   public void testImmutableXerces() throws Exception
   {
      immutableTest(new XercesXsMarshaller());
   }
View Full Code Here

Examples of org.jboss.xb.binding.XercesXsMarshaller

      assertNull(result);
   }

   public void testDateTimeXerces() throws Exception
   {
      dateTimeTest(new XercesXsMarshaller());
   }
View Full Code Here

Examples of org.jboss.xb.binding.XercesXsMarshaller

      dateTimeTest(new MarshallerImpl());
   }

   public void testJavaUtilDateXerces() throws Exception
   {
      javaUtilDateTest(new XercesXsMarshaller());
   }
View Full Code Here

Examples of org.jboss.xb.binding.XercesXsMarshaller

      assertEquals(PurchaseOrder.INSTANCE, o);
   }

   public void testMarshallingXerces() throws Exception
   {
      XercesXsMarshaller marshaller = new XercesXsMarshaller();
      marshaller.setSchemaResolver(SCHEMA_RESOLVER);
      marshaller.mapClassToXsiType(UKAddress.class, PO_NS, "UKAddress");
      marshaller.mapClassToXsiType(USAddress.class, PO_NS, "USAddress");

      MappingObjectModelProvider provider = new MappingObjectModelProvider();

      StringWriter writer = new StringWriter();
      marshaller.marshal(new StringReader(PO_XSD), provider, PurchaseOrder.INSTANCE, writer);
      assertXmlEqual(PO_XML, writer.getBuffer().toString());
   }
View Full Code Here

Examples of org.jboss.xb.binding.XercesXsMarshaller

      super(name);
   }

   public void testMarshallingXerces() throws Exception
   {
      XercesXsMarshaller marshaller = new XercesXsMarshaller();
      marshaller.setSchemaResolver(RESOLVER);
      assertMarshalling(marshaller);
   }
View Full Code Here

Examples of org.jboss.xb.binding.XercesXsMarshaller

      assertArrayOfAnyDom(o);
   }

   public void testMarshallingXercesGenericElement() throws Exception
   {
      XercesXsMarshaller marshaller = new XercesXsMarshaller();
      setupGeMarshaller(marshaller);

      MappingObjectModelProvider provider = new MappingObjectModelProvider();

      StringWriter writer = new StringWriter();
      marshaller.marshal(new StringReader(XSD), provider, ArrayOfAny.GE_INSTANCE, writer);
      String marshalled = writer.getBuffer().toString();
      assertXmlEqual(XML, marshalled);
   }
View Full Code Here

Examples of org.jboss.xb.binding.XercesXsMarshaller

      assertXmlEqual(XML, marshalled);
   }

   public void testMarshallingXercesDom() throws Exception
   {
      XercesXsMarshaller marshaller = new XercesXsMarshaller();
      setupDomMarshaller(marshaller);

      MappingObjectModelProvider provider = new MappingObjectModelProvider();

      StringWriter writer = new StringWriter();
      marshaller.marshal(new StringReader(XSD), provider, ArrayOfAny.DOM_INSTANCE, writer);
      String marshalled = writer.getBuffer().toString();
      assertXmlEqual(XML, marshalled);
   }
View Full Code Here

Examples of org.jboss.xb.binding.XercesXsMarshaller

   }

   public void testMultidimArrMarshallingXerces() throws Exception
   {
      StringWriter writer = new StringWriter();
      XercesXsMarshaller marshaller = new XercesXsMarshaller();
      marshaller.marshal(new StringReader(getMultiDimArrayXsd(false)),
         new MappingObjectModelProvider(),
         MULTIDIM_ARR,
         writer
      );
      String marshalled = writer.getBuffer().toString();
View Full Code Here

Examples of org.jboss.xb.binding.XercesXsMarshaller

      ListWrapper lists = new ListWrapper();
      lists.field1 = Arrays.asList(new String[]{"str1", "str2", "str3"});
      lists.field2 = Arrays.asList(new Boolean[]{Boolean.TRUE, Boolean.FALSE, Boolean.TRUE});

      StringWriter writer = new StringWriter();
      XercesXsMarshaller marshaller = new XercesXsMarshaller();
      MappingObjectModelProvider provider = new MappingObjectModelProvider();
      provider.mapFieldToElement(ListWrapper.class, "field2", "http://jboss.org/test/xml/list", "e", null);
      marshaller.marshal(new StringReader(LIST_TYPE_XSD), provider, lists, writer);

      String xml = writer.getBuffer().toString();
      assertXmlEqual(LIST_TYPE_XML, xml);
   }
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.