You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2011/02/09 18:09:57 UTC

[jira] Resolved: (NEETHI-3) Neethi's deep normalization does not normalize assertions nested within an XmlPrimtiveAssertion

     [ https://issues.apache.org/jira/browse/NEETHI-3?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved NEETHI-3.
------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0
         Assignee: Daniel Kulp


With Neethi 3.0, the XMLPrimitiveAssertion isn't used in the cases where there is a single child of type Policy.   Instead, a new PolicyContainingAssertion is used which can handle the normalization of the children.   XMLPrimitiveAssertion is likely to be deprecated at some point.



> Neethi's deep normalization does not normalize assertions nested within an XmlPrimtiveAssertion
> -----------------------------------------------------------------------------------------------
>
>                 Key: NEETHI-3
>                 URL: https://issues.apache.org/jira/browse/NEETHI-3
>             Project: Neethi
>          Issue Type: Bug
>         Environment: Windows XP
> Java 1.4
>            Reporter: Simon Barere
>            Assignee: Daniel Kulp
>             Fix For: 3.0
>
>
> Given the following sample compact policy:
> 	<wsp:Policy>
> 		<wsam:Addressing>
> 			<wsp:Policy>
> 				<wsp:ExactlyOne>
> 					<wsp:All>
> 						<wsam:AnonymousResponses/>
> 					</wsp:All>
> 					<wsp:All>
> 						<wsam:NonAnonymousResponses/>
> 					</wsp:All>
> 				</wsp:ExactlyOne>
> 			</wsp:Policy>
> 		</wsam:Addressing>
> 	</wsp:Policy>
> The resulting normalized version should look something like:
> 	<wsp:Policy>
> 		<wsp:ExactlyOne>
> 			<wsp:All>
> 				<wsam:Addressing>
> 					<wsp:Policy>
> 						<wsp:All>
> 							<wsam:AnonymousResponses/>
> 						</wsp:All>
> 					</wsp:Policy>
> 				</wsam:Addressing>			
> 			</wsp:All>
> 			<wsp:All>
> 				<wsam:Addressing>
> 					<wsp:Policy>
> 						<wsp:All>
> 							<wsam:NonAnonymousResponses/>
> 						</wsp:All>
> 					</wsp:Policy>
> 				</wsam:Addressing>			
> 			</wsp:All>
> 		</wsp:ExactlyOne>	
> 	</wsp:Policy>
> When Neethi processes this without using AssertionBuilders, it places the entire <Addressing> assertion into a single XmlPrimtiveAssertion. When normalizing deeply, the XmlPrimtiveAssertion class is asked to normalize this large assertion. Yet the XmlPrimtiveAssertion only seems to normalize an Assertion if it is set to optional (creating two alternatives from one). To normalize this compact <Addressing> assertion would mean to inspect its children looking for policy operators, which XmlPrimtiveAssertion does not seem to do.
> The result is that when normalization completes the policy is not actually normalized. What is the correct solution to get this sort of policy fully normalized?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org