Package org.apache.ws.policy.util

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


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

    private InputStream createInputStream(Element element) {
        // some improvements ..???
        StringWriter sw = new StringWriter();
View Full Code Here

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