Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

webservice client for secured webservices

 
Akhilesh Trivedi
Ranch Hand
Posts: 1603
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to write a webservice client that is secured with username and password?

I am on IBM RAD generated client for a service and getting



for one of my web service client. I have the user name and password, a solution provided at following URL seems too complex and not able understand.

https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000013855634
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My impression is that the person asking in that conversation is confused about HTTP authentication vs. WS-Security authentication. I think the last two posts are on target, but one should not do this in code, but declaratively.

I'm not familiar with RAD, but I think it's a commercial product, so it should have lots of documentation. The term to search for is "WS-Security" - that's the standard that defines authentication (amongst other things) for SOAP WS.
 
Akhilesh Trivedi
Ranch Hand
Posts: 1603
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf. What I think I need to put in is credentials for WS and not http.

I am able to hit the Webservice with username and password using "soapUI 3.6.1" but the same thing I dont know how to provide the credentials in the stand alone java client. I guess I am on JAX-RPC and I tried doing the following too.

Still the trace is as below



RAD is eclipse like IDE from IBM.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's the way to set auth headers for HTTP auth, not WS-Security auth - which is why I guessed that the person asking that question in the IBM forum was confused :-)
 
Akhilesh Trivedi
Ranch Hand
Posts: 1603
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So how to set headers for WS-Security auth for the stand alone java client (on JAX-RPC)?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:I'm not familiar with RAD, but I think it's a commercial product, so it should have lots of documentation. The term to search for is "WS-Security" - that's the standard that defines authentication (amongst other things) for SOAP WS.
 
Amirtharaj Chinnaraj
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Akhilesh,

If you have the solutions please Advice me. we are trying to do the same what you tried.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic