开发者

Getting java.lang.RuntimeException: Unable to complete the HTTP request while uploading document

I am getting timeout error while I am trying to upload document using com.google.gdata.client.docs.DocsService

here is the code I am using:

DocumentListEntry documentEntry = new DocumentEntry();

documentEntry.setTitle(new PlainTextConstruct("new document"));

documentEntry.setMediaSource(new MediaByteArraySource(out.toByteArray(), mimeType));

DocumentListEntry uploadedEntry = service.insert(new URL("https://docs.google.com/feeds/default/private/full/"), documentEntry);   <-- timeout at this point.

Timeout while fetching: https:/开发者_C百科/docs.google.com/feeds/default/private/full/

I am running application in debug mode using app engine sdk in eclipse.


I think it is a very old thread, but just saw it while replying another question. I hope you have resolved it by now.

If not, then is your service authenticated and are you able to create a simple document e.g.

             String title = "Doc Create Test";
             DocumentListEntry newEntry = new DocumentEntry();
             newEntry.setTitle(new PlainTextConstruct(title));
             newEntry = service.insert(feedUrl, newEntry);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