You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by herbison <he...@nortel.com> on 2007/03/27 23:53:17 UTC

Re: [Axis2] Support of ws-policy?

Sanka:
I've been trying to do this exact thing and when notifiing wsdl2java about
the repository (axis2, it has rampart mar in it)  it tells me "policy will
not be supported".  

Any ideas why?


WSDL2Java (using axis2.sh) cmd:
sh ${AXIS2_HOME}/bin/axis2.sh \
        org.apache.axis2.wsdl.WSDL2Java \
        -uri "wsdl url" \
        -d xmlbeans -s -r $AXIS2_HOME/repository

I get:

...
Mar 27, 2007 4:48:06 PM org.apache.axis2.deployment.DeploymentEngine
doDeploy
INFO: Deploying Web service  version.aar
cannot create repository : policy will not be supported
cannot find a PolicyExtension to process
http://schemas.xmlsoap.org/ws/2005/07/securitypolicytype assertions
cannot find a PolicyExtension to process
http://schemas.xmlsoap.org/ws/2005/07/securitypolicytype assertions
Mar 27, 2007 4:48:07 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter
createOutFile
INFO: File ./src/com/nortel/va/beta/ClaimProcessorStub.java will not be
overwritten.


Sanka Samaranayke wrote:
> 
> -----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: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-Axis2--Support-of-ws-policy--tf1930928.html#a9701947
Sent from the Axis - User mailing list archive at Nabble.com.


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