FileDocCategorySizeDatePackage
RMPolicyResolver.javaAPI DocExample3619Tue May 29 16:57:22 BST 2007com.sun.xml.wss.jaxws.impl

RMPolicyResolver

public class RMPolicyResolver extends Object
TODO: Make this configurable
author
K.Venugopal@sun.com

Fields Summary
Constructors Summary
public RMPolicyResolver()
Creates a new instance of RMPolicyResolver

    
Methods Summary
public com.sun.xml.ws.policy.PolicygetOperationLevelPolicy()

        PolicySourceModel model;
        try {
            model = unmarshalPolicy("com/sun/xml/ws/security/impl/policyconv/" + "rm-msglevel-policy.xml");
        }catch (IOException ex) {
            throw new PolicyException(ex);
        }
        Policy mbp = PolicyModelTranslator.getTranslator().translate(model);
        return mbp;
    
private java.io.ReadergetResourceReader(java.lang.String resourceName)

        return new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(resourceName));
    
private com.sun.xml.ws.policy.sourcemodel.PolicySourceModelunmarshalPolicy(java.lang.String resource)

        Reader reader = getResourceReader(resource);
        PolicySourceModel model = PolicyModelUnmarshaller.getXmlUnmarshaller().unmarshalModel(reader);
        reader.close();
        return model;