Looks like your proxy server doesn't support POST? That seems pretty
weird. I would think it would support both GET and POST at least (if
not PUT/DELETE).

Cheers,
-Jeff

On Feb 12, 4:29 am, animesh <[email protected]> wrote:
> Hi,
> I am trying out just basic stuff of retrieving albums and adding a
> pgoto to some album already created.
>
> The source code is taken from the picasa  developer's Guide : java.
>
> The code is as follows
> POST 
> URLhttp://picasaweb.google.com/data/feed/api/user/myusername/albumid/alb...
>
> Assumption :
> The value of album id is same what i get from entry.getId() as below:
>
>        PicasawebService myService = new PicasawebService("My
> Application");
>         myService.setUserCredentials(args[0],args[1]);
>
>         // Get a list of all entries
>         URL metafeedUrl = new URL("http://picasaweb.google.com/data/
> feed/api/user/"+args[0]+"?kind=album");
>         System.out.println("Getting Picasa Web Albums entries...\n");
>         UserFeed resultFeed = myService.getFeed(metafeedUrl,
> UserFeed.class);
>         List<GphotoEntry> entries = resultFeed.getEntries();
>         for(int i=0; i<entries.size(); i++) {
>           GphotoEntry entry = entries.get(i);
>           System.out.println("id= "+entry.getId());
>         }
>   entry.getId() gives an Id something 
> likehttp://picasaweb.google.com/data/entry/api/user/myusername/albumid/53...
>
> So i take albumid value = 5301868943489182417for POST url
>
> When i try to Add a photo to album as below
>      PhotoEntry myPhoto = new PhotoEntry();
>       myPhoto.setTitle(new PlainTextConstruct("Puppies FTW"));
>       myPhoto.setDescription(new PlainTextConstruct("Puppies are the
> greatest."));
>       myPhoto.setClient("myClientName");
>
>       MediaFileSource myMedia = new MediaFileSource(new File("C:\
> \cl1.bmp"), "image/bmp");
>       myPhoto.setMediaSource(myMedia);
>       PhotoEntry returnedPhoto = myService.insert(albumPostUrl,
> myPhoto);
> I get the following error with error code 501 (found using WireShark)
>
> HTTP/1.0 501 Not Implemented
> Server: squid/2.5.STABLE14
> Mime-Version: 1.0
> Date: Thu, 12 Feb 2009 12:10:57 GMT
> Content-Type: text/html
> Content-Length: 1173
> Expires: Thu, 12 Feb 2009 12:10:57 GMT
> X-Squid-Error: ERR_UNSUP_REQ 0
> X-Cache: MISS
> X-Cache-Lookup: NONE
> Connection: close
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
> "http://www.w3.org/TR/html4/loose.dtd";>
> <HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html;
> charset=iso-8859-1">
> <TITLE>ERROR: The requested URL could not be retrieved</TITLE>
> <STYLE type="text/css"><!--BODY{background-color:#ffffff;font-
> family:verdana,sans-serif}PRE{font-family:sans-serif}--></STYLE>
> </HEAD><BODY>
> <H1>ERROR</H1>
> <H2>The requested URL could not be retrieved</H2>
> <HR noshade size="1px">
> <P>
> While trying to retrieve the URL:
> <A HREF="http://picasaweb.google.com/data/feed/api/user/myusername/
> albumid/5301868943489182417">http://picasaweb.google.com/data/feed/api/
> user/myusername/albumid/5301868943489182417</A>
> <P>
> The following error was encountered:
> <UL>
> <LI>
> <STRONG>
> Unsupported Request Method and Protocol
> </STRONG>
> </UL>
>
> <P>
> Squid does not support all request methods for all access protocols.
> For example, you can not POST a Gopher request.
> <P>Your cache administrator is <A HREF="mailto:root";>root</A>.
>
> <BR clear="all">
> <HR noshade size="1px">
> <ADDRESS>
> Generated Thu, 12 Feb 2009 12:10:57
> (squid/2.5.STABLE14)
> </ADDRESS>
> </BODY></HTML>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Picasa Web Albums API" 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-Picasa-Data-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to