aspose file tools
The moose likes Web Services and the fly likes How to call a webservice with basic authentication Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "How to call a webservice with basic authentication" Watch "How to call a webservice with basic authentication" New topic
Author

How to call a webservice with basic authentication

akhil karthik
Greenhorn

Joined: Jul 06, 2009
Posts: 13
My client app is calling a webservice which has basic authentication. How should i approach using java. I used wsdl2java to generate the stubs etc. But when i am actually calling the methos in the service, i am getting 401 unauthOrised..
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35258
    
    7
Which API are you using? See http://faq.javaranch.com/java/WebServicesHowTo#http-headers for JAX-WS and SAAJ, and http://faq.javaranch.com/java/WebServicesHowTo#basic-auth for JAX-RPC.


Android appsImageJ pluginsJava web charts
akhil karthik
Greenhorn

Joined: Jul 06, 2009
Posts: 13
I used RAD6 Websphere built in too to generate the client stubs. I don't know which API it must using..
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How to call a webservice with basic authentication
 
Similar Threads
Invoking HTTPS webservice
Session timoeout on JSP
Websphere WSDL2java - how to connect to webservice
Current User or session information
Basic authentication