Examples of createWriter()


Examples of org.apache.cxf.jaxb.JAXBDataBinding.createWriter()

    }
   
    private QName getPayloadElementName(Object object) {
        JAXBDataBinding dataBinding = new JAXBDataBinding();
        dataBinding.setContext(context);
        DataWriter<XMLStreamWriter> dbwriter = dataBinding.createWriter(XMLStreamWriter.class);
        StringWriter stringWriter = new StringWriter();
        XMLStreamWriter resultWriter = StaxUtils.createXMLStreamWriter(stringWriter);
        DepthXMLStreamReader reader = null;
        try {
            dbwriter.write(object, resultWriter);
View Full Code Here

Examples of org.apache.cxf.jaxb.JAXBDataBinding.createWriter()

    }
   
    private String getPayloadElementName(Object object) {
        JAXBDataBinding dataBinding = new JAXBDataBinding();
        dataBinding.setContext(context);
        DataWriter<XMLStreamWriter> dbwriter = dataBinding.createWriter(XMLStreamWriter.class);
        StringWriter stringWriter = new StringWriter();
        XMLStreamWriter resultWriter = StaxUtils.createXMLStreamWriter(stringWriter);
        try {
            dbwriter.write(object, resultWriter);
            resultWriter.flush();
View Full Code Here

Examples of org.apache.cxf.jaxb.JAXBDataBinding.createWriter()

    }
   
    private String getPayloadElementName(Object object) {
        JAXBDataBinding dataBinding = new JAXBDataBinding();
        dataBinding.setContext(context);
        DataWriter<XMLStreamWriter> dbwriter = dataBinding.createWriter(XMLStreamWriter.class);
        StringWriter stringWriter = new StringWriter();
        XMLStreamWriter resultWriter = StaxUtils.createXMLStreamWriter(stringWriter);
        try {
            dbwriter.write(object, resultWriter);
            resultWriter.flush();
View Full Code Here

Examples of org.apache.cxf.jaxb.JAXBDataWriterFactory.createWriter()

    }

    public void testWriteRPCLit1() throws Exception {
        JAXBDataWriterFactory wf = getTestWriterFactory();
       
        DataWriter<XMLStreamWriter> dw = wf.createWriter(XMLStreamWriter.class);
        assertNotNull(dw);
       
        String val = new String("TESTOUTPUTMESSAGE");
        QName elName = new QName("http://apache.org/hello_world_rpclit/types",
                                 "in");
View Full Code Here

Examples of org.apache.servicemix.soap.marshalers.SoapMarshaler.createWriter()

        SoapMarshaler marshaler = new SoapMarshaler(true, true);
        SoapMessage msg = new SoapMessage();
        Context ctx = new Context();
        ctx.setInMessage(msg);
        msg.setSource(new StringSource("<hello>world</hello>"));
        SoapWriter writer = marshaler.createWriter(ctx.getInMessage());
        W3CDOMStreamWriter domWriter = new W3CDOMStreamWriter();
        writer.writeSoapEnvelope(domWriter);
        ctx.getInMessage().setDocument(domWriter.getDocument());
       
        StandaloneCrypto crypto = new StandaloneCrypto();
View Full Code Here

Examples of org.apache.servicemix.soap.marshalers.SoapMarshaler.createWriter()

        SoapMarshaler marshaler = new SoapMarshaler(true, true);
        SoapMessage msg = new SoapMessage();
        Context ctx = new Context();
        ctx.setInMessage(msg);
        msg.setSource(new StringSource("<hello>world</hello>"));
        SoapWriter writer = marshaler.createWriter(ctx.getInMessage());
        W3CDOMStreamWriter domWriter = new W3CDOMStreamWriter();
        writer.writeSoapEnvelope(domWriter);
        ctx.getInMessage().setDocument(domWriter.getDocument());
       
        StandaloneCrypto crypto = new StandaloneCrypto();
View Full Code Here

Examples of org.beanio.StreamFactory.createWriter()

        mappingFileKey = new StreamFactoryKey(jobContext, streamMapping);
        final StreamFactory streamFactory = getStreamFactory(streamFactoryLookup, mappingFileKey, mappingProperties);
        final OutputStream outputStream = getOutputStream(CsvProperties.OVERWRITE);
        final Writer outputWriter = charset == null ? new OutputStreamWriter(outputStream) :
                new OutputStreamWriter(outputStream, charset);
        beanWriter = streamFactory.createWriter(streamName, new BufferedWriter(outputWriter));
    }

    @Override
    public void writeItems(final List<Object> items) throws Exception {
        for (final Object e : items) {
View Full Code Here

Examples of org.onebusaway.csv_entities.CsvEntityWriterFactory.createWriter()

  @Override
  public String fromObject(Object obj, String resultCode, Writer stream)
      throws IOException {
    CsvEntityWriterFactory factory = new CsvEntityWriterFactory();
    Class<?> entityType = getEntityType(obj);
    EntityHandler csvHandler = factory.createWriter(entityType, stream);

    List<?> values = getEntityValues(obj);
    for (Object value : values)
      csvHandler.handleEntity(value);
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.