Package org.apache.ws.policy.util

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


         "      </wsse:SecurityToken>" +
         "    </wsp:All>" +
         "  </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


        return null;
    }

    private Policy getPolicyFromElement(Element element) {
        InputStream policyInputStream = createInputStream(element);
        PolicyReader reader = PolicyFactory
                .getPolicyReader(PolicyFactory.OM_POLICY_READER);
        return reader.readPolicy(policyInputStream);
    }
View Full Code Here

            Policy policy = reg.lookup(uriString);
            if (policy == null) {
                try {
                    URI policyURI = new URI(uriString);
                    URL policyURL = policyURI.toURL();
                    PolicyReader reader = PolicyFactory
                            .getPolicyReader(PolicyFactory.OM_POLICY_READER);
                    Policy newPolicy = reader
                            .readPolicy(policyURL.openStream());
                    reg.register(uriString, newPolicy);

                } catch (Exception e) {
                    e.printStackTrace();
View Full Code Here

TOP

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

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.