Package org.jboss.xb.binding

Examples of org.jboss.xb.binding.XercesXsMarshaller.marshal()


      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());
   }

   public void testMarshallingSunday() throws Exception
   {
View Full Code Here


      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);
   }

   public void testMarshallingXercesDom() throws Exception
View Full Code Here

      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);
   }

   public void testMarshallingSundayGenericElement() throws Exception
View Full Code Here

   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

      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

         };

      StringWriter writer = new StringWriter();
      XercesXsMarshaller marshaller = new XercesXsMarshaller();
      MappingObjectModelProvider provider = new MappingObjectModelProvider();
      marshaller.marshal(new StringReader(LIST_TYPE_XSD), provider, lists, writer);

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

      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);
   }

   public void testMarshallingXercesDom() throws Exception
View Full Code Here

      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);
   }

   public void testMarshallingSundayGenericElement() throws Exception
View Full Code Here

   {
      StringWriter writer = new StringWriter();
      XercesXsMarshaller marshaller = new XercesXsMarshaller();
      initMarshaller(marshaller);
      marshaller.setSchemaResolver(SCHEMA_RESOLVER);
      marshaller.marshal(new StringReader(XSD), new MappingObjectModelProvider(), Collections.singleton(book), writer);
      return writer.getBuffer().toString();
   }

   private String marshalSunday(Book book)
      throws Exception
View Full Code Here

   public void testMarshallingXerces() throws Exception
   {
      XercesXsMarshaller marshaller = new XercesXsMarshaller(); //new MarshallerImpl();
      marshaller.setSchemaResolver(SCHEMA_RESOLVER);
      StringWriter writer = new StringWriter();
      marshaller.marshal(new StringReader(XSD), new MappingObjectModelProvider(), E.INSTANCE, writer);
      assertXmlEqual(XML, writer.getBuffer().toString());
   }

   public void testMarshallingSunday() 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.