Examples of readPolicy()


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

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

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

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

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

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

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

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

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

                } 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);
View Full Code Here

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

                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

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

                                         PolicyInclude policyInclude) {
        OMPolicyReader reader = (OMPolicyReader) PolicyFactory
                .getPolicyReader(PolicyFactory.OM_POLICY_READER);

        while (policyElements.hasNext()) {
            Policy p = reader.readPolicy((OMElement) policyElements.next());
            policyInclude.addPolicyElement(type, p);
        }
    }

    protected void processPolicyRefElements(int type, Iterator policyRefElements,
View Full Code Here

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

            PolicyInclude policyInclude) {
        OMPolicyReader reader = (OMPolicyReader) PolicyFactory
                .getPolicyReader(PolicyFactory.OM_POLICY_READER);

        while (policyElements.hasNext()) {
            Policy p = reader.readPolicy((OMElement) policyElements.next());
            policyInclude.addPolicyElement(type, p);
        }
    }

    protected void processPolicyRefElements(int type, Iterator policyRefElements,
View Full Code Here

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

                                         PolicyInclude policyInclude) {
        OMPolicyReader reader = (OMPolicyReader) PolicyFactory
                .getPolicyReader(PolicyFactory.OM_POLICY_READER);

        while (policyElements.hasNext()) {
            Policy p = reader.readPolicy((OMElement) policyElements.next());
            policyInclude.addPolicyElement(type, p);
        }
    }

    protected void processPolicyRefElements(int type, Iterator policyRefElements,
View Full Code Here

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

         "  </wsp:ExactlyOne>" +
         "</wsp:Policy>";

      PolicyReader reader = PolicyFactory.getPolicyReader(PolicyFactory.DOM_POLICY_READER);
      PolicyWriter writer = PolicyFactory.getPolicyWriter(PolicyFactory.StAX_POLICY_WRITER);
      Policy p = reader.readPolicy(new ByteArrayInputStream(inStr.getBytes()));

      //writer.writePolicy(p, System.out);     
   }
}
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.