Is it possible to rename an existing spreadsheet using the Java API?

1. If so - how? I tried the following but it gave an error. Any
assistance appreciated!

---------------code-------------
//I retrieve the spreadsheet entries, iterate to the entry to be
renamed and rename it
entry.setTitle(ptc);//ptc has the new spreadsheet name

//Save the entry. The url is the url to retrieve the list of
spreadsheets above
service.insert(url, entry); //code fails here



-------------error---------------


com.google.gdata.util.InvalidEntryException: Bad Request
Invalid request URI
----------------------------


The protocol document says it's possible as follows

-------------XML POST request for rename---------------

PUT /feeds/documents/private/full/spreadsheet%3Aspreadsheet_id
Host: docs.google.com <http://docs.google.com>
Authorization: <your authorization header here>
Content-Length: 292
Content-Type: application/atom+xml

<?xml version='1.0' encoding='UTF-8'?>
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom";
    gd:etag="BxAaTxRZAyp7ImBq">
  <atom:category scheme="http://schemas.google.com/g/2005#kind";
      term="http://schemas.google.com/docs/2007#spreadsheet"; />
  <atom:title>example spreadsheet</atom:title>
</atom:entry>

http://code.google.com/apis/documents/docs/2.0/developers_guide_protocol.html#UpdatingMetadata

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Docs Data APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Docs-Data-APIs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to