You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by aditya chitre <ch...@gmail.com> on 2011/02/04 01:25:46 UTC

Support for Apache Neethi

 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.
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?

I have attached my code.

Regards,
Aditya Chitre

Re: Support for Apache Neethi

Posted by Sanka Samaranayake <ss...@gmail.com>.
On Fri, Feb 4, 2011 at 1:25 AM, aditya chitre <ch...@gmail.com>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: dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: dev-help@ws.apache.org
>



-- 
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