Package org.apache.axiom.soap

Examples of org.apache.axiom.soap.SOAPModelBuilder


        byte[] full = append(bytes1, bytes2);
        full = append(full, bytes3);
       
        InputStream inStream = new BufferedInputStream(new ByteArrayInputStream(full));
        Attachments attachments = new Attachments(inStream, contentTypeString);
        SOAPModelBuilder builder = OMXMLBuilderFactory.createSOAPModelBuilder(attachments);
        OMElement root = builder.getDocumentElement();
        root.build();
    }
View Full Code Here


                        "</SOAP-ENV:Fault>" +
                    "</SOAP-ENV:Body>" +
                "</SOAP-ENV:Envelope>";
        XMLStreamReader soap11Parser = StAXUtils.createXMLStreamReader(
                StAXParserConfiguration.PRESERVE_CDATA_SECTIONS, new StringReader(soap11Fault));
        SOAPModelBuilder soap11Builder = OMXMLBuilderFactory.createStAXSOAPModelBuilder(metaFactory, soap11Parser);
        OMElement element = soap11Builder.getDocumentElement();
        element.build();
        assertTrue(element instanceof SOAPEnvelope);
        SOAPEnvelope se =  (SOAPEnvelope) element;
        SOAPFault fault = se.getBody().getFault();
        SOAPFaultReason reason = fault.getReason();
View Full Code Here

            MessageContext messageContext) throws AxisFault {
        try {
            // TODO: this will be changed later (see AXIS2-5308)
            messageContext.setAttachmentMap(attachments);
           
            SOAPModelBuilder builder = OMXMLBuilderFactory.createSOAPModelBuilder(attachments);
            OMDocument document = builder.getDocument();
            String charsetEncoding = document.getCharsetEncoding();
            if (charsetEncoding == null) {
                charsetEncoding = MessageContext.UTF_8;
            }
            messageContext.setProperty(Constants.Configuration.CHARACTER_SET_ENCODING,
View Full Code Here

            if (log.isDebugEnabled()) {
                log.debug("Could not find a Builder for type (" + type + ").  Using SOAP.");
            }
            String charSetEnc = (String) msgContext
                    .getProperty(Constants.Configuration.CHARACTER_SET_ENCODING);
            SOAPModelBuilder builder = BuilderUtil.createSOAPModelBuilder(inStream, charSetEnc);
            documentElement = builder.getDocumentElement();
        }
        return documentElement;
    }
View Full Code Here

TOP

Related Classes of org.apache.axiom.soap.SOAPModelBuilder

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.