On Fri, Feb 4, 2011 at 1:25 AM, aditya chitre <[email protected]>wrote:
> Hi , > > This email about using Apache Neethi for building policy documents. > > I am trying to build assertions based on the Neethi API but I am > encountering a lot of difficulties. I have built a simple assertion based on > the Neethi API but after normalizing and serializing it, the closing tags > such as </wsp:All>, </wsp:Policy> and </wsp:ExactlyOne> are not added. > Well, when I ran your code, I got the following output (without pritty-printing of course); <wsp:Policy wsu:Id="ID001" Name="MyPolicy" xmlns:wsp=" http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu=" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd "> <wsp:ExactlyOne> <wsp:All> <x:root xmlns:x="http://www.example.org/Rule"> <x:child>Some Text</x:child> </x:root> </wsp:All> </wsp:ExactlyOne> </wsp:Policy> > Since I couldn't find any examples on building assertions using the API, > and I was stuck on this for quite some time now, could you please point me > in the right direction for this or let me know if there are code examples > for using Neethi to build assertions? > You can have a look how Apache Rampart[1] had used Neethi framework to implement WS-Security Policy assertions if you like. [1] http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-policy/ Sanka > > I have attached my code. > > Regards, > Aditya Chitre > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > -- Sanka Samaranayake PMC Member, Committer, Apache Software Foundation, http://www.apache.org/ Telephone: +34 677 864358 Email: sanka AT apache DOT org Blog: http://sankas.blogspot.com/ Linked-in: http://lk.linkedin.com/pub/sanka-samaranayake/4/b2b/3b3
