2011-03-17 46 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); 
相關問題