axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tania Marinova <>
Subject how o use stored password in a database which rampart should verify
Date Mon, 06 May 2013 14:52:19 GMT
   Hello I 've made a an axis  2 web service which stores the user hashed password in a database.
So it's obvious that I shold add some kind of security to my web service so i use rampart!

But it's written that in a real application, you'd naturally 
want to use some other mechanism  (such as a database or an external 
security mechanism) to verify the username and password combination. 
so it  seems that I can't understand how to make the implementtion - so I will hash  password
with salt salt  and to store it in a database and then I don't know what to do next. 
could you recommend the steps

So you will see that in my request from javascript the password is also seen so it seens that
this should also be changes! 

Thank you in advance!

and here is my password callabck class
ublic classPWCBHandlerimplementsCallbackHandler{publicvoidhandle(Callback[]callbacks)throwsIOException,UnsupportedCallbackException{for(inti
=0;i <callbacks.length;i++//When the server side need to authenticate the userWSPasswordCallbackpwcb
the client requests for the password to be added in to the //UT element}

and here is the request from javascrip


var sr =
"<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
"<soapenv:Envelope " + 

"xmlns:soapenv=\"\" " +
'<wsse:Security xmlns:wsse=\"\"
'<wsse:UsernameToken xmlns:wsu=""
'<wsse:Password Type="">bobPW</wsse:Password>'+
"<soapenv:Body>" +
"<nlo:InsertIntoDB>" +
'<nlo:data>'+xml+'</nlo:data>' +
' </nlo:InsertIntoDB>'+

'</soapenv:Body>' +

xmlhttp.onreadystatechange = function () 
if (xmlhttp.readyState == 4) 
if (xmlhttp.status == 200) 

// Send the POST request'POST', 'http://localhost:8080/axis2/services/hash_pass_security?wsdl', true);
xmlhttp.setRequestHeader('Content-Type', 'text/xml');
// send request


View raw message