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

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


   public JBossXBMarshallerImpl()
   {

      //ClassInfos.disableCache();

      delegate = new MarshallerImpl();
      delegate.setProperty(org.jboss.xb.binding.Marshaller.PROP_OUTPUT_XML_VERSION, "false");
      delegate.setProperty(org.jboss.xb.binding.Marshaller.PROP_OUTPUT_INDENTATION, "false");
      delegate.declareNamespace("xsi", Constants.NS_XML_SCHEMA_INSTANCE);
      delegate.setSupportNil(true);
   }
View Full Code Here


      assertXmlEqual(XML, marshalled);
   }

   public void testMarshallingSundayGenericElement() throws Exception
   {
      MarshallerImpl marshaller = new MarshallerImpl();
      setupGeMarshaller(marshaller);
      StringWriter writer = new StringWriter();
      marshaller.marshal(new StringReader(XSD), null, ArrayOfAny.GE_INSTANCE, writer);
      String marshalled = writer.getBuffer().toString();
      assertXmlEqual(XML, marshalled);
   }
View Full Code Here

      assertXmlEqual(XML, marshalled);
   }

   public void testMarshallingSundayDom() throws Exception
   {
      MarshallerImpl marshaller = new MarshallerImpl();
      setupDomMarshaller(marshaller);
      StringWriter writer = new StringWriter();
      marshaller.marshal(new StringReader(XSD), null, ArrayOfAny.DOM_INSTANCE, writer);
      String marshalled = writer.getBuffer().toString();
      assertXmlEqual(XML, marshalled);
   }
View Full Code Here

   public void testMarshalling() throws Exception
   {
      String ns = "http://www.jboss.org/test/xml/collections";

      MarshallerImpl marshaller = new MarshallerImpl();
      marshaller.addRootElement(new QName(ns, "collections"));
      marshaller.setRootTypeQName(new QName(ns, "collections"));
      marshaller.declareNamespace(null, ns);

      String xsd = getFullPath("xml/collections.xsd");
      StringWriter xml = new StringWriter();
      marshaller.marshal(xsd, new MappingObjectModelProvider(), Collections.getInstance(), xml);

      String marshalled = xml.getBuffer().toString();
      try
      {
         unmarshalCollections(new StringReader(marshalled));
View Full Code Here

   }

   public void testMultidimArrMarshallingSunday() throws Exception
   {
      StringWriter writer = new StringWriter();
      MarshallerImpl marshaller = new MarshallerImpl();
      marshaller.marshal(new StringReader(getMultiDimArrayXsd(false)), null, MULTIDIM_ARR, writer);
      String marshalled = writer.getBuffer().toString();
      assertXmlEqual(MULTIDIM_ARR_XML, marshalled);
   }
View Full Code Here

      SchemaBinding schema = XsdBinder.bind(new StringReader(LIST_TYPE_XSD), null);
      schema.setIgnoreUnresolvedFieldOrClass(false);

      StringWriter writer = new StringWriter();
      MarshallerImpl marshaller = new MarshallerImpl();
      marshaller.marshal(schema, null, lists, writer);

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

      SchemaBinding schema = XsdBinder.bind(new StringReader(LIST_TYPE_XSD), null);
      schema.setIgnoreUnresolvedFieldOrClass(false);

      StringWriter writer = new StringWriter();
      MarshallerImpl marshaller = new MarshallerImpl();
      marshaller.marshal(schema, null, lists, writer);

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

      );
   }

   public void testMarshalEmptyPrimitiveArraySunday() throws Exception
   {
      marshallingTest(new MarshallerImpl(), null, getArrayOfLongXsd(false, false), new long[0], EMPTY_ARRAY_XML);
   }
View Full Code Here

      );
   }

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

      );
   }

   public void testMarshalEmptyAnnotatedPrimitiveArraySunday() throws Exception
   {
      marshallingTest(new MarshallerImpl(), null, getArrayOfLongXsd(false, true), new ArrayWrapper(new long[0]), EMPTY_ARRAY_XML);
   }
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.