Examples of marshal()


Examples of net.buffalo.protocal.converters.collection.CollectionConverter.marshal()

    List list = new ArrayList();
    list.add("string1");
    list.add("string2");
   
    CollectionConverter s = new CollectionConverter();
    s.marshal(list, context, streamWriter);
    assertEquals("<list>" +
        "<type>java.util.ArrayList</type>" +
        "<length>2</length>" +
        "<string>string1</string>" +
        "<string>string2</string>" +
View Full Code Here

Examples of net.buffalo.protocal.converters.map.MapConverter.marshal()

    assertTrue(ms.canConvert(HashMap.class));
    assertFalse(ms.canConvert(null));
   
    Map m = new HashMap();
    m.put("string", "value");
    ms.marshal(m, mashallingContext, streamWriter);
    assertEquals("<map>" +
        "<type>java.util.HashMap</type>" +
        "<string>string</string>" +
        "<string>value</string>" +
        "</map>", stringWriter.getBuffer().toString());
View Full Code Here

Examples of net.buffalo.protocal.converters.map.ObjectConverter.marshal()

  public void testShouldSerializeParentClass() throws Exception {
    ObjectConverter os = new ObjectConverter();
    BirthdayPeople people = new BirthdayPeople();
    people.setBirthday(new Date());
    assertTrue(os.canConvert(BirthdayPeople.class));
    os.marshal(people, context, streamWriter);
    String output = stringWriter.getBuffer().toString();
    assertTrue(output.indexOf("date")>-1);
    assertTrue(output.indexOf("name") > -1);
    assertEquals(1, context.getObjects().size());
  }
View Full Code Here

Examples of net.sf.ofx4j.io.AggregateMarshaller.marshal()

            OFXV1Writer writer = new OFXV1Writer(fos);
            writer.setWriteAttributesOnNewLine(true);

            AggregateMarshaller marshaller = new AggregateMarshaller();
            marshaller.setConversion(new MyFinanceStringConversion());
            marshaller.marshal(envelope, writer);

            writer.flush();
            writer.close();
          }
        }
View Full Code Here

Examples of npanday.assembler.AssemblyInfoMarshaller.marshal()

            assemblyInfo.setKeyName( keycontainer );
        }
        try
        {
            AssemblyInfoMarshaller marshaller = assemblerContext.getAssemblyInfoMarshallerFor( language.trim() );
            marshaller.marshal( assemblyInfo, project, null );
        }
        catch ( IOException e )
        {
            throw new MojoExecutionException( "NPANDAY-902-002: Problem generating assembly info class", e );
        }
View Full Code Here

Examples of org.apache.activemq.openwire.BooleanStream.marshal()

                    } else {
                        writeBuffer.put(PartialCommand.DATA_STRUCTURE_TYPE);
                    }

                    if (bs != null) {
                        bs.marshal(writeBuffer);
                    }

                    int commandId = command.getCommandId();
                    if (fragment > 0) {
                        commandId = sequenceGenerator.getNextSequenceId();
View Full Code Here

Examples of org.apache.axis2.datasource.jaxb.JAXBDSContext.marshal()

        format.setDoOptimize(true);
        MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(baos, format);
       
        // Marshal the value
        writer.writeStartElement("root");
        context.marshal(jaxbElement, writer);
        writer.writeEndElement();

        writer.flush();
       
        String outputText = baos.toString();
View Full Code Here

Examples of org.apache.axis2.jaxws.message.databinding.JAXBBlockContext.marshal()

    protected void _outputFromBO(Object busObject, Object busContext, XMLStreamWriter writer)
        throws XMLStreamException, WebServiceException {
        JAXBBlockContext ctx = (JAXBBlockContext) busContext;
       
        try {
            ctx.marshal(busObject, writer);
        } catch (JAXBException je) {
            if (DEBUG_ENABLED) {
                try {
                    log.debug("JAXBContext for marshal failure:" +
                              ctx.getJAXBContext(ctx.getClassLoader()));
View Full Code Here

Examples of org.apache.camel.spi.DataFormat.marshal()

    public void testMarshalMandatoryConversionFailed() throws Exception {
        DataFormat dataFormat = new ZipDataFormat();

        try {
            dataFormat.marshal(new DefaultExchange(new DefaultCamelContext()), new Object(), new ByteArrayOutputStream());
            fail("Should have thrown an exception");
        } catch (NoTypeConversionAvailableException e) {
            // expected
        }
    }
View Full Code Here

Examples of org.apache.jcp.xml.dsig.internal.dom.DOMKeyInfo.marshal()

        for (Map.Entry<String,String> me : signatureConfig.getNamespacePrefixes().entrySet()) {
            domSignContext.putNamespacePrefix(me.getKey(), me.getValue());
        }
       
        DOMStructure domStructure = new DOMStructure(n);
        domKeyInfo.marshal(domStructure, domSignContext);
       
        // move keyinfo into the right place
        if (nextSibling != null) {
            NodeList kiNl = document.getElementsByTagNameNS(XML_DIGSIG_NS, "KeyInfo");
            if (kiNl.getLength() != 1) {
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.