You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by Amila Suriarachchi <am...@gmail.com> on 2006/07/30 14:21:20 UTC

[Neeth] some spec problems.

hi,
Recently I did some development to apache neethi and have atached the path
to following jira issue.

http://issues.apache.org/jira/browse/WSCOMMONS-67

By doing that i came across following problems and it would be great if
someone can help me on these.

1. What is the correct normal form of a nested policy expression?
in WS-Policy spec 1.2 (march 2006) in an example it is given as follows with
out
ExactlyOne and All elements.

     <sp:AlgorithmSuite>
(07)       <wsp:Policy>
(08)             <sp:Basic256Rsa15 />
(09)       </wsp:Policy>
(10) </sp:AlgorithmSuite>

but in WS-SecurityPolicy spect 1.1 (july 2005) define it as follows with
Exactly one elements
<B>
  <wsp:Policy>
    <wsp:ExactlyOne>
      <wsp:All>
        <C/>
      </wsp:All>
    </wsp:ExactlyOne>
  </wsp:Policy>
</B>

By considering the two ways former is more sensible since, In a nested
policy expression we can have only one
choice. Anyway the test-resources given with the neethi has followed the
latter method.

2. WS-Policy version 1.2 does not contain a definition for Merge

if we assume the merging two policies as adding there policy alternatives we
can simply write the
merge as follows
        Policy mergedPolicy = new Policy();
        mergedPolicy.addPolicyComponents(this.getPolicyComponents());
        mergedPolicy.addPolicyComponents(policy.getPolicyComponents());

and if we want to get the normalized form we can simply normalized it.
       mergedPolicy.normalize(true)

this way I implemented a merge function and tested with the existing test
resources. every thing seems to be ok. Is this the reason that spec does not
define it?
or have i missed any thing?

regards
Amila.