Package org.apache.ws.policy.util

Examples of org.apache.ws.policy.util.DOMPolicyReader


/*     */         }
/*     */
/* 121 */         UnifiedVirtualFile vfPolicyFile = vfRoot.findChild(policyFileLocation);
/* 122 */         is = vfPolicyFile.toURL().openStream();
/*     */
/* 124 */         DOMPolicyReader reader = (DOMPolicyReader)PolicyFactory.getPolicyReader(3);
/* 125 */         org.apache.ws.policy.Policy unnormalizedPolicy = reader.readPolicy(is);
/* 126 */         org.apache.ws.policy.Policy normPolicy = (org.apache.ws.policy.Policy)unnormalizedPolicy.normalize();
/* 127 */         log.info("Deploying Annotated Policy = " + policyFileLocation);
/* 128 */         PolicyScopeLevel scope = anPolicy.scope();
/* 129 */         if ((PolicyScopeLevel.WSDL_PORT.equals(scope)) || (PolicyScopeLevel.WSDL_PORT_TYPE.equals(scope)) || (PolicyScopeLevel.WSDL_BINDING.equals(scope)))
/*     */         {
View Full Code Here


/*     */     }
/*     */   }
/*     */
/*     */   public void processPolicyExtensions(EndpointMetaData epMetaData, WSDLDefinitions wsdlDefinitions)
/*     */   {
/* 158 */     DOMPolicyReader reader = (DOMPolicyReader)PolicyFactory.getPolicyReader(3);
/* 159 */     PolicyRegistry localPolicyRegistry = new PolicyRegistry();
/* 160 */     for (WSDLExtensibilityElement policyElement : wsdlDefinitions.getExtensibilityElements("http://www.jboss.org/jbossws/wsp/policy"))
/*     */     {
/* 162 */       org.apache.ws.policy.Policy policy = reader.readPolicy(policyElement.getElement());
/* 163 */       localPolicyRegistry.register(policy.getPolicyURI(), policy);
/*     */     }
/*     */
/* 166 */     WSDLService wsdlService = wsdlDefinitions.getService(epMetaData.getServiceMetaData().getServiceName());
/* 167 */     if (wsdlService != null)
View Full Code Here

/*     */     }
/*     */   }
/*     */
/*     */   private void processPolicies(List<WSDLExtensibilityElement> policyReferences, PolicyScopeLevel scope, PolicyRegistry localPolicies, ExtensibleMetaData extMetaData)
/*     */   {
/*     */     DOMPolicyReader reader;
/* 230 */     if ((policyReferences != null) && (policyReferences.size() != 0))
/*     */     {
/* 232 */       reader = (DOMPolicyReader)PolicyFactory.getPolicyReader(3);
/* 233 */       for (WSDLExtensibilityElement element : policyReferences)
/*     */       {
/* 235 */         PolicyReference policyRef = reader.readPolicyReference(element.getElement());
/* 236 */         deployPolicy(resolvePolicyReference(policyRef, localPolicies), scope, extMetaData);
/*     */       }
/*     */     }
/*     */   }
View Full Code Here

                    axisService.setEndpoint(unknown.getElement().getAttribute(
                            "location"));
                } else if (WSDLConstants.POLICY
                        .equals(unknown.getElementType())) {

                    DOMPolicyReader policyReader = (DOMPolicyReader) PolicyFactory
                            .getPolicyReader(PolicyFactory.DOM_POLICY_READER);
                    Policy policy = policyReader.readPolicy(unknown
                            .getElement());

                    addPolicy(description, originOfExtensibilityElements,
                            policy);

                } else if (WSDLConstants.POLICY_REFERENCE.equals(unknown
                        .getElementType())) {

                    DOMPolicyReader policyReader = (DOMPolicyReader) PolicyFactory
                            .getPolicyReader(PolicyFactory.DOM_POLICY_READER);
                    PolicyReference policyRef = policyReader
                            .readPolicyReference(unknown.getElement());
                    addPolicyRef(description, originOfExtensibilityElements,
                            policyRef);

                } else {
View Full Code Here

            if (extElement instanceof UnknownExtensibilityElement) {
                UnknownExtensibilityElement unknown = (UnknownExtensibilityElement) extElement;
                if (WSDLConstants.POLICY.equals(unknown.getElementType())) {

                    DOMPolicyReader policyReader = (DOMPolicyReader) PolicyFactory
                            .getPolicyReader(PolicyFactory.DOM_POLICY_READER);
                    Policy policy = policyReader.readPolicy(unknown
                            .getElement());

                    registry.register(policy.getPolicyURI(), policy);

                }
View Full Code Here

TOP

Related Classes of org.apache.ws.policy.util.DOMPolicyReader

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.