java - Access web service with basic authentication -


i need access web service authentication. give me soap , wsdl. can input username/password in soapui , response. told me use basic authentication in web service. how username , password transferred? htp://xxx/xxxservice?userid=&password=? or username/password saved in soap message?

and how can deal username/password in client code generated wsimport? can input them?

i using jax-ws, wsgen , wsimport access service.

i'm not expert myself if you're using basic auth jax-ws can use

   authenticator myauth = new authenticator(){         @override         protected passwordauthentication getpasswordauthentication()         {             string user="user",pass="pass";             return new passwordauthentication(user, pass.tochararray());         }     };      authenticator.setdefault(myauth); 

i call inside method actionperformed(actionevent ae), when call action of button, , works fine. i've read security risk, basic test works fine.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -