First up, i'm curious why you aren't using either of our java libraries, as they will save you time over implementing everything from scratch.
http://code.google.com/p/gdata-java-client/ - the older client library that the blogger api documentation covers
http://code.google.com/p/google-api-java-client/ - the newer client library that works on AppEngine and Android
Otherwise, can you supply your source code so that I can inspect what it is doing via wireshark?
brett
--
Brett Morgan
-- On Sat, Dec 11, 2010 at 4:17 AM, tim <timwebuk@gmail.com> wrote:
Hi everyone,
I'm new to the group here, so sorry if this question has been asked
before - can't seem to find it anywhere online.
Using the class HTTPURLConnection I am able to authenticate with the
Blogger service and successfully obtain an authentication key -
however when I send a further request to insert a blog post, my
application times out and eventually I get the following exception:
java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)
at HTTPOperations.httpPOST(HTTPOperations.java:60)
at TestClass.main(TestClass.java:56)
However, when I manually send a request using cURL, it adds the new
blog post completely fine! So I guess my question is, what is the
Blogger service sending back, that HTTPURLConnection.getInputStream()
is failing on?
Cheers,
Tim.
--
You received this message because you are subscribed to the Google Groups "Blogger Developer Group" group.
To post to this group, send email to bloggerdev@googlegroups.com.
To unsubscribe from this group, send email to bloggerdev+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bloggerdev?hl=en.
--
Brett Morgan
Developer Programs Engineer, Blogger
You received this message because you are subscribed to the Google Groups "Blogger Developer Group" group.
To post to this group, send email to bloggerdev@googlegroups.com.
To unsubscribe from this group, send email to bloggerdev+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bloggerdev?hl=en.
No comments:
Post a Comment