Package org.apache.axiom.om.impl.builder

Examples of org.apache.axiom.om.impl.builder.StAXBuilder


    private SOAPEnvelope getSoapEnvelope(String soapEnvelpe) {
        try {
            XMLStreamReader xmlReader =
                    StAXUtils.createXMLStreamReader(new ByteArrayInputStream(soapEnvelpe.getBytes()));
            StAXBuilder builder = new StAXSOAPModelBuilder(xmlReader);
            SOAPEnvelope soapEnvelope = (SOAPEnvelope) builder.getDocumentElement();
            soapEnvelope.build();
            String soapNamespace = soapEnvelope.getNamespace().getNamespaceURI();
            if (soapEnvelope.getHeader() == null) {
                SOAPFactory soapFactory = null;
                if (soapNamespace.equals(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)) {
View Full Code Here


                                    if (activity != null) {
                                        activityID = activity.get("ActivityID");
                                    }
                                }

                                StAXBuilder builder = new StAXOMBuilder(byteArrayInputStream);
                                OMElement root = builder.getDocumentElement();
                                Map<XPathConfigData, String> xpathEvaluations = new HashMap<XPathConfigData, String>();

                                for (XPathConfigData xpathExp : xpathExps) {
                                    AXIOMXPath xpath = new AXIOMXPath(xpathExp.getXpath());
                                    String[] namespaces = xpathExp.getNameSpaces();
View Full Code Here

        try {
            in.reset();
        } catch (IOException ignore) {}
        XMLStreamReader xmlreader =
            StAXUtils.createXMLStreamReader(in, MessageContext.DEFAULT_CHAR_SET_ENCODING);
        StAXBuilder builder = new StAXSOAPModelBuilder(xmlreader, namespace);
        return (SOAPEnvelope) builder.getDocumentElement();
    }
View Full Code Here

                            .getMessageForMessageID(Integer
                                    .parseInt(messageIds[index].getMessageId()));

                    if (messages != null && messages.length > 0
                            && messages[0].getMessage() != "") {
                        StAXBuilder builder = new StAXOMBuilder(
                                new ByteArrayInputStream(messages[0]
                                        .getMessage().getBytes()));
                        OMElement root = builder.getDocumentElement();

                        List nodes;

                        if (root != null) {
                            nodes = xpath.selectNodes(root);
View Full Code Here

                            .getMessageForMessageID(Integer
                                    .parseInt(messageIds[index].getMessageId()));

                    if (messages != null && messages.length > 0
                            && messages[0].getMessage() != "") {
                        StAXBuilder builder = new StAXOMBuilder(
                                new ByteArrayInputStream(messages[0]
                                        .getMessage().getBytes()));
                        OMElement root = builder.getDocumentElement();

                        List nodes;

                        if (root != null) {
                            nodes = xpath.selectNodes(root);
View Full Code Here

                            .getMessageForMessageID(Integer
                                    .parseInt(messageIds[index].getMessageId()));

                    if (messages != null && messages.length > 0
                            && messages[0].getMessage() != "") {
                        StAXBuilder builder = new StAXOMBuilder(
                                new ByteArrayInputStream(messages[0]
                                        .getMessage().getBytes()));
                        OMElement root = builder.getDocumentElement();

                        List nodes;

                        if (root != null) {
                            nodes = xpath.selectNodes(root);
View Full Code Here

            AXIOMXPath xpath = new AXIOMXPath(xpathExpression);
            MessageData[] messages = stub.getAllMessages();

            if (messages != null && messages.length > 0) {
                for (MessageData message : messages) {
                    StAXBuilder builder = new StAXOMBuilder(
                            new ByteArrayInputStream(message.getMessageBody().getBytes()));
                    OMElement root = builder.getDocumentElement();

                    List<OMContainer> nodes;

                    if(root != null) {
                        nodes = xpath.selectNodes(root);
View Full Code Here

                                (String) messageContext.getProperty(Constants.Configuration.CHARACTER_SET_ENCODING));
                    } else {
                        xmlReader = StAXUtils.createXMLStreamReader(StAXParserConfiguration.SOAP,
                                pushbackInputStream, (String) messageContext.getProperty(Constants.Configuration.CHARACTER_SET_ENCODING));
                    }
                    StAXBuilder builder = new StAXOMBuilder(xmlReader);
                    OMNodeEx documentElement = (OMNodeEx) builder.getDocumentElement();
                    documentElement.setParent(null);
                    SOAPBody body = soapEnvelope.getBody();
                    body.addChild(documentElement);

                }
View Full Code Here

        }
    }

    public static StAXBuilder getPOXBuilder(InputStream inStream, String charSetEnc)
            throws XMLStreamException {
        StAXBuilder builder;
        // We use the StAXParserConfiguration.SOAP here as well because we don't want to allow
        // document type declarations (that potentially reference external entities), even
        // in plain XML messages.
        XMLStreamReader xmlreader =
                StAXUtils.createXMLStreamReader(StAXParserConfiguration.SOAP, inStream, charSetEnc);
View Full Code Here

    public static StAXBuilder getAttachmentsBuilder(MessageContext msgContext,
                                                    InputStream inStream, String contentTypeString,
                                                    boolean isSOAP)
            throws OMException, XMLStreamException, FactoryConfigurationError {
        StAXBuilder builder = null;
        XMLStreamReader streamReader;

        Attachments attachments = createAttachmentsMap(msgContext, inStream, contentTypeString);
        String charSetEncoding = getCharSetEncoding(attachments.getSOAPPartContentType());
View Full Code Here

TOP

Related Classes of org.apache.axiom.om.impl.builder.StAXBuilder

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.