Respected Sir,
I have queries related to WS-Policy. I am using Apache Neethi-2.0.1 for
implementing WS-Policy. I write my policy file in xml. Now i wnat to get
assertion from that file. For that I am using getAssertions() method of All
class.
My java code is
---------------------------------------------------------------------------
PolicyEngine pe1=new PolicyEngine();
List l1,l2;
Object o2=new Object();
FileInputStream fis = new
FileInputStream("C:\\neethi-2.0.1-bin\\policyex12.xml");
l2=(pe1.getPolicy(fis)).getAssertions();
o2=l2.get(0);
System.out.println(o2);
-------------------------------------------------------------------------
My policy file is
-------------------------------------------------------------------------
<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:ExactlyOne> <wsp:All><sp:Basic256Rsa15 /></wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
--------------------------------------------------------------------------
And I get output as
[EMAIL PROTECTED]
I think i cannot get exact assertion. I think @b09e89 is my assertion and
beause it is contained in Object, When I ty to convert them into string I get
garbage value. So For getting assertion into string what should I have to do?
Is my approach right or wrong? Is there any other mehtod available for doing
same thing?
Please slove this queries.
Thanks
With Regards,
Amee Desai
---------------------------------
5, 50, 500, 5000 - Store unlimited mails in your inbox. Click here.