Package org.apache.ws.policy.util

Examples of org.apache.ws.policy.util.DOMPolicyReader.readPolicy()


                    component.addExtensibilityElement(soapAddressExtensibiltyElement);
                   
                } else if (ExtensionConstants.POLICY.equals(unknown.getElementType())) {
                    PolicyExtensibilityElement policyExtensibilityElement = (PolicyExtensibilityElement) extensionFactory.getExtensionElement(wsdl4jElement.getElementType());
                    DOMPolicyReader policyReader = (DOMPolicyReader) PolicyFactory.getPolicyReader(PolicyFactory.DOM_POLICY_READER);
                    policyExtensibilityElement.setPolicyElement(policyReader.readPolicy(unknown.getElement()));                   
                    component.addExtensibilityElement(policyExtensibilityElement);
                   
                } else if (ExtensionConstants.POLICY_REFERENCE.equals(unknown.getElementType())) {
                    PolicyExtensibilityElement policyExtensibilityElement = (PolicyExtensibilityElement) extensionFactory.getExtensionElement(wsdl4jElement.getElementType());
                    DOMPolicyReader policyReader = (DOMPolicyReader) PolicyFactory.getPolicyReader(PolicyFactory.DOM_POLICY_READER);
View Full Code Here


                Element element = e.getElement();
                if (PolicyConstants.WS_POLICY_NAMESPACE_URI.equals(element
                        .getNamespaceURI())
                        && PolicyConstants.WS_POLICY.equals(element
                        .getLocalName())) {
                    policies.add(reader.readPolicy(element));

                } else if (PolicyConstants.WS_POLICY_NAMESPACE_URI
                        .equals(element.getNamespaceURI())
                        && PolicyConstants.WS_POLICY_REFERENCE.equals(element
                        .getLocalName())) {
View Full Code Here

                    component.addExtensibilityElement(soapAddressExtensibiltyElement);

                } else if (ExtensionConstants.POLICY.equals(unknown.getElementType())) {
                    PolicyExtensibilityElement policyExtensibilityElement = (PolicyExtensibilityElement) extensionFactory.getExtensionElement(wsdl4jElement.getElementType());
                    DOMPolicyReader policyReader = (DOMPolicyReader) PolicyFactory.getPolicyReader(PolicyFactory.DOM_POLICY_READER);
                    policyExtensibilityElement.setPolicyElement(policyReader.readPolicy(unknown.getElement()));
                    component.addExtensibilityElement(policyExtensibilityElement);

                } else if (ExtensionConstants.POLICY_REFERENCE.equals(unknown.getElementType())) {
                    PolicyExtensibilityElement policyExtensibilityElement = (PolicyExtensibilityElement) extensionFactory.getExtensionElement(wsdl4jElement.getElementType());
                    DOMPolicyReader policyReader = (DOMPolicyReader) PolicyFactory.getPolicyReader(PolicyFactory.DOM_POLICY_READER);
View Full Code Here

        Element element = e.getElement();
        if (PolicyConstants.WS_POLICY_NAMESPACE_URI.equals(element
            .getNamespaceURI())
            && PolicyConstants.WS_POLICY.equals(element
                .getLocalName())) {
          policies.add(reader.readPolicy(element));

        } else if (PolicyConstants.WS_POLICY_NAMESPACE_URI
            .equals(element.getNamespaceURI())
            && PolicyConstants.WS_POLICY_REFERENCE.equals(element
                .getLocalName())) {
View Full Code Here

            // It should work in all containers, server/client side
            UnifiedVirtualFile vfPolicyFile = vfRoot.findChild(policyFileLocation);
            is = vfPolicyFile.toURL().openStream();
           
            DOMPolicyReader reader = (DOMPolicyReader)PolicyFactory.getPolicyReader(PolicyFactory.DOM_POLICY_READER);
            Policy unnormalizedPolicy = reader.readPolicy(is);
            Policy normPolicy = (Policy)unnormalizedPolicy.normalize();
            log.info("Deploying Annotated Policy = " + policyFileLocation);
            PolicyScopeLevel scope = anPolicy.scope();
            if (PolicyScopeLevel.WSDL_PORT.equals(scope) || PolicyScopeLevel.WSDL_PORT_TYPE.equals(scope) || PolicyScopeLevel.WSDL_BINDING.equals(scope))
            {
View Full Code Here

      //Collect all policies defined in our wsdl definitions
      DOMPolicyReader reader = (DOMPolicyReader)PolicyFactory.getPolicyReader(PolicyFactory.DOM_POLICY_READER);
      PolicyRegistry localPolicyRegistry = new PolicyRegistry();
      for (WSDLExtensibilityElement policyElement : wsdlDefinitions.getExtensibilityElements(Constants.WSDL_ELEMENT_POLICY))
      {
         Policy policy = reader.readPolicy(policyElement.getElement());
         localPolicyRegistry.register(policy.getPolicyURI(), policy);
      }
      //Port scope
      WSDLService wsdlService = wsdlDefinitions.getService(epMetaData.getServiceMetaData().getServiceName());
      if (wsdlService != null)
View Full Code Here

            // It should work in all containers, server/client side
            UnifiedVirtualFile vfPolicyFile = vfRoot.findChild(policyFileLocation);
            is = vfPolicyFile.toURL().openStream();
           
            DOMPolicyReader reader = (DOMPolicyReader)PolicyFactory.getPolicyReader(PolicyFactory.DOM_POLICY_READER);
            Policy unnormalizedPolicy = reader.readPolicy(is);
            Policy normPolicy = (Policy)unnormalizedPolicy.normalize();
            log.info("Deploying Annotated Policy = " + policyFileLocation);
            PolicyScopeLevel scope = anPolicy.scope();
            if (PolicyScopeLevel.WSDL_PORT.equals(scope) || PolicyScopeLevel.WSDL_PORT_TYPE.equals(scope) || PolicyScopeLevel.WSDL_BINDING.equals(scope))
            {
View Full Code Here

      //Collect all policies defined in our wsdl definitions
      DOMPolicyReader reader = (DOMPolicyReader)PolicyFactory.getPolicyReader(PolicyFactory.DOM_POLICY_READER);
      PolicyRegistry localPolicyRegistry = new PolicyRegistry();
      for (WSDLExtensibilityElement policyElement : wsdlDefinitions.getExtensibilityElements(Constants.WSDL_ELEMENT_POLICY))
      {
         Policy policy = reader.readPolicy(policyElement.getElement());
         localPolicyRegistry.register(policy.getPolicyURI(), policy);
      }
      //Port scope
      WSDLService wsdlService = wsdlDefinitions.getService(epMetaData.getServiceMetaData().getServiceName());
      if (wsdlService != null)
View Full Code Here

/*     */
/* 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

/*     */   {
/* 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

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.