Examples of Wsdl2HttpMessage


Examples of org.apache.servicemix.soap.bindings.http.model.Wsdl2HttpMessage

        if (operation instanceof Wsdl2HttpOperation == false) {
            return;
        }
        Wsdl2HttpBinding httpBinding = (Wsdl2HttpBinding) message.get(Binding.class);
        Wsdl2HttpOperation httpOperation = (Wsdl2HttpOperation) operation;
        Wsdl2HttpMessage httpMessage;
        String serialization;
        if (server) {
            httpMessage = httpOperation.getInput();
            serialization = httpOperation.getHttpInputSerialization();
        } else {
            httpMessage = httpOperation.getOutput();
            serialization = httpOperation.getHttpOutputSerialization();
        }
        if (httpMessage.getContentModel() == ContentModel.ELEMENT ||
            httpMessage.getContentModel() == ContentModel.ANY) {
            // Serialization rules for XML
            if (HttpConstants.SERIAL_APP_URLENCODED.equals(serialization)) {
                normalizeUrlEncoded(message, httpBinding, httpOperation, httpMessage);
            } else if (HttpConstants.SERIAL_MULTIPART_FORMDATA.equals(serialization)) {
                normalizeFormData(message);
            } else {
                normalizeXml(message);
            }
        } else if (httpMessage.getContentModel() == ContentModel.NONE) {
            if (message.getContent(Source.class) != null) {
                throw new Fault("No content allowed");
            }
        } else {
            throw new Fault("Unsupported content model: " + httpMessage.getContentModel());
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.