Examples of readPolicy()


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

    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

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

                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

Examples of org.codehaus.loom.xmlpolicy.reader.PolicyReader.readPolicy()

        m_expander.expandValues( element, newData );

        element.setAttribute( "version", "1.0" );
        try
        {
            final PolicyMetaData policy = reader.readPolicy( element );
            verifier.verifyPolicy( policy );
            return builder.buildPolicy( policy, resolver );
        }
        catch( final Exception e )
        {
View Full Code Here

Examples of org.codehaus.loom.xmlpolicy.reader.PolicyReader.readPolicy()

    {
        try
        {
            final PolicyReader builder = new PolicyReader();
            final Document config = load( stream );
            return builder.readPolicy( config.getDocumentElement() );
        }
        catch( final Exception e )
        {
            fail( "Error building Policy: " + e );
            return null;
View Full Code Here

Examples of org.jboss.security.xacml.sunxacml.support.finder.PolicyReader.readPolicy()

         {
            try
            {
               // first try to load it as a URL
               URL url = new URL(str);
               policy = reader.readPolicy(url);
            }
            catch (MalformedURLException murle)
            {
               // assume that this is a filename, and try again
               policy = reader.readPolicy(new File(str));
View Full Code Here

Examples of org.jboss.security.xacml.sunxacml.support.finder.PolicyReader.readPolicy()

               policy = reader.readPolicy(url);
            }
            catch (MalformedURLException murle)
            {
               // assume that this is a filename, and try again
               policy = reader.readPolicy(new File(str));
            }
         }
         catch (ParsingException e)
         {
            this.encounteredParsingException = true;
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.