Package org.apache.axis2.om.impl

Examples of org.apache.axis2.om.impl.OMOutputImpl


        omOutput.flush();
    }

    public void serialize(Writer writer, OMOutputFormat format)
            throws XMLStreamException {
        OMOutputImpl omOutput = new OMOutputImpl(XMLOutputFactory.newInstance()
                .createXMLStreamWriter(writer));
        omOutput.setOutputFormat(format);
        serialize(omOutput);
        omOutput.flush();
    }
View Full Code Here


        omOutput.flush();
    }

    public void serializeAndConsume(OutputStream output, OMOutputFormat format)
            throws XMLStreamException {
        OMOutputImpl omOutput = new OMOutputImpl(output, format);
        serializeAndConsume(omOutput);
        omOutput.flush();
    }
View Full Code Here

        omOutput.flush();
    }

    public void serializeAndConsume(Writer writer, OMOutputFormat format)
            throws XMLStreamException {
        OMOutputImpl omOutput = new OMOutputImpl(XMLOutputFactory.newInstance()
                .createXMLStreamWriter(writer));
        omOutput.setOutputFormat(format);
        serializeAndConsume(omOutput);
        omOutput.flush();
    }
View Full Code Here

//            e.printStackTrace();
//        }
//    }

    private void printElement(OMElement element) throws XMLStreamException {
        OMOutputImpl output = new OMOutputImpl(System.out, false);
        element.serializeWithCache(output);
        output.flush();
    }
View Full Code Here

        SOAPEnvelope result =
                inOutMEPClient.invokeBlockingWithEnvelopeOut(
                        operationName.getLocalPart(), payload);
//        assertEquals("SOAP Version received is not compatible", SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI, result.getNamespace().getName());
        try {
            OMOutputImpl output = new org.apache.axis2.om.impl.OMOutputImpl(System.out, false);
            result.serializeWithCache(output);
            output.flush();
        } catch (XMLStreamException e) {
            log.info(e.getMessage());
        }

        inOutMEPClient.close();
View Full Code Here

            SOAPComparator soapComparator = new SOAPComparator();
            //ignore elements that belong to the addressing namespace
            soapComparator.addIgnorableNamespace("http://schemas.xmlsoap.org/ws/2004/08/addressing");
//            ////////////////////////////////////////////////////
            System.out.println("######################################################");
            OMOutputImpl omOutput = new OMOutputImpl(System.out,false);
            requiredMessageEnvelope.serializeWithCache(omOutput);
            omOutput.flush();
            System.out.println("");
            System.out.println("-------------------------------------------------------");
           OMOutputImpl omOutput1 = new OMOutputImpl(System.out,false);
            replyMessageEnvelope.serializeWithCache(omOutput1);
            omOutput1.flush();
            System.out.println("");
                   System.out.println("`######################################################");
            /////////////////////////////////////////////////////

View Full Code Here

        OMElement person = (OMElement)result.getFirstChild();
        assertEquals(person.getLocalName(),"person");

        StringWriter writer = new StringWriter();
        result.build();
        result.serializeWithCache(new OMOutputImpl(XMLOutputFactory.newInstance().createXMLStreamWriter(writer)));
        writer.flush();
        call.close();
    }
View Full Code Here

     * @throws javax.xml.stream.XMLStreamException
     *
     * @see #serializeWithCache(org.apache.axis2.om.impl.OMOutputImpl)
     */
    public void serializeWithCache(XMLStreamWriter xmlWriter) throws XMLStreamException {
        OMOutputImpl omOutput = new OMOutputImpl(xmlWriter);
        serializeWithCache(omOutput);
        omOutput.flush();
    }
View Full Code Here

     * @throws javax.xml.stream.XMLStreamException
     *
     * @see #serialize(org.apache.axis2.om.impl.OMOutputImpl)
     */
    public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException {
        OMOutputImpl omOutput = new OMOutputImpl(xmlWriter);
        serialize(omOutput);
        omOutput.flush();
    }
View Full Code Here

    public void testImageSampleSerialize() throws Exception {

        outMTOMFile = new File(outFileName);
        outBase64File = new File(outBase64FileName);
        org.apache.axis2.om.impl.OMOutputImpl mtomOutput = new OMOutputImpl(new FileOutputStream(outMTOMFile),
                true);
        org.apache.axis2.om.impl.OMOutputImpl baseOutput = new OMOutputImpl(new FileOutputStream(outBase64File),
                false);

        OMNamespaceImpl soap = new OMNamespaceImpl(
                "http://schemas.xmlsoap.org/soap/envelope/", "soap");
        OMElement envelope = new OMElementImpl("Envelope", soap);
        OMElement body = new OMElementImpl("Body", soap);

        OMNamespaceImpl dataName = new OMNamespaceImpl(
                "http://www.example.org/stuff", "m");
        OMElement data = new OMElementImpl("data", dataName);

        expectedImage =
                new ImageIO().loadImage(
                        new FileInputStream(
                                getTestResourceFile(imageInFileName)));
        ImageDataSource dataSource = new ImageDataSource("WaterLilies.jpg",
                expectedImage);
        expectedDH = new DataHandler(dataSource);
        OMText binaryNode = new OMTextImpl(expectedDH, true);

        envelope.addChild(body);
        body.addChild(data);
        data.addChild(binaryNode);

        envelope.serialize(baseOutput);
        baseOutput.flush();

        envelope.serialize(mtomOutput);
        mtomOutput.flush();
    }
View Full Code Here

TOP

Related Classes of org.apache.axis2.om.impl.OMOutputImpl

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.