Package org.apache.axiom.om

Examples of org.apache.axiom.om.OMElement.build()


            if (builder instanceof StAXBuilder) {
                ((StAXBuilder)builder).releaseParserOnClose(true);
            }
            OMElement document = builder.getDocumentElement();
            if (document != null) {
                document.build();
            }
        }
        if (builder instanceof StAXBuilder) {
            ((StAXBuilder)builder).close();
        }
View Full Code Here


        // FIXME: [rfeng] We have to pay performance penality to build the complete OM as the operationClient.complete() will
        // release the underlying HTTP connection.
        // Force the response to be populated, see https://issues.apache.org/jira/browse/TUSCANY-1541
        if (response != null) {
            response.build();
        }


        return response;
        } finally {
View Full Code Here

            if (builder instanceof StAXBuilder) {
                ((StAXBuilder)builder).releaseParserOnClose(true);
            }
            OMElement document = builder.getDocumentElement();
            if (document != null) {
                document.build();
            }
        }
        if (builder instanceof StAXBuilder) {
            ((StAXBuilder)builder).close();
        }
View Full Code Here

                StAXOMBuilder builder = new StAXOMBuilder(parser);
                OMElement omElem =  builder.getDocumentElement();

                // detach from URL connection and keep in memory
                // TODO remove this
                omElem.build();

                if (xmlToObject != null) {
                    return xmlToObject.getObjectFromOMNode(omElem);
                } else {
                    return omElem;
View Full Code Here

                StAXOMBuilder builder = new StAXOMBuilder(parser);
                OMElement omElem = builder.getDocumentElement();

                // detach from URL connection and keep in memory
                // TODO remove this
                omElem.build();

                if (xmlToObject != null) {
                    return xmlToObject.getObjectFromOMNode(omElem);
                } else {
                    return omElem;
View Full Code Here

        if (urlInStream != null) {
            try {
                StAXOMBuilder builder = new StAXOMBuilder(urlInStream);
                OMElement doc = builder.getDocumentElement();
                doc.build();
                return doc;
            } catch (Exception e) {
                handleException("Error parsing resource at URL : " + url +
                                " as XML", e);
            } finally {
View Full Code Here

            StAXOMBuilder llomBuilder =
                    new StAXOMBuilder(payload.getXMLStreamReaderWithoutCaching());

            OMElement llomPayload = llomBuilder.getDocumentElement();

            llomPayload.build();

            String xml = llomPayload.toString();

            assertTrue("Conversion failed", xml.indexOf("</RequestSecurityToken>") != -1);
View Full Code Here

        // FIXME: [rfeng] We have to pay performance penalty to build the complete OM as the operationClient.complete() will
        // release the underlying HTTP connection.
        // Force the response to be populated, see https://issues.apache.org/jira/browse/TUSCANY-1541
        if (response != null) {
            response.build();
        }

        operationClient.complete(requestMC);

        return response;
View Full Code Here

    private void createPriorityConfiguration(String fileName) throws AxisFault {
        OMElement definitions = null;
        try {
            FileInputStream fis = new FileInputStream(fileName);
            definitions = new StAXOMBuilder(fis).getDocumentElement();
            definitions.build();
        } catch (FileNotFoundException e) {
            handleException("Priority configuration file cannot be found : " + fileName, e);
        } catch (XMLStreamException e) {
            handleException("Error parsing priority configuration xml file " + fileName, e);
        }
View Full Code Here

                // Workaround to prevent a bug in AXIOM where
                // there can be an incomplete OMElement as the first child body
                OMElement firstElement = env.getBody().getFirstElement();
                if (firstElement != null) {
                    firstElement.build();
                }
               
                //Get processed headers
                SOAPHeader soapHeader = env.getHeader();
                ArrayList processedHeaderQNames = new ArrayList();
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.