aspose file tools
The moose likes Web Services and the fly likes how to send user credentials to a protected restful webservice Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "how to send user credentials to a protected restful webservice" Watch "how to send user credentials to a protected restful webservice" New topic
Author

how to send user credentials to a protected restful webservice

saipraneeth nallapareddy
Ranch Hand

Joined: Dec 02, 2009
Posts: 159
hello ranchers,

i am trying to get the data from a restful webservice which is running using a java client program. I am able to connect to it and get the data, but the limitation in my code is that it can't connect to the restful endpoint which needs authentication. I h've tried search for this over online but couldn't get a proper clue. Can any one help me out.

The intention is to pass the username and password to the rest url where the authentication is required.

the two types of approaches i h've made is
H Paul
Ranch Hand

Joined: Jul 26, 2011
Posts: 299
If this help http://hc.apache.org/httpcomponents-client-ga/tutorial/html/authentication.html
Ask the restful web service provider for the type/kind of authentication needed.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: how to send user credentials to a protected restful webservice
 
Similar Threads
Apache HTTPClient UnAuthorized Issue
Java ArrayList into Name value pair
@FormParam with CXF 2.2
Calling webservice: works from standalone app but not from weblogic
Get ServletContext of a web app hosted in another server