Package org.apache.axiom.om

Examples of org.apache.axiom.om.OMMetaFactory


        soapMessage = parentSoapMsg;

        String charset;
        boolean isMTOM;
        String soapEnvelopeNamespaceURI;
        OMMetaFactory metaFactory = OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM);
        SOAPFactory soapFactory;
        if (contentType == null) {
            charset = null;
            isMTOM = false;
            soapFactory = metaFactory.getSOAP11Factory();
            soapEnvelopeNamespaceURI = null;
        } else {
            String baseType = contentType.getBaseType().toLowerCase();
            String soapContentType;
            if (baseType.equals(MTOMConstants.MTOM_TYPE)) {
                isMTOM = true;
                String typeParam = contentType.getParameter("type");
                if (typeParam == null) {
                    throw new SOAPException("Missing 'type' parameter in XOP content type");
                } else {
                    soapContentType = typeParam.toLowerCase();
                }
            } else {
                isMTOM = false;
                soapContentType = baseType;
            }
           
            if (soapContentType.equals(HTTPConstants.MEDIA_TYPE_TEXT_XML)) {
                soapEnvelopeNamespaceURI = SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI;
                soapFactory = metaFactory.getSOAP11Factory();
            } else if (soapContentType.equals(HTTPConstants.MEDIA_TYPE_APPLICATION_SOAP_XML)) {
                soapEnvelopeNamespaceURI = SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI;
                soapFactory = metaFactory.getSOAP12Factory();
            } else {
                throw new SOAPException("Unrecognized content type '" + soapContentType + "'");
            }
           
            charset = contentType.getParameter("charset");
View Full Code Here

TOP

Related Classes of org.apache.axiom.om.OMMetaFactory

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.