• Post Reply Bookmark Topic Watch Topic
  • New Topic

Need to know steps to access web service  RSS feed

 
Saurabh Pillai
Ranch Hand
Posts: 529
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have few web services developed in ASP.NET and I need to access them using AXIS2 client. When I open the WSDL in browser, I need to enter username and password before I see the WSDL. I assume that means it is under HTTPS Basic authentication. Now can someone tell me steps to create AXIS2 client for it? How to pass basic authentication?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just about any SOAP implementation has tools that will create Java client code for you. Generally you would point them at the WSDL (either online or a local file) to do that.
 
Saurabh Pillai
Ranch Hand
Posts: 529
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried WSDL2Java tool.

I am getting this exception,
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See the last question in the http://www.coderanch.com/how-to/java/SecurityFaq.
 
Saurabh Pillai
Ranch Hand
Posts: 529
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The server is using GoDaddy certificate. I have also added certificate to my local Java installation using this.

I want to repeat one thing that I can't access the WSDL in point "directly", it means, when I type that URL, browser prompts me for username and password. And then I can see the WSDL. But I never entered them anywhere while generating client using WSDL2Java tool. I think somewhere it should be mentioned.

I also looked at the definition of WSDL2Java tool but there is no parameter for username/password.

ty
 
Bosun Bello
Ranch Hand
Posts: 1512
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the WSDL describe the security header? If so, then doesn't JAX-WS generate the code to pass the security credentials?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!