-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Carsten,
Right now we do have we a limited support for WSSecurity Policies in Axis2. For instance If you attach a policy with a Username token assertion then the wsdl2java will generate a stub with two utility methods to set username and the password. e.g. <wsp:Policy xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"> <sp:SignedSupportingTokens> <wsp:Policy> <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient" /> </wsp:Policy> </sp:SignedSupportingTokens> </wsp:Policy> You need to specify an axis2 repository with rampart module in it both at codegen time and runtime. At the codegen time you could specify the repository as the following codegen option. -r <path to the repostiory>. And when you creating the stub instance you need to pass a ConfigurationContext created using that repository. If do those two steps if will get a stub that has the above methods. Plus at the runtime the stub will automatically engage the security module and do whatever necessary. e.g. Stub stub = new Stub(.....); .......................................... stub.setUsername(...); stub.setPassword(...); ........................................ stub.sendAndReceive(..); At the moment we are adding a new codebase to Apache Neethi project which is based on a much improved architecture. And based on that new implementation we will improve the support for WS Policy plus its extensions for Security, Reliable Messaging .. etc pretty soon. Keep in touch .. - --Sanka Carsten Ziegeler wrote: > Can someone please give me a hint on how to turn on ws policy validation > with Axis2? I already installed the rampart module. > > Will the wsdl2java code generator generate the necessary bit? > > Thanks > Carsten - -- Sanka Samaranayake WSO2 Inc. http://sankas.blogspot.com/ - http://www.wso2.net/ T:+94-77-3506382 F:+94-11-2424304 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (GNU/Linux) iD8DBQFEtQfV/Hd0ETKdgNIRAoqbAJ9AQA9Tr0DFMBHyOtFXnBRwRejhrACglquN gZNZLtiVjSGnSxW8Dd3dccI= =vkyN -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]