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 Sa...@3com.com on 2007/02/05 20:37:54 UTC

WSS4J & Axis2

Hi all,
Does the WSS4J (Rampart) support in Axis2 extend into the WSDL2JAVA tool? 
i.e.can I use WSDL2JAVA to emit client stubs that INCLUDE the required 
security tokens?

And how would I construct my WSDL to include WSS4J (or WS-Security in 
general) attributes?

My end goal is to use the WSDL as a design contract, so I need as much 
info as possible for client side programmers to be able to work with 
(generate stubs etc.) embedded in the WSDL.

Thanks
\Sarwar

Re: WSS4J & Axis2

Posted by Sanka Samaranayke <ss...@gmail.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sarwar_Raza@3com.com wrote:
>
> Hi Sankat, Thanks for the response. I've been looking for a simple
> example that adds a WS-Policy annotation (simple username/password
> token stuff) to an existing WSDL (and will work with Axis2
> WSDL2JAVA to generate the appropriate skeletons/stubs). Would you
> happen to have any pointers or examples of just what such an
> annotation would look like?

I've attached a sample WSDL document that will help you to understand
how to attach WS-Security policies to a WSDL. However I am not sure
whether the defined policy is 100% correct since I am not a
WS-Security domain expert. But my gut feeling is it is correct.

HTH and keep posting if you find any issues ..

Best,
- --Sanka

>
> Thanks \Sarwar
>
>
>
>
> *Sanka Samaranayke <ss...@gmail.com>*
>
> 02/12/2007 01:50 AM Please respond to axis-user@ws.apache.org
>
>
>
> To axis-user@ws.apache.org cc
>
> Subject Re: WSS4J & Axis2
>
>
>
>
>
>
>
>
>
> Hi Sarwar,
>
> This is a scenario where you want to describes some additional
> requirements of a service in a standard way s.t. client is able to
> work with. WS Policy provides a standard, extensible framework for
> describing such requirements and capabilities and WS-Security
> Policy is an extension that describes WS Security requirements (or
> capabilities) of a service. In this case all you need is to
> construct a WS Security policy that describes the security
> requirements of your service and attach it to your WSDL document.
>
>
> If you use WSDL2Java to generate a stub using a policy annotated
> WSDL, the stub will contain additional code to engage and configure
> the required modules (In your case engage and configure Rampart
> automatically). It will also contain additional methods to get the
> required user inputs.
>
> e.g.
>
> stub.setUsername(...) stub.setUserPassword(..)
>
>
> Please feel free to ask if you need further clarifications ..
>
> Best, --Sanka
>
>
>
>
>
> Sarwar_Raza@3com.com wrote:
>
>> Hi all, Does the WSS4J (Rampart) support in Axis2 extend into the
>> WSDL2JAVA tool? i.e.can I use WSDL2JAVA to emit client stubs that
>> INCLUDE the required security tokens?
>
>> And how would I construct my WSDL to include WSS4J (or
>> WS-Security in general) attributes?
>
>> My end goal is to use the WSDL as a design contract, so I need as
>>  much info as possible for client side programmers to be able to
>> work with (generate stubs etc.) embedded in the WSDL.
>
>> Thanks \Sarwar
>
>
> -- Sanka Samaranayake WSO2 Inc.
>
> http://sankas.blogspot.com/ http://www.wso2.org/
>
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For
> additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
> -- Sanka Samaranayake WSO2 Inc.
>
> http://sankas.blogspot.com/ http://www.wso2.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (GNU/Linux)

iD8DBQFF00fU/Hd0ETKdgNIRAtrGAJ9PCcUQGyxskBE2WJqGahxSkzTekgCfV7Ke
QRU8NcxUpEwfDCaxfRsIzvw=
=8wqb
-----END PGP SIGNATURE-----


Re: WSS4J & Axis2

Posted by Sa...@3com.com.
Hi Sankat,
Thanks for the response.
I've been looking for a simple example that adds a WS-Policy annotation 
(simple username/password token stuff) to an existing WSDL (and will work 
with Axis2 WSDL2JAVA to generate the appropriate skeletons/stubs). Would 
you happen to have any pointers or examples of just what such an 
annotation would look like?

