aspose file tools*
The moose likes Web Services and the fly likes webservice client for secured webservices Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "webservice client for secured webservices" Watch "webservice client for secured webservices" New topic
Author

webservice client for secured webservices

Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1527
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


Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42289
    
  64
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.


Ping & DNS - my free Android networking tools app
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1527
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
Marshal

Joined: Mar 22, 2005
Posts: 42289
    
  64
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

Joined: Jun 22, 2005
Posts: 1527
So how to set headers for WS-Security auth for the stand alone java client (on JAX-RPC)?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42289
    
  64
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

Joined: Sep 28, 2006
Posts: 236
Hi Akhilesh,

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

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: webservice client for secured webservices