Examples of createXMLEventWriter()


Examples of javax.xml.stream.XMLOutputFactory.createXMLEventWriter()

            // Check to see if we have an input or output message and handle the return type
            // appropriately
            boolean isInputMessage = (Boolean) mc.get(ObjectMessageContext.MESSAGE_INPUT);
            if (!isInputMessage && callback.getWebResult() != null && !hasOutParamReturn) {
                ByteArrayOutputStream outStream = new ByteArrayOutputStream();
                XMLEventWriter evtWriter = outputFactory.createXMLEventWriter(outStream);
                writer.write(objContext.getReturn(), callback.getWebResultQName(), evtWriter);

                ByteArrayInputStream inStream = new ByteArrayInputStream(outStream.toByteArray());
                XMLEventReader evtReader = inputFactory.createXMLEventReader(inStream);
                CorbaObjectHandler obj = readObjectFromStax(evtReader,
View Full Code Here

Examples of javax.xml.stream.XMLOutputFactory.createXMLEventWriter()

            Object faultInfo = faultInfoMethod.invoke(except);
            WebFault wfAnnotation = except.getClass().getAnnotation(WebFault.class);
            QName elName = new QName(wfAnnotation.targetNamespace(), except.getClass().getSimpleName());
           
            ByteArrayOutputStream outStream = new ByteArrayOutputStream();
            XMLEventWriter evtWriter = outputFactory.createXMLEventWriter(outStream);
            writer.write(faultInfo, elName, evtWriter);
           
            QName exIdlType = null;
            List<RaisesType> exList = opElement.getRaises();
            for (Iterator<RaisesType> iter = exList.iterator(); iter.hasNext();) {
View Full Code Here

Examples of javax.xml.stream.XMLOutputFactory.createXMLEventWriter()

            // Check to see if we have an input or output message and handle the return type
            // appropriately
            boolean isInputMessage = (Boolean) mc.get(ObjectMessageContext.MESSAGE_INPUT);
            if (!isInputMessage && callback.getWebResult() != null && !hasOutParamReturn) {
                ByteArrayOutputStream outStream = new ByteArrayOutputStream();
                XMLEventWriter evtWriter = outputFactory.createXMLEventWriter(outStream);
                writeObjectToStax(corbaCtx.getMessage().getStreamableReturn().getObject(),
                                  evtWriter, XMLEventFactory.newInstance(), false);
                evtWriter.flush();

                ByteArrayInputStream inStream = new ByteArrayInputStream(outStream.toByteArray());
View Full Code Here

Examples of javax.xml.stream.XMLOutputFactory.createXMLEventWriter()

      if(filePath == null)
                return;
        }

        eventWriter = outputFactory.createXMLEventWriter(new FileOutputStream(filePath));
        XMLEventFactory eventFactory = XMLEventFactory.newInstance();
        XMLEvent end = eventFactory.createDTD("\n");
        XMLEvent tab = eventFactory.createDTD("\t");
        XMLEvent tab2 = eventFactory.createDTD("\t\t");
        XMLEvent tab3 = eventFactory.createDTD("\t\t\t");
View Full Code Here

Examples of javax.xml.stream.XMLOutputFactory.createXMLEventWriter()

public class CreateXMLEventWriterWithNullEncodingTestCase extends DialectTestCase {
    protected void runTest() throws Throwable {
        XMLOutputFactory factory = newNormalizedXMLOutputFactory();
        // This should cause an exception
        try {
            factory.createXMLEventWriter(System.out, null);
        } catch (Throwable ex) {
            // Expected
            return;
        }
        // Attention here: since the fail method works by throwing an exception and we
View Full Code Here

Examples of javax.xml.stream.XMLOutputFactory.createXMLEventWriter()

    @Converter
    public XMLEventWriter createXMLEventWriter(OutputStream out, Exchange exchange) throws XMLStreamException {
        XMLOutputFactory factory = getOutputFactory();
        try {
            return factory.createXMLEventWriter(IOHelper.buffered(out), IOHelper.getCharsetName(exchange));
        } finally {
            returnXMLOutputFactory(factory);
        }
    }
   
View Full Code Here

Examples of javax.xml.stream.XMLOutputFactory.createXMLEventWriter()

   
    @Converter
    public XMLEventWriter createXMLEventWriter(Writer writer) throws XMLStreamException {
        XMLOutputFactory factory = getOutputFactory();
        try {
            return factory.createXMLEventWriter(IOHelper.buffered(writer));
        } finally {
            returnXMLOutputFactory(factory);
        }
    }
View Full Code Here

Examples of javax.xml.stream.XMLOutputFactory.createXMLEventWriter()

                //FIXME - if not woodstox, this will likely not work well
                //likely should copy CXF's W3CDOM stuff
                LOG.info("DOMResult is known to have issues with {0}. We suggest using Woodstox",
                         factory.getClass());
            }
            return factory.createXMLEventWriter(result);
        } finally {
            returnXMLOutputFactory(factory);
        }
    }
   
View Full Code Here

Examples of javax.xml.stream.XMLOutputFactory.createXMLEventWriter()

    @Converter
    public XMLEventWriter createXMLEventWriter(OutputStream out, Exchange exchange) throws XMLStreamException {
        XMLOutputFactory factory = getOutputFactory();
        try {
            return factory.createXMLEventWriter(IOHelper.buffered(out), IOHelper.getCharsetName(exchange));
        } finally {
            returnXMLOutputFactory(factory);
        }
    }
   
View Full Code Here

Examples of javax.xml.stream.XMLOutputFactory.createXMLEventWriter()

   
    @Converter
    public XMLEventWriter createXMLEventWriter(Writer writer) throws XMLStreamException {
        XMLOutputFactory factory = getOutputFactory();
        try {
            return factory.createXMLEventWriter(IOHelper.buffered(writer));
        } finally {
            returnXMLOutputFactory(factory);
        }
    }
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.