• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

HTTP Response from a ServerSocket

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a client that sends HTTP a request to a server. This server is a ServerSocket. I use the HTTPUrlConnection class to connect to the url where the ServerSocket is listening ( http://localhost:12299 ). I send my POST request ( containing an XML.. can I do this??)using the outputstream of the HTTPUrlConnection. Since it is HTTP, I also do a getInputStream on the connection. On the server side, I only seem to be getting the header info ( as a raw stream). I have a feeling that the getInputStream is blocking somewhere, bcos if I forcefully terminate the client (HTTP) the XML reaches the server (ServerSocket).
Anybody enlighten me on this... please
Regards,
Sowmya.

 
Ranch Hand
Posts: 439
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
interesting , when sending data you need to include \n at the end of it otherwise thereis no ending of a line , i had a problem like that before . maybe this is the case with you.
 
For my next feat, I will require a volunteer from the audience! Perhaps this tiny ad?
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic