2011-03-17 78 views
2

我得到超时错误,当我尝试使用com.google.gdata.client.docs.DocsService获得了java.lang.RuntimeException:无法在上传文件

这里是上传文件来完成HTTP请求代码我使用:

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. 

超时而获取:https://docs.google.com/feeds/default/private/full/

我在调试模式下使用Eclipse中的应用程序引擎的SDK运行的应用程序。

回答

0

我认为这是一个非常古老的线程,但只是在回答另一个问题时才看到它。我希望你现在已经解决了它。

如果不是,那么您的服务是否已通过身份验证,您是否可以创建简单文档

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