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

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


      );
   }

   public void testMarshalEmptyAnnotatedArrayOfWrappersSunday() throws Exception
   {
      marshallingTest(new MarshallerImpl(), null, getArrayOfLongXsd(true, true), new ArrayWrapper(new Long[0]), EMPTY_ARRAY_XML);
   }
View Full Code Here


      );
   }

   public void testMarshalPrimitiveArraySunday() throws Exception
   {
      marshallingTest(new MarshallerImpl(), null, getArrayOfLongXsd(false, false), PRIMITIVES, PRIMITIVES_XML);
   }
View Full Code Here

      );
   }

   public void testMarshalAnnotatedPrimtiveArraySunday() throws Exception
   {
      marshallingTest(new MarshallerImpl(),
         null,
         getArrayOfLongXsd(false, true),
         new ArrayWrapper(PRIMITIVES),
         PRIMITIVES_XML
      );
View Full Code Here

      arrayOfWrappersTest(marshaller);
   }

   public void testArrayOfWrappersSunday() throws Exception
   {
      MarshallerImpl marshaller = new MarshallerImpl();
      arrayOfWrappersTest(marshaller);
   }
View Full Code Here

      qNameArrayWithPrefixesTest(new XercesXsMarshaller());
   }

   public void testQNameArrayWithPrefixesSunday() throws Exception
   {
      qNameArrayWithPrefixesTest(new MarshallerImpl());
   }
View Full Code Here

      qNameArrayWithoutPrefixesTest(new XercesXsMarshaller());
   }

   public void testQNameArrayWithoutPrefixesSunday() throws Exception
   {
      qNameArrayWithoutPrefixesTest(new MarshallerImpl());
   }
View Full Code Here

   public void testMarshallingSunday() throws Exception
   {
      SchemaBinding schema = XsdBinder.bind(new StringReader(PO_XSD), null, SCHEMA_RESOLVER);

      MarshallerImpl marshaller = new MarshallerImpl();
      marshaller.setSchemaResolver(SCHEMA_RESOLVER);
      marshaller.mapClassToXsiType(UKAddress.class, PO_NS, "UKAddress");
      marshaller.mapClassToXsiType(USAddress.class, PO_NS, "USAddress");

      StringWriter writer = new StringWriter();

      marshaller.marshal(schema, null, PurchaseOrder.INSTANCE, writer);
      assertXmlEqual(PO_XML, writer.getBuffer().toString());
   }
View Full Code Here

   public void testMarshalCollectionSunday() throws Exception
   {
      SchemaBinding schema = XsdBinder.bind(new StringReader(COLLECTION_XSD), null, SCHEMA_RESOLVER);

      MarshallerImpl marshaller = new MarshallerImpl();
      marshaller.setSchemaResolver(SCHEMA_RESOLVER);
      marshaller.mapClassToXsiType(UKAddress.class, PO_NS, "UKAddress");
      marshaller.mapClassToXsiType(USAddress.class, PO_NS, "USAddress");

      StringWriter writer = new StringWriter();

      PurchaseOrder po = new PurchaseOrder();
      po.address = new Address[2];
      po.address[0] = PurchaseOrder.INSTANCE.billTo;
      po.address[1] = PurchaseOrder.INSTANCE.shipTo;
     
      marshaller.marshal(schema, null, po, writer);
      assertXmlEqual(COLLECTION_XML, writer.getBuffer().toString());
   }
View Full Code Here

   public void testOneAddressMarshalling() throws Exception
   {
      SchemaBinding schema = XsdBinder.bind(new StringReader(ONE_ADDRESS_XSD), null, SCHEMA_RESOLVER);

      MarshallerImpl marshaller = new MarshallerImpl();
      marshaller.setSchemaResolver(SCHEMA_RESOLVER);
      marshaller.mapClassToXsiType(UKAddress.class, PO_NS, "UKAddress");

      StringWriter writer = new StringWriter();

      marshaller.marshal(schema, null, PurchaseOrder.INSTANCE.shipTo, writer);
      assertXmlEqual(ONE_ADDRESS_XML, writer.getBuffer().toString());
   }
View Full Code Here

      dom.setTextContent("test");

      MyType root = new MyType();
      root.anything = dom;
     
      MarshallerImpl marshaller = new MarshallerImpl();
      StringWriter writer = new StringWriter();
      marshaller.marshal(schema, null, root, writer);
     
      assertXmlFileContent(rootName + "_complexContent.xml", 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.