axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Srinath Perera <hemap...@gmail.com>
Subject Re: [Axis2] Adding support for WS Policy in Axis2
Date Tue, 22 Nov 2005 00:35:38 GMT
Big +1 !!!   I am on my toes to see policy working for Axis2

On 11/21/05, Davanum Srinivas <davanum@gmail.com> wrote:
> Sanka,
>
> +1 from me. i think we need to get WS-SecurityPolicy working with
> Axis2's security module.
>
> thanks,
> dims
>
> On 11/21/05, Sanka Samaranayake <ssanka@gmail.com> wrote:
> > Dear Axis2 Developers,
> >
> > I would like to know whether there are any efforts to add support for WS
> > Policy in Axis2 framework. The Web Services Policy Framework (WS-Policy)
> > provides a general purpose model and corresponding syntax to describe
> > and communicate the policies of a Web service.  Ws-commons/policy
> > provides a framework which can be used to manipulate WS Policies.
> > Following is a brief introduction on ws-commons/policy and I hope that
> > it'll be useful in any effort to add WS Policy support in Axis2 framework.
> >
> >
> > How to use ws-commons/Policy.
> >
> >
> > Ws-commons/Policy framework provides a convenient way to process
> > policies. In this framework a requirement is viewed as an assertion. An
> > assertion can be of two types.
> >
> > (a) Primitive Assertion - it is a domain specific requirement.
> > One needs domain-specific knowledge to process a primitive assertion.
> >
> > (b) Composite Assertion: it contains set of requirements and implicit
> > knowledge how those requirements should met.
> > For instance AndCompositeAssertion requires that all of its terms (set
> > of assertions it contains) are met.
> >
> > XorCompositeAssertion requires that exactly one of it terms should met.
> >
> >
> > Policy operations:
> >
> > Three policy operations are defined
> > (a) normalize();
> > Creates a new Assertion object which is in its normalized format.
> >
> > (b) intersect();
> > Provides a set of alternatives which both parties understand. If any
> > policy alternative that contains an assertion which the other party
> > doesn't understand is ignored.
> >
> > (c) merge();
> > Provides all alternatives which can be derived by two policies. If one
> > of these alternatives can be met, then at least one of the policy
> > alternatives of both policies are met.
> >
> >
> > How to read a policy object:
> >
> > InputStream is = new FileInputStream("/home/ ..... /policy.xml");
> >
> > PolicyFactory factory = PolicyFactory.getInstance();
> > PolicyReader reader = factory.getPolicyReader();
> > Policy policy = reader.readPolicy(is);
> >
> >
> > How write a policy object:
> >
> > OutputStream os = new FileOutputStream("/home/..../policy.xml");
> >
> > PolicyFactory factory = PolicyFactory.getInstance();
> > PolicyWriter writer = factory.getPolicyWriter();
> > writer.writePolicy(os);
> >
> >
> > How to normalize a policy ;
> >
> > Policy policy = reader.readPolicy(...);
> > Policy normalized = (Policy) policy.normalize();
> >
> >
> > How to merge two policies;
> >
> > Policy policy1 = reader.readPolicy("..../policy1");
> > Policy policy2 = reader.readPolicy("..../policy2");
> >
> > Policy merged = (Policy) policy1.merge(policy2);
> >
> > Best,
> > Sanka
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
> --
> Davanum Srinivas : http://wso2.com/blogs/
>

Mime
View raw message