Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to call a webservice with basic authentication  RSS feed

 
akhil karthik
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
akhil karthik
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I used RAD6 Websphere built in too to generate the client stubs. I don't know which API it must using..
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!