The moose likes Web Services and the fly likes REST, Basic Authentication, Jersey, Poster, and Sharepoint Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "REST, Basic Authentication, Jersey, Poster, and Sharepoint" Watch "REST, Basic Authentication, Jersey, Poster, and Sharepoint" New topic
Author

REST, Basic Authentication, Jersey, Poster, and Sharepoint

Brian Mulholland
Ranch Hand

Joined: Mar 12, 2009
Posts: 32
So my project is getting ready to write a REST client and service that interfaces with sharepoint and other things. We're writing in Jersey (JAX-RS). I have a test service and client that talk to each other perfectly. But as I try to interface with sharepoint's REST API, things go awry. The Sharepoint service requires basic auth, but when we aim Poster or RESTClient (firefox add-ons) or my client at them, it fails. It returns a 200 error, but the response is HTML that says there was an internal error. I've assumed Poster would be doing everything right, and our issues were in sharepoint, but when i pointed poster at my service, it also didn't work.

I found a couple of issues posted online about poster implying that it does not set the headers, despite there being fields there implying it would. I'm a bit confused by these. I have to know that Poster is doing it right or else I can't know that my service or client are doing it right.

http://code.google.com/p/poster-extension/issues/detail?id=15
http://code.google.com/p/poster-extension/issues/detail?id=48

relevant snippets from the jersey service (very early stages of testing the plumbing)


snippets from the client


So I guess the question is whether simply putting the user id and password in the "User Auth" fields below the URL in poster should be basic authentication. And I wonder if what you see in the client and service are right for basic authentication.
Brian Mulholland
Ranch Hand

Joined: Mar 12, 2009
Posts: 32
Just to clarify, Poster works with neither MY service nor sharepoint basic auth, but RESTClient works with my service, not sharepoint.
 
 
subject: REST, Basic Authentication, Jersey, Poster, and Sharepoint
 
Threads others viewed
InputStream Problem at Client Side.
Microsoft Sharepoint web service from Java client
REST and Sharepoint 2010
Microsoft Sharepoint web services from java client
webservice calling from url
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture