kunalkfp
unread,
Mar 29, 2012, 2:30:20 AM
3/29/12
Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-docum...@googlegroups.com
Hello, I m trying to integrate the Google Docs API in android with Google-API-java-client-1.6.0 for the first time in android, and i have integrate it successfully. I got the List of files from account, I can Create the file with metadata only, but i couldn't upload the file.
Actually i m trying to upload the PDF file that is of around 1.2 MB, I first send the initial POST request that give me response as 200 OK, but after that when i send first chunk of data with the same request i used for initial request just by changing the method as put and URL as the next location, i got the following error on request.execute().
W/System.err(11656): org.apache.http.client.ClientProtocolException
W/System.err(11656): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:557)
W/System.err(11656): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
W/System.err(11656): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
W/System.err(11656): at com.google.api.client.http.apache.ApacheHttpRequest.execute(ApacheHttpRequest.java:58)
W/System.err(11656): at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:639)
W/System.err(11656): at com.android.example.googledoc.SampleLoginActivity.uploadDocs(SampleLoginActivity.java:268)
W/System.err(11656): at com.android.example.googledoc.SampleLoginActivity.onClick(SampleLoginActivity.java:115)
W/System.err(11656): at android.view.View.performClick(View.java:2408)
W/System.err(11656): at android.view.View$PerformClick.run(View.java:8816)
W/System.err(11656): at android.os.Handler.handleCallback(Handler.java:587)
W/System.err(11656): at android.os.Handler.dispatchMessage(Handler.java:92)
W/System.err(11656): at android.os.Looper.loop(Looper.java:123)
W/System.err(11656): at android.app.ActivityThread.main(ActivityThread.java:4633)
W/System.err(11656): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err(11656): at java.lang.reflect.Method.invoke(Method.java:521)
W/System.err(11656): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
W/System.err(11656): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
W/System.err(11656): at dalvik.system.NativeStart.main(Native Method)
W/System.err(11656): Caused by: org.apache.http.client.NonRepeatableRequestException: Cannot retry request with a non-repeatable request entity
W/System.err(11656): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:402)
W/System.err(11656): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
W/System.err(11656): ... 17 more
I have attached the source code.t's almost one week i m trying to resolve my problem but couldn't actually find it.
Any kind of help will be appreciated.
Thanks in Advance