public void applyPolicy(AxisDescription axisDescription, Element policy) { try { OMElement policyElement = (OMElement) new OMDOMFactory().getDocument().importNode(policy, true); axisDescription.applyPolicy(PolicyEngine.getPolicy(policyElement)); } catch (Exception e) { // TODO Handle exception properly throw new AssertionError(e); } }
/** * Applies the policies on the Description Hierarchy recursively. * * @throws AxisFault an error occurred applying the policy */ public void applyPolicy() throws AxisFault { AxisConfiguration configuration = getAxisConfiguration(); if (configuration == null) { return; } Policy applicablePolicy = getApplicablePolicy(this); if (applicablePolicy != null) { engageModulesForPolicy(applicablePolicy, configuration); } for (Iterator<? extends AxisDescription> children = getChildren(); children.hasNext();) { AxisDescription child = children.next(); child.applyPolicy(); } }
/** * Applies the policies on the Description Hierarchy recursively. * * @throws AxisFault an error occurred applying the policy */ public void applyPolicy() throws AxisFault { AxisConfiguration configuration = getAxisConfiguration(); if (configuration == null) { return; } Policy applicablePolicy = getApplicablePolicy(this); if (applicablePolicy != null) { engageModulesForPolicy(applicablePolicy, configuration); } for (Iterator<? extends AxisDescription> children = getChildren(); children.hasNext();) { AxisDescription child = children.next(); child.applyPolicy(); } }
/** * This method sets the policy as the default of this AxisDescription instance. Further more * this method does the followings. <p/> (1) Engage whatever modules necessary to execute new * the effective policy of this AxisDescription instance. (2) Disengage whatever modules that * are not necessary to execute the new effective policy of this AxisDescription instance. (3) * Check whether each module can execute the new effective policy of this AxisDescription * instance. (4) If not throw an AxisFault to notify the user. (5) Else notify each module about * the new effective policy. * * @param policy the new policy of this AxisDescription instance. The effective policy is the * merge of this argument with effective policy of parent of this * AxisDescription. * @throws AxisFault if any module is unable to execute the effective policy of this * AxisDescription instance successfully or no module to execute some portion * (one or more PrimtiveAssertions ) of that effective policy. */ public void applyPolicy(Policy policy) throws AxisFault { // sets AxisDescription policy getPolicySubject().clear(); getPolicySubject().attachPolicy(policy); /* * now we try to engage appropriate modules based on the merged policy * of axis description object and the corresponding axis binding * description object. */ applyPolicy(); }
/** * This method sets the policy as the default of this AxisDescription instance. Further more * this method does the followings. <p/> (1) Engage whatever modules necessary to execute new * the effective policy of this AxisDescription instance. (2) Disengage whatever modules that * are not necessary to execute the new effective policy of this AxisDescription instance. (3) * Check whether each module can execute the new effective policy of this AxisDescription * instance. (4) If not throw an AxisFault to notify the user. (5) Else notify each module about * the new effective policy. * * @param policy the new policy of this AxisDescription instance. The effective policy is the * merge of this argument with effective policy of parent of this * AxisDescription. * @throws AxisFault if any module is unable to execute the effective policy of this * AxisDescription instance successfully or no module to execute some portion * (one or more PrimtiveAssertions ) of that effective policy. */ public void applyPolicy(Policy policy) throws AxisFault { // sets AxisDescription policy getPolicySubject().clear(); getPolicySubject().attachPolicy(policy); /* * now we try to engage appropriate modules based on the merged policy * of axis description object and the corresponding axis binding * description object. */ applyPolicy(); }