Examples of PolicyInclude


Examples of org.apache.axis2.description.PolicyInclude

        faultyServices = new Hashtable();
        faultyModules = new Hashtable();
        observersList = new ArrayList();
        inPhasesUptoAndIncludingPostDispatch = new ArrayList();

        policyInclude = new PolicyInclude();

        systemClassLoader = Thread.currentThread().getContextClassLoader();
        serviceClassLoader = Thread.currentThread().getContextClassLoader();
        moduleClassLoader = Thread.currentThread().getContextClassLoader();
View Full Code Here

Examples of org.apache.axis2.description.PolicyInclude

       
        if (axisServiceGroup == null) {
            axisConfiguration = axisServiceGroup.getParent();
        }

        PolicyInclude servicePolicyInclude = axisService.getPolicyInclude();

        List policyList;

        // Policies defined in Axis2.xml
        if (axisConfiguration != null) {
        policyList = axisConfiguration.getPolicyInclude().getPolicyElements(
                PolicyInclude.AXIS_POLICY);
        addPolicyAsExtElements(description, policyList, wsdlService,
                servicePolicyInclude);
        }

        // Policies defined in wsdl:Service
        policyList = servicePolicyInclude
                .getPolicyElements(PolicyInclude.SERVICE_POLICY);
        addPolicyAsExtElements(description, policyList, wsdlService,
                servicePolicyInclude);

        Iterator wsdlEndpoints = wsdlService.getEndpoints().values().iterator();
View Full Code Here

Examples of org.apache.axis2.description.PolicyInclude

        populatePolicy(description, wsdlEndpoint, axisService);
    }

    private static void populatePolicy(WSDLDescription description,
                                       WSDLEndpoint wsdlEndpoint, AxisService axisService) {
        PolicyInclude policyInclude = axisService.getPolicyInclude();
        List policyList = policyInclude
                .getPolicyElements(PolicyInclude.PORT_POLICY);
        addPolicyAsExtElements(description, policyList, wsdlEndpoint,
                policyInclude);

        WSDLBinding wsdlBinding = wsdlEndpoint.getBinding();
View Full Code Here

Examples of org.apache.axis2.description.PolicyInclude

    }

    private static void populatePolicy(WSDLDescription description,
                                       WSDLInterface wsdlInterface, AxisService axisService) {
        PolicyInclude policyInclude = axisService.getPolicyInclude();
        List policyList = policyInclude
                .getPolicyElements(PolicyInclude.PORT_TYPE_POLICY);
        addPolicyAsExtAttributes(description, policyList, wsdlInterface,
                policyInclude);

        Iterator wsdlOperations = wsdlInterface.getOperations().values()
View Full Code Here

Examples of org.apache.axis2.description.PolicyInclude

    }

    private static void populatePolicy(WSDLDescription description,
                                       WSDLOperation wsdlOperation, AxisOperation axisOperation) {

        PolicyInclude policyInclude = axisOperation.getPolicyInclude();

        // wsdl:PortType -> wsdl:Operation
        List policyList = policyInclude
                .getPolicyElements(PolicyInclude.OPERATION_POLICY);
        addPolicyAsExtElements(description, policyList, wsdlOperation,
                policyInclude);

        if (WSDLConstants.MEP_URI_IN_ONLY.equals(axisOperation
                .getMessageExchangePattern())) {
            AxisMessage input = axisOperation
                    .getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
            PolicyInclude policyInclude2 = input.getPolicyInclude();

            // wsdl:PortType -> wsdl:Operation -> wsdl:Input
            List policyList2 = policyInclude2
                    .getPolicyElements(PolicyInclude.INPUT_POLICY);
            addPolicyAsExtAttributes(description, policyList2, wsdlOperation
                    .getInputMessage(), policyInclude2);

        } else if (WSDLConstants.MEP_URI_IN_OUT.equals(axisOperation
                .getMessageExchangePattern())) {
            PolicyInclude policyInclude2;
            List policyList2;

            AxisMessage input = axisOperation
                    .getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
            policyInclude2 = input.getPolicyInclude();

            // wsdl:PortType -> wsdl:Operation -> wsdl:Input
            policyList2 = policyInclude2
                    .getPolicyElements(PolicyInclude.INPUT_POLICY);
            addPolicyAsExtAttributes(description, policyList2, wsdlOperation
                    .getInputMessage(), policyInclude2);

            AxisMessage output = axisOperation
                    .getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
            policyInclude2 = output.getPolicyInclude();

            // wsdl:PortType -> wsdl:Operation -> wsdl:Output
            policyList2 = policyInclude2
                    .getPolicyElements(PolicyInclude.OUTPUT_POLICY);
            addPolicyAsExtAttributes(description, policyList2, wsdlOperation
                    .getOutputMessage(), policyInclude2);
        }
    }
View Full Code Here

