Examples of PolicySubject


Examples of com.sun.xml.internal.ws.policy.PolicySubject

            }
            if ((mtomFeature != null) && mtomFeature.isEnabled()) {
                final QName bindingName = model.getBoundPortTypeName();
                final WsdlBindingSubject wsdlSubject = WsdlBindingSubject.createBindingSubject(bindingName);
                final Policy mtomPolicy = createMtomPolicy(bindingName);
                final PolicySubject mtomPolicySubject = new PolicySubject(wsdlSubject, mtomPolicy);
                subjects.add(mtomPolicySubject);
                if (LOGGER.isLoggable(Level.FINEST)) {
                    LOGGER.fine("Added MTOM policy with ID \"" + mtomPolicy.getIdOrName() + "\" to binding element \"" + bindingName + "\"");
                }
            }
View Full Code Here

Examples of com.sun.xml.ws.policy.PolicySubject

   
    final Collection<PolicySubject> getPolicySubjects() throws PolicyException {
        final Collection<Policy> policies = getPolicies();
        final Collection<PolicySubject> result =  new ArrayList<PolicySubject>(policies.size());
        for (Policy policy : policies) {
            result.add(new PolicySubject(policySubject, policy));
        }
        return result;
    }
View Full Code Here

Examples of org.apache.axis2.description.PolicySubject

      SandeshaPolicyBean parentPropertyBean) throws SandeshaException {

        boolean found = false;
        Assertion assertion = null;

        PolicySubject policySubject = desc.getPolicySubject();
        if (policySubject == null) {
            return null;
        }
        Collection<PolicyComponent> policyComponents = policySubject.getAttachedPolicyComponents();
        if (policyComponents == null) {
            return null;
        }
        Iterator<PolicyComponent> policies = policyComponents.iterator();
        while (!found && policies.hasNext()) {
View Full Code Here

Examples of org.apache.axis2.description.PolicySubject

            Map endPointMap = service.getEndpoints();
            for (Object o : endPointMap.entrySet()) {
                Map.Entry entry = (Map.Entry) o;
                AxisEndpoint point = (AxisEndpoint) entry.getValue();
                AxisBinding binding = point.getBinding();
                PolicySubject subject = binding.getPolicySubject();
                subject.detachPolicyComponent(policyKey);
            }


        } catch (Exception e) {
            String msg = "Cannot remove service policy";
View Full Code Here

Examples of org.apache.axis2.description.PolicySubject

        if (axisService == null) {
            throw new AxisFault("invalid service name");
        }

        PolicySubject servicePolicySubject = axisService.getPolicySubject();
        List<PolicyComponent> policyList =
                new ArrayList<PolicyComponent>(servicePolicySubject.getAttachedPolicyComponents());
        Policy servicePolicy = org.apache.axis2.util.PolicyUtil.getMergedPolicy(policyList,
                                                                                axisService);

        if (servicePolicy == null) {
            return PolicyUtil.getEmptyPolicyAsOMElement().toString();
View Full Code Here

Examples of org.apache.axis2.description.PolicySubject

        if (axisModule == null) {
            throw new AxisFault("invalid service name");
        }

        PolicySubject modulePolicySubject = axisModule.getPolicySubject();
        List<PolicyComponent> policyList =
                new ArrayList<PolicyComponent>(modulePolicySubject.getAttachedPolicyComponents());

        // Get the merged module policy
        Policy policy = null;
        for (Iterator iterator = policyList.iterator(); iterator.hasNext();) {
            Object policyElement = iterator.next();
            if (policyElement instanceof Policy) {
                policy = (policy == null) ? (Policy) policyElement
                                          : policy.merge((Policy) policyElement);
            } else {
                PolicyReference policyReference = (PolicyReference) policyElement;

                String key = policyReference.getURI();
                int pos = key.indexOf("#");
                if (pos == 0) {
                    key = key.substring(1);
                } else if (pos > 0) {
                    key = key.substring(0, pos);
                }

                PolicyComponent attachedPolicyComponent = modulePolicySubject
                        .getAttachedPolicyComponent(key);

                if (attachedPolicyComponent != null
                    && attachedPolicyComponent instanceof Policy) {
                    policy = (Policy) attachedPolicyComponent;
View Full Code Here

Examples of org.apache.axis2.description.PolicySubject

            throw new AxisFault("invalid service name");
        }

        AxisOperation axisOperation = axisService.getOperation(new QName(operationName));

        PolicySubject operationPolicySubject = axisOperation.getPolicySubject();
        List<PolicyComponent> policyList =
                new ArrayList<PolicyComponent>(operationPolicySubject.getAttachedPolicyComponents());
        Policy operationPolicy = org.apache.axis2.util.PolicyUtil.getMergedPolicy(policyList,
                                                                                  axisService);

        if (operationPolicy == null) {
            return PolicyUtil.getEmptyPolicyAsOMElement().toString();
View Full Code Here

Examples of org.apache.axis2.description.PolicySubject

        }

        AxisMessage axisMessage =
                axisService.getOperation(new QName(operationName)).getMessage(messageType);

        PolicySubject messagePolicySubject = axisMessage.getPolicySubject();
        List<PolicyComponent> policyList =
                new ArrayList<PolicyComponent>(messagePolicySubject.getAttachedPolicyComponents());
        Policy messagePolicy = org.apache.axis2.util.PolicyUtil.getMergedPolicy(policyList,
                                                                                axisService);

        if (messagePolicy == null) {
            return PolicyUtil.getEmptyPolicyAsOMElement().toString();
View Full Code Here

Examples of org.apache.axis2.description.PolicySubject

            throw new AxisFault("invalid service name");
        }

        ArrayList<PolicyMetaData> policyDataArray = new ArrayList<PolicyMetaData>();

        PolicySubject servicePolicySubject = axisService.getPolicySubject();
        List<PolicyComponent> policyList;

        // services.xml
        policyList = new ArrayList<PolicyComponent>(servicePolicySubject.getAttachedPolicyComponents());

        if (!policyList.isEmpty()) {
            PolicyMetaData policyData = new PolicyMetaData();
            policyData.setWrapper("Policies that are applicable for " + axisService.getName()
                                  + " service");
View Full Code Here

Examples of org.apache.axis2.description.PolicySubject

        if (axisBinding == null) {
            throw new AxisFault("invalid binding name");
        }

        PolicySubject bindingPolicy = axisBinding.getPolicySubject();
        List<PolicyComponent> policyList =
                new ArrayList<PolicyComponent>(bindingPolicy.getAttachedPolicyComponents());
        Policy servicePolicy = org.apache.axis2.util.PolicyUtil.getMergedPolicy(policyList,
                                                                                axisService);

        if (servicePolicy == null) {
            return PolicyUtil.getEmptyPolicyAsOMElement().toString();
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.