Package org.switchyard.component.soap

Examples of org.switchyard.component.soap.Feature


     * @param port The WSDL service port.
     * @param documentStyle true if it is 'document', false if 'rpc'.
     * @return the feature booleans.
     */
    public static Feature getFeature(final Definition definition, final Port port, Boolean documentStyle) {
        Feature feature = new Feature();
        Boolean addressing = false;
        Boolean mtom = false;
        List<ExtensibilityElement> extensibilityElements = getExtensibilityElements(definition);
        if (documentStyle) {
            // Check if any element uses xmime:expectedContentTypes
            for (ExtensibilityElement element : extensibilityElements) {
                if (element instanceof Schema) {
                    mtom = setMtomEnabled((Schema)element);
                    if (mtom) {
                        feature.setMtomEnabled(true);
                        break;
                    }
                }
            }
        } else {
            // Check if any part uses xmime:expectedContentTypes
            for (Message message : ((Map<String, Message>)definition.getMessages()).values()) {
                for (Part part : (List<Part>)message.getOrderedParts(null)) {
                    if (part.getExtensionAttribute(MTOM_EXPT_QNAME) != null) {
                        feature.setMtomEnabled(true);
                    }
                }
            }
        }

outer:  for (ExtensibilityElement element : (List<ExtensibilityElement>)port.getBinding().getExtensibilityElements()) {
            if (element instanceof UnknownExtensibilityElement) {
                String attrValue = null;
                Element domElement = ((UnknownExtensibilityElement)element).getElement();
                if (element.getElementType().equals(USING_WSA_QNAME)) {
                    feature.setAddressingEnabled(true);
                    setAddressingRequired(feature, domElement);
                    break;
                } else if (element.getElementType().equals(POLICY_REFERENCE_QNAME)) {
                    String uri = XMLHelper.getAttribute(domElement, WSDL11_URI, ATTR_URI);
                    /*if (uri == null) {
View Full Code Here

TOP

Related Classes of org.switchyard.component.soap.Feature

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.