Examples of marshal()


Examples of org.eclipse.persistence.jaxb.JAXBMarshaller.marshal()

                if (isParameterizedType) {
                    JAXBTypeElement jte = new JAXBTypeElement(
                            mappingInfo.getXmlTagName(), object,
                            (ParameterizedType) mappingInfo.getType());
                    if (isEx) {
                        marshaller.marshal(jte, new NewStreamWriterRecord(
                                (XMLStreamWriterEx) output), mappingInfo);
                    } else {
                        marshaller.marshal(jte, output, mappingInfo);
                    }
                } else {
View Full Code Here

Examples of org.eclipse.persistence.oxm.XMLMarshaller.marshal()

    public static void write(XMLEntityMappings entityMappings, Writer writer) {
      entityMappings.setVersion(XMLEntityMappingsReader.ECLIPSELINK_ORM_XSD_VERSION);
        XMLContext context = new XMLContext(new XMLEntityMappingsMappingProject(XMLEntityMappingsReader.ECLIPSELINK_ORM_NAMESPACE, XMLEntityMappingsReader.ECLIPSELINK_ORM_XSD_NAME));
        XMLMarshaller marshaller = context.createMarshaller();
        marshaller.setSchemaLocation(XMLEntityMappingsReader.ECLIPSELINK_ORM_NAMESPACE + " " + XMLEntityMappingsReader.ECLIPSELINK_ORM_XSD);
        marshaller.marshal(entityMappings, writer);
       
        try {
            writer.flush();
        } catch (IOException exception) {
            throw ValidationException.fileError(exception);
View Full Code Here

Examples of org.exolab.castor.xml.Marshaller.marshal()

      try {
  mapping.loadMapping(mappingfile);
  Writer writer = new FileWriter(filename);
  Marshaller marshaller = new Marshaller(writer);
  marshaller.setMapping(mapping);
  marshaller.marshal(this);
  writer.close();
 
  log.info("written to XML");
      } catch (Exception e) {
  log.error(e.getMessage());
View Full Code Here

Examples of org.fusesource.ide.commons.camel.tools.RouteXml.marshal()

      list.clear();
    }

    Activator.getLogger().debug("Saving to file " + file + " routes: " + list);
    try {
      helper.marshal(file, list);
    } catch (Exception ex) {
      Activator.getLogger().error(ex);
    }
  }
View Full Code Here

Examples of org.fusesource.ide.sap.ui.jaxb.blueprint.BlueprintFile.marshal()

    SapConnectionConfiguration sapConnectionConfiguration = new SapConnectionConfiguration();
    SapConnectionConfigurationBuilder.populateSapConnectionConfiguration(getSapConnectionConfigurationModel(), sapConnectionConfiguration);
    BlueprintFile blueprintFile = new BlueprintFile();
    blueprintFile.setSapConnectionConfiguration(sapConnectionConfiguration);
    FileOutputStream fos = getFilename();
    blueprintFile.marshal(fos);
  }
 
  protected void exportSpringFile() throws Exception {
    SapConnectionConfiguration sapConnectionConfiguration = new SapConnectionConfiguration();
    SapConnectionConfigurationBuilder.populateSapConnectionConfiguration(getSapConnectionConfigurationModel(), sapConnectionConfiguration);
View Full Code Here

Examples of org.fusesource.ide.sap.ui.jaxb.spring.SpringFile.marshal()

    SapConnectionConfiguration sapConnectionConfiguration = new SapConnectionConfiguration();
    SapConnectionConfigurationBuilder.populateSapConnectionConfiguration(getSapConnectionConfigurationModel(), sapConnectionConfiguration);
    SpringFile springFile = new SpringFile();
    springFile.setSapConnectionConfiguration(sapConnectionConfiguration);
    FileOutputStream fos = getFilename();
    springFile.marshal(fos);
  }
 
  protected org.fusesource.camel.component.sap.model.rfc.SapConnectionConfiguration getSapConnectionConfigurationModel() {
    SapConnectionsView view = (SapConnectionsView) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(SapConnectionsView.ID);
    if (view != null) {
View Full Code Here

Examples of org.hudsonci.utils.marshal.Marshaller.marshal()

            log.trace("Marshalling reference: {} to file: {}", OID.get(ref), file);
        }

        Writer writer = new BufferedWriter(new FileWriter(file));
        try {
            marshaller.marshal(ref.get(), writer);
        }
        finally {
            Closer.close(writer);
        }
    }
View Full Code Here

Examples of org.hudsonci.utils.marshal.XStreamMarshaller.marshal()

        assertNotNull(holder1.instance);

        doc1.records.add(rec1);

        StringWriter buff = new StringWriter();
        marshaller.marshal(doc1, buff);
        System.out.println("XML:\n" + buff);

        Document<Record> doc2 = (Document<Record>) marshaller.unmarshal(new StringReader(buff.toString()));
        assertNotNull(doc2);
        assertNotNull(doc2.records);
View Full Code Here

Examples of org.jboss.seam.remoting.wrapper.BagWrapper.marshal()

      byte[] expected = ("<bag><element><number>" + intValues[0]
            + "</number></element>" + "<element><number>" + intValues[1] + "</number></element></bag>")
            .getBytes();
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      wrapper.marshal(out);
      assertEquals(expected, out.toByteArray());

      List intList = new ArrayList();
      intList.add(intValues[0]);
      intList.add(intValues[1]);
View Full Code Here

Examples of org.jboss.seam.remoting.wrapper.BooleanWrapper.marshal()

      {
      }

      // test the marshal() method
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      wrapper.marshal(out);
      byte[] expected = ("<bool>" + Boolean.toString(true) + "</bool>")
            .getBytes();
      assertEquals(expected, out.toByteArray());

      // test the conversionScore() method
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.