Thanks
\Sarwar





Sanka Samaranayke <ss...@gmail.com> 
02/12/2007 01:50 AM
Please respond to
axis-user@ws.apache.org


To
axis-user@ws.apache.org
cc

Subject
Re: WSS4J & Axis2






-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi Sarwar,

This is a scenario where you want to describes some additional
requirements of a service in a standard way s.t. client is able to
work with. WS Policy provides a standard, extensible framework for
describing such requirements and capabilities and WS-Security Policy
is an extension that describes WS Security requirements (or
capabilities) of a service. In this case all you need is to construct
a WS Security policy that describes the security requirements of your
service and attach it to your WSDL document.


If you use WSDL2Java to generate a stub using a policy annotated WSDL,
the stub will contain additional code to engage and configure the
required modules (In your case engage and configure Rampart
automatically). It will also contain additional methods to get the
required user inputs.

e.g.

stub.setUsername(...)
stub.setUserPassword(..)


Please feel free to ask if you need further clarifications ..

Best,
- --Sanka





Sarwar_Raza@3com.com wrote:
>
> Hi all,
> Does the WSS4J (Rampart) support in Axis2 extend into the WSDL2JAVA
> tool?
> i.e.can I use WSDL2JAVA to emit client stubs that INCLUDE the
> required security tokens?
>
> And how would I construct my WSDL to include WSS4J (or WS-Security
> in general) attributes?
>
> My end goal is to use the WSDL as a design contract, so I need as
> much info as possible for client side programmers to be able to work
> with (generate stubs etc.) embedded in the WSDL.
>
> Thanks
> \Sarwar


- --
Sanka Samaranayake
WSO2 Inc.

http://sankas.blogspot.com/
http://www.wso2.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (GNU/Linux)

iD8DBQFF0A4P/Hd0ETKdgNIRAsmCAKCLChKI69rxlrO/Omu90LtGfBUgTwCeP+mn
LEqId96RK3ZfubH/xtzam4U=
=HqEP
-----END PGP SIGNATURE-----


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


Re: WSS4J & Axis2

Posted by Sanka Samaranayke <ss...@gmail.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi Sarwar,

This is a scenario where you want to describes some additional
requirements of a service in a standard way s.t. client is able to
work with. WS Policy provides a standard, extensible framework for
describing such requirements and capabilities and WS-Security Policy
is an extension that describes WS Security requirements (or
capabilities) of a service. In this case all you need is to construct
a WS Security policy that describes the security requirements of your
service and attach it to your WSDL document.


If you use WSDL2Java to generate a stub using a policy annotated WSDL,
the stub will contain additional code to engage and configure the
required modules (In your case engage and configure Rampart
automatically). It will also contain additional methods to get the
required user inputs.

e.g.

stub.setUsername(...)
stub.setUserPassword(..)


Please feel free to ask if you need further clarifications ..

Best,
- --Sanka





Sarwar_Raza@3com.com wrote:
>
> Hi all,
> Does the WSS4J (Rampart) support in Axis2 extend into the WSDL2JAVA
> tool?
> i.e.can I use WSDL2JAVA to emit client stubs that INCLUDE the
> required security tokens?
>
> And how would I construct my WSDL to include WSS4J (or WS-Security
> in general) attributes?
>
> My end goal is to use the WSDL as a design contract, so I need as
> much info as possible for client side programmers to be able to work
> with (generate stubs etc.) embedded in the WSDL.
>
> Thanks
> \Sarwar


- --
Sanka Samaranayake
WSO2 Inc.

http://sankas.blogspot.com/
http://www.wso2.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (GNU/Linux)

iD8DBQFF0A4P/Hd0ETKdgNIRAsmCAKCLChKI69rxlrO/Omu90LtGfBUgTwCeP+mn
LEqId96RK3ZfubH/xtzam4U=
=HqEP
-----END PGP SIGNATURE-----


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