Examples of org.apache.axis2.description.PolicyInclude

        }
    }

    private static void populatePolicy(WSDLDescription description,
                                       WSDLBinding wsdlBinding, AxisService axisService) {
        PolicyInclude policyInclude = axisService.getPolicyInclude();

        List policyList = policyInclude
                .getPolicyElements(PolicyInclude.AXIS_SERVICE_POLICY);
        addPolicyAsExtElements(description, policyList, wsdlBinding,
                policyInclude);

        policyList = policyInclude
                .getPolicyElements(PolicyInclude.BINDING_POLICY);
        addPolicyAsExtElements(description, policyList, wsdlBinding,
                policyInclude);

        Iterator wsdlOperations = wsdlBinding.getBindingOperations().values()
View Full Code Here

Examples of org.apache.axis2.description.PolicyInclude

    private static void populatePolicy(WSDLDescription description,
                                       WSDLBindingOperation wsdlBindingOperation,
                                       AxisOperation axisOperation) {

        PolicyInclude policyInclude = axisOperation.getPolicyInclude();
        List policyList = policyInclude
                .getPolicyElements(PolicyInclude.BINDING_OPERATION_POLICY);
        addPolicyAsExtElements(description, policyList, wsdlBindingOperation,
                policyInclude);

        //
        policyList = policyInclude
                .getPolicyElements(PolicyInclude.AXIS_OPERATION_POLICY);
        addPolicyAsExtElements(description, policyList, wsdlBindingOperation,
                policyInclude);

        if (WSDLConstants.MEP_URI_IN_ONLY.equals(axisOperation
                .getMessageExchangePattern())) {
            AxisMessage input = axisOperation
                    .getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
            PolicyInclude policyInclude2 = input.getPolicyInclude();

            // wsdl:Binding -> wsdl:Operation -> wsdl:Input
            List policyList2 = policyInclude2
                    .getPolicyElements(PolicyInclude.INPUT_POLICY);
            addPolicyAsExtElements(description, policyList2,
                    wsdlBindingOperation.getInput(), policyInclude2);

            //
            policyList2 = policyInclude2
                    .getPolicyElements(PolicyInclude.AXIS_MESSAGE_POLICY);
            addPolicyAsExtElements(description, policyList2,
                    wsdlBindingOperation.getInput(), policyInclude2);

        } else if (WSDLConstants.MEP_URI_IN_OUT.equals(axisOperation
                .getMessageExchangePattern())) {
            PolicyInclude policyInclude2;
            List policyList2;

            AxisMessage input = axisOperation
                    .getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
            policyInclude2 = input.getPolicyInclude();

            // wsdl:Binding -> wsdl:Operation -> wsdl:Input
            policyList2 = policyInclude2
                    .getPolicyElements(PolicyInclude.INPUT_POLICY);
            addPolicyAsExtElements(description, policyList2,
                    wsdlBindingOperation.getInput(), policyInclude2);
            //
            policyList2 = policyInclude2
                    .getPolicyElements(PolicyInclude.AXIS_MESSAGE_POLICY);
            addPolicyAsExtElements(description, policyList2,
                    wsdlBindingOperation.getInput(), policyInclude2);

            AxisMessage output = axisOperation
                    .getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
            policyInclude2 = output.getPolicyInclude();

            // wsdl:Binding -> wsdl:Operation -> wsdl:Output
            policyList2 = policyInclude2
                    .getPolicyElements(PolicyInclude.OUTPUT_POLICY);
            addPolicyAsExtElements(description, policyList2,
                    wsdlBindingOperation.getOutput(), policyInclude2);
            //
            policyList2 = policyInclude2
                    .getPolicyElements(PolicyInclude.AXIS_MESSAGE_POLICY);
            addPolicyAsExtElements(description, policyList2,
                    wsdlBindingOperation.getInput(), policyInclude2);
        }
    }
View Full Code Here

Examples of org.apache.axis2.description.PolicyInclude

                    loadModuleClass(module, moduleClass);
                }
            }

            // setting the PolicyInclude
            PolicyInclude policyInclude;

            if (axisConfig != null) {
                PolicyInclude parent = axisConfig.getPolicyInclude();
                policyInclude = new PolicyInclude(parent);

            } else {
                policyInclude = new PolicyInclude();
            }
            module.setPolicyInclude(policyInclude);

            // processing <wsp:Policy> .. </..> elements
            Iterator policyElements = moduleElement.getChildrenWithName(new QName(POLICY_NS_URI, TAG_POLICY));
View Full Code Here

Examples of org.apache.axis2.description.PolicyInclude

            if (hostElement != null) {
                processHostCongiguration(hostElement, axisConfig);
            }

            // setting the PolicyInclude
            PolicyInclude policyInclude = new PolicyInclude();
            axisConfig.setPolicyInclude(policyInclude);

            // processing <wsp:Policy> .. </..> elements
            Iterator policyElements = config_element.getChildrenWithName(new QName(POLICY_NS_URI,
                    TAG_POLICY));
View Full Code Here

Examples of org.apache.axis2.description.PolicyInclude

        return baos.toString();
    }

    public static String generateId(AxisDescription description) {
        PolicyInclude policyInclude = description.getPolicyInclude();
        String identifier = "-policy-1";

        if (description instanceof AxisMessage) {
            identifier = "msg-" + ((AxisMessage) description).getName() + identifier;
            description = description.getParent();
        }

        if (description instanceof AxisOperation) {
            identifier = "op-" + ((AxisOperation) description).getName() + identifier;
            description = description.getParent();
        }

        if (description instanceof AxisService) {
            identifier = "service-" + ((AxisService) description).getName() + identifier;
        }

        /*
        *  Int 49 is the value of the Character '1'. Here we want to change '1' to '2' or
        *  '2' to '3' .. etc. to construct a unique identifier.
        */
        for (int index = 49; policyInclude.getPolicy(identifier) != null; index++) {
            identifier = identifier.replace((char) index, (char) (index + 1));
        }

        return identifier;
    }
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.