Package org.apache.axiom.mime

Examples of org.apache.axiom.mime.MediaType


            charset = null;
            isMTOM = false;
            soapFactory = metaFactory.getSOAP11Factory();
            soapEnvelopeNamespaceURI = null;
        } else {
            MediaType baseType = contentType.getMediaType();
            MediaType soapContentType;
            if (baseType.equals(MediaType.APPLICATION_XOP_XML)) {
                isMTOM = true;
                String typeParam = contentType.getParameter("type");
                if (typeParam == null) {
                    throw new SOAPException("Missing 'type' parameter in XOP content type");
                } else {
                    try {
                        soapContentType = new ContentType(typeParam).getMediaType();
                    } catch (ParseException ex) {
                        throw new SOAPException("Failed to parse the 'type' parameter", ex);
                    }
                }
            } else {
                isMTOM = false;
                soapContentType = baseType;
            }
           
            if (soapContentType.equals(MediaType.TEXT_XML)) {
                soapEnvelopeNamespaceURI = SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI;
                soapFactory = metaFactory.getSOAP11Factory();
            } else if (soapContentType.equals(MediaType.APPLICATION_SOAP_XML)) {
                soapEnvelopeNamespaceURI = SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI;
                soapFactory = metaFactory.getSOAP12Factory();
            } else {
                throw new SOAPException("Unrecognized content type '" + soapContentType + "'");
            }
View Full Code Here

TOP

Related Classes of org.apache.axiom.mime.MediaType

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.