Hi Vic,

This is the worksheet url returned for the above program.

https://spreadsheets.google.com/feeds/worksheets/0Ag0FuF2dmfJrdEJubFBmR0ZiUVRSZjhYemJvU21SOHc/private/full

Thanks & Regards,
Sarath

On Sep 28, 8:23 am, Sarath K S <[email protected]> wrote:
> Hi Vic,
>
> Thanks for the reply. But I am getting the same error. I am attaching my
> sample code and the output and the exception I am getting. I am using Google
> 3.0 jars.
>
> *SAMPLE CODE:*
>
> *import java.net.URL;
>
> import com.google.gdata.client.authn.oauth.GoogleOAuthParameters;
> import com.google.gdata.client.authn.oauth.OAuthHmacSha1Signer;
> import com.google.gdata.client.authn.oauth.OAuthSigner;
> import com.google.gdata.client.spreadsheet.SpreadsheetService;
> import com.google.gdata.data.spreadsheet.SpreadsheetEntry;
> import com.google.gdata.data.spreadsheet.WorksheetFeed;
>
> public class GoogleDocsManager
> {
>     public static void main(String[] args) {
>         try {
>             SpreadsheetService service = new
> SpreadsheetService("Cordys-ProcessFactory-Test");
>             service.setHandlesCookies(false);
>
>             GoogleOAuthParameters oauthParameters = new
> GoogleOAuthParameters();
>             oauthParameters.setOAuthConsumerKey("cpftest2.com");
>
> oauthParameters.setOAuthConsumerSecret("SSDRmPcnzHjBCEE9Au3Uumq0");
>
>             OAuthSigner signer = new OAuthHmacSha1Signer();
>
>             service.setOAuthCredentials(oauthParameters, signer);
>
>             String url = "
> http://spreadsheets.google.com/feeds/spreadsheets/private/full/0Ag0FuF2dmfJrdEJubFBmR0ZiUVRSZjhYemJvU21SOHc?xoauth_requestor_id=kvin...@cpftest2.com
> ";
>
>             SpreadsheetEntry sEntry = service.getEntry( new URL(url),
> SpreadsheetEntry.class );
>             System.out.println( "returned worksheet url =" +
> sEntry.getWorksheetFeedUrl().toString() );
>             service.getFeed( sEntry.getWorksheetFeedUrl(),
> WorksheetFeed.class );
>         } catch (Exception e) {
>             e.printStackTrace();
>         }
>     }
>
> }*
>
> *OUTPUT:*
>
> *returned worksheet url 
> =https://spreadsheets.google.com/feeds/worksheets/0Ag0FuF2dmfJrdEJubFB...
> *
> com.google.gdata.util.AuthenticationException: Unknown authorization header
> <HTML>
> <HEAD>
> <TITLE>Unknown authorization header</TITLE>
> </HEAD>
> <BODY BGCOLOR="#FFFFFF" TEXT="#000000">
> <H1>Unknown authorization header</H1>
> <H2>Error 401</H2>
> </BODY>
> </HTML>
>
>     at
> com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:564)
>     at
> com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:543)
>     at
> com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:536)
>     at
> com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:515)
>     at
> com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:515)
>     at com.google.gdata.client.Service.getFeed(Service.java:1053)
>     at com.google.gdata.client.Service.getFeed(Service.java:916)
>     at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:631)
>     at com.google.gdata.client.Service.getFeed(Service.java:935)
>     at
> com.cordys.external.google.GoogleDocsManager.main(GoogleDocsManager.java:31)
>
> Regards,
> Sarath
>
>
>
>
>
>
>
> On Wed, Sep 28, 2011 at 5:16 AM, Vic Fryzel <[email protected]> wrote:
> > s _always_ an xaouth_requestor_i

Reply via email to