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 Eduard Martínez <ma...@gmail.com> on 2009/04/02 16:36:14 UTC

Adding authentication for a generated client

Hello!

I'm new with Axis and WS; I'm trying to build a webservice which requires
authentication, only username & password (no encryption needed). I wrote a
WSDL file and then I generated the java client & server classes in eclipse
(like with wsdl2java). Now the WS is working but with no authentication.
I started following this tutorial:
http://www.javaranch.com/journal/200709/web-services-authentication-axis2.htmland
now I can get authentication working in the server side (I suppose),
adding the rampart module and this code in the services.xml:
         <module ref="rampart" />
        <parameter name="InflowSecurity">
            <action>
                <items>UsernameToken Timestamp</items>
                <passwordCallbackClass>
                    tests.security.PasswordCallBackHandler
                </passwordCallbackClass>
               </action>
        </parameter>
But I don't know how to add the authentication headers with the generated
code in the client side. Someone have some guidelines?

Thanks!

AW: Adding authentication for a generated client

Posted by Werner Heinsohn <we...@yahoo.com>.
Hi Eduard,

you can try this tutorial:
http://wso2.org/library/240

hope that helps.
best regards
Werner





________________________________
Von: Eduard Martínez <ma...@gmail.com>
An: axis-user@ws.apache.org
Gesendet: Donnerstag, den 2. April 2009, 16:36:14 Uhr
Betreff: Adding authentication for a generated client

Hello!

I'm new with Axis and WS; I'm trying to build a webservice which requires authentication, only username & password (no encryption needed). I wrote a WSDL file and then I generated the java client & server classes in eclipse (like with wsdl2java). Now the WS is working but with no authentication.
I started following this tutorial: http://www.javaranch.com/journal/200709/web-services-authentication-axis2.html and now I can get authentication working in the server side (I suppose), adding the rampart module and this code in the services.xml:
         <module ref="rampart" />
        <parameter name="InflowSecurity">
            <action>
                <items>UsernameToken Timestamp</items>
                <passwordCallbackClass>
                    tests.security.PasswordCallBackHandler
                </passwordCallbackClass>
               </action>
        </parameter>
But I don't know how to add the authentication headers with the generated code in the client side. Someone have some guidelines?

Thanks!