i am trying to acheive SSO where in a user logs into 1 application and when he clicks a link to other application he should be logged in automatically, without second authentication. I have been asked to use via HttpClient ?
however I have been having the following questions in my mind.. i have tried googling but not able to join all the dots...
1. difference betwwen axis and httpclient
2. An example where in httpclient can be used to access the webservice for authentication
how do i communicate between these 2 applications..
HttpClient is something completely different than Axis. If you read their respective home pages you'll understand why. Why don't you use a proper SSO solution? The http://faq.javaranch.com/java/SecurityFaq lists several open source Java SSO libraries.
what is the need for having an httpclient, i could direclty call a webservice .. am i correct ?
If by "direct" you mean from within some Java client code, then you're correct. Most (probably all) SOAP stacks have a tool that can generate Java client code to access a WS; generally it works by looking at the WSDL of the target WS. That generated client code would be much easier to work with than to use HttpClient. (The tool that ships with Axis is called "wsdl2java".)
so httpclient is another way by invoking a webservice.. I was not aware of that.. thanks for clarifying...
Do you have any idea how we could use httpclient to invoke a webservice.. ie if I have to use httpclient - how my request is going to be converted to xml.. and how abt the destination ?
Is this correct ---
1. Make an httpclient request.
2. In the request I would be have a destination url
3. This request is in the xml format ( for soap to undustand)
4. At the server I read the request and process it ..
If you could please light up your thoughts on this.. it would be of great help.. truely speaking i need to have a bigger picture in mind how I would be going about using httpclient to request a webservice for authentication..
I think you profoundly misunderstand what HttpClient is and does. It's a library for making HTTP requests programmatically; it has no WS capabilities. If you want to use it for making WS requests (why?), then you have to create all the SOAP involved in your own code - not a trivial undertaking.
Maybe it's time to take a step back and ask WHY you want to use HttpClient. You keep talking about authentication and SSO, but you have not said why you wish to avoid implementing a proper SSO solution.
The initial question also mentions "applications", not "web services" - what's the connection between the two?
Not looking good. I think this might be the end. Wait! Is that a tiny ad?
SKIP - a book about connecting industrious people with elderly land owners