Package org.apache.axis2.soap.impl.llom.builder

Examples of org.apache.axis2.soap.impl.llom.builder.StAXSOAPModelBuilder


   

    protected StAXSOAPModelBuilder getOMBuilder(InputStream in) throws Exception {
        XMLStreamReader parser = XMLInputFactory.newInstance()
                .createXMLStreamReader(in);
        builder = new StAXSOAPModelBuilder(parser, new DOMSOAPFactory(), null);
        return builder;
    }
View Full Code Here


        if(retEle!=null){
            InputStream stream = Thread.currentThread().
                    getContextClassLoader().getResourceAsStream(filepath);
            javax.xml.stream.XMLStreamReader parser =
                    XMLInputFactory.newInstance().createXMLStreamReader(stream);
            OMXMLParserWrapper builder = new StAXSOAPModelBuilder(parser, null);
            SOAPEnvelope resEnv = (SOAPEnvelope) builder.getDocumentElement();
            OMElement resElementtobe = resEnv.getBody().getFirstElement();
            XMLComparatorInterop comparator = new XMLComparatorInterop();
            compare = comparator.compare(retEle,resElementtobe);
        }
        return compare;
View Full Code Here

        if(retEle!=null) {
            InputStream stream = Thread.currentThread().
                    getContextClassLoader().getResourceAsStream(filePath);
            javax.xml.stream.XMLStreamReader parser =
                    XMLInputFactory.newInstance().createXMLStreamReader(stream);
            OMXMLParserWrapper builder = new StAXSOAPModelBuilder(parser, null);
            SOAPEnvelope resEnv = (SOAPEnvelope) builder.getDocumentElement();
            OMElement resElementtobe = resEnv.getBody().getFirstElement();
            XMLComparatorInterop comparator = new XMLComparatorInterop();
            compare = comparator.compare(retEle,resElementtobe);

        }
View Full Code Here

        boolean compare=false;
        if(retEle!=null){
             InputStream stream = Thread.currentThread()
                     .getContextClassLoader().getResourceAsStream(filepath);
            javax.xml.stream.XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(stream);
            OMXMLParserWrapper builder = new StAXSOAPModelBuilder(parser, null);
            SOAPEnvelope resEnv = (SOAPEnvelope) builder.getDocumentElement();
            OMElement resElementtobe = resEnv.getBody().getFirstElement();
            XMLComparator comparator = new XMLComparator();
            compare = comparator.compare(retEle,resElementtobe);
        }
        return compare;
View Full Code Here

        boolean compare=false;
        if(retEle!=null){
             InputStream stream = Thread.currentThread()
                     .getContextClassLoader().getResourceAsStream(filepath);
            javax.xml.stream.XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(stream);
            OMXMLParserWrapper builder = new StAXSOAPModelBuilder(parser, null);
            SOAPEnvelope resEnv = (SOAPEnvelope) builder.getDocumentElement();
            OMElement resElementtobe = resEnv.getBody().getFirstElement();
            XMLComparatorInterop comparator = new XMLComparatorInterop();
            compare = comparator.compare(retEle,resElementtobe);
        }
        return compare;
View Full Code Here

            throw new Exception("A SOAP file name must be provided !!");
        }
        XMLStreamReader parser = XMLInputFactory.newInstance()
                .createXMLStreamReader(new FileReader(getTestResourceFile(fileName)));

        return (SOAPEnvelope) new StAXSOAPModelBuilder(parser, null).getDocumentElement();
    }
View Full Code Here

    protected void setUp() throws Exception {
        File file = getTestResourceFile(TestConstants.SAMPLE1);
        XMLStreamReader parser = XMLInputFactory.newInstance()
                .createXMLStreamReader(new FileReader(file));
        fac = OMAbstractFactory.getSOAP11Factory();
        OMXMLParserWrapper builder = new StAXSOAPModelBuilder(parser, null);
        envelope = (SOAPEnvelope) builder.getDocumentElement();
    }
View Full Code Here

        XMLStreamReader xmlStreamReader = XMLInputFactory.newInstance().
                createXMLStreamReader(
                        new FileReader(
                                getTestResourceFile(TestConstants.SOAP_SOAPMESSAGE1)));
        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
        builder = new StAXSOAPModelBuilder(xmlStreamReader, null);
        envelope = (SOAPEnvelope) builder.getDocumentElement();
        tempFile = File.createTempFile("temp", "xml");
        output =
                XMLOutputFactory.newInstance().createXMLStreamWriter(
                        new FileOutputStream(tempFile));
View Full Code Here

     * @param parser
     * @return
     */
    public static StAXSOAPModelBuilder createStAXSOAPModelBuilder(
            SOAPFactory soapFactory, XMLStreamReader parser) {
        return new StAXSOAPModelBuilder(parser, soapFactory, null);
    }
View Full Code Here

                        boolean isBodyStream) throws SOAPException {

        setMimeHeader(HTTPConstants.HEADER_CONTENT_ID,
                SessionUtils.generateSessionId());
        setMimeHeader(HTTPConstants.HEADER_CONTENT_TYPE, "text/xml");
        StAXSOAPModelBuilder stAXSOAPModelBuilder;

        msgObject = parent;
        try {
            if (initialContents instanceof SOAPEnvelope) {
                ((SOAPEnvelopeImpl) initialContents).setOwnerDocument(this);
                envelope = initialContents;
            } else if (initialContents instanceof InputStream) {
                //XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader((InputStream)initialContents);
                InputStreamReader inr = new InputStreamReader(
                        (InputStream) initialContents);
                stAXSOAPModelBuilder =
                        new StAXSOAPModelBuilder(
                                XMLInputFactory.newInstance()
                        .createXMLStreamReader(inr), null);
                org.apache.axis2.soap.SOAPEnvelope omEnv = stAXSOAPModelBuilder.getSOAPEnvelope();
                envelope = new SOAPEnvelopeImpl(omEnv);
                ((SOAPEnvelopeImpl) envelope).setOwnerDocument(this);
            }

        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.apache.axis2.soap.impl.llom.builder.StAXSOAPModelBuilder

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.