Package org.apache.axiom.om.util

Examples of org.apache.axiom.om.util.DetachableInputStream


        if (inputStream != null) {
            try {
                // Apply a detachable inputstream.  This can be used later
                // to (a) get the length of the incoming message or (b)
                // free transport resources.
                DetachableInputStream is = new DetachableInputStream(inputStream);
                messageContext.setProperty(Constants.DETACHABLE_INPUT_STREAM, is);
               
                PushbackInputStream pushbackInputStream = new PushbackInputStream(is);
                int b;
                if ((b = pushbackInputStream.read()) > 0) {
View Full Code Here


                    .getProperty(Constants.Configuration.CHARACTER_SET_ENCODING);
           
            // Apply a detachable inputstream.  This can be used later
            // to (a) get the length of the incoming message or (b)
            // free transport resources.
            DetachableInputStream is = new DetachableInputStream(inputStream);
            messageContext.setProperty(Constants.DETACHABLE_INPUT_STREAM, is);
           
            // createSOAPModelBuilder takes care of configuring the underlying parser to
            // avoid the security issue described in CVE-2010-1632
            OMXMLParserWrapper builder = OMXMLBuilderFactory.createSOAPModelBuilder(is,
View Full Code Here

            SOAPEnvelope env = createSOAPMessage(msgContext, inStream, contentType);

            // if we were told to detach, we will make the call here, this is only applicable
            // if a DetachableInputStream instance is found on the MessageContext
            if(detach) {
                DetachableInputStream dis = (DetachableInputStream) msgContext.getProperty(Constants.DETACHABLE_INPUT_STREAM);
                if(dis != null) {
                    if(log.isDebugEnabled()) {
                        log.debug("Detaching input stream after SOAPEnvelope construction");
                    }
                    dis.detach();
                }
            }
            return env;
        } catch (Exception e) {
            throw AxisFault.makeFault(e);
View Full Code Here

       public static void detachInputStream(MessageContext msgContext) throws AxisFault {
           try {
               if(msgContext != null
                       &&
                       msgContext.getProperty(Constants.DETACHABLE_INPUT_STREAM) != null) {
                   DetachableInputStream dis = (DetachableInputStream) msgContext.getProperty(Constants.DETACHABLE_INPUT_STREAM);
                   if(log.isDebugEnabled()) {
                       log.debug("Detaching DetachableInputStream: " + dis);
                   }
                   dis.detach();
               }
               else {
                   if(log.isDebugEnabled()) {
                       log.debug("Detach not performed for MessageContext: " + msgContext);
                   }
View Full Code Here

TOP

Related Classes of org.apache.axiom.om.util.DetachableInputStream

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.