Search This Site

Custom Search

Saturday, December 11, 2010

Re: [bloggerDev] Re: HTTPRequest in Java - unexpected end of line


On Sun, Dec 12, 2010 at 1:01 AM, tim <timwebuk@gmail.com> wrote:
Hi Brett,

Thanks for the quick response.  I guess it has just been a lack of
research on my part as to why I haven't been using your existing
libraries!  I'll look into those links you've specified - but as
always, I'm still extremely curious as to why my existing method does
not work so if you could look at my source, that'd be great!

And maybe email me the Wireshark trace you come up with?

Wireshark is at http://www.wireshark.org/ 
 
Cheers,

Tim.

On Dec 10, 8:12 pm, Brett Morgan <brettmor...@google.com> wrote:
> Heya Tim,
>
> 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 covershttp://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
>
>
>
>
>
>
>
>
>
> On Sat, Dec 11, 2010 at 4:17 AM, tim <timwe...@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(UnknownSource)
> >        at sun.net.www.http.HttpClient.parseHTTP(UnknownSource)
> >        at sun.net.www.http.HttpClient.parseHTTPHeader(UnknownSource)
> >        at sun.net.www.http.HttpClient.parseHTTP(UnknownSource)
> >        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<bloggerdev%2Bunsubscribe@googlegrou ps.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.




--
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