Results 1 to 3 of 3
  1. #1
    grashmi13 is offline Member
    Join Date
    Sep 2010
    Rep Power

    Lightbulb empty response received

    Hi Nikita Rybak,

    I am facing similar problem. from my application, i am sending GET request for an xml file to a UPNP device(a router). But response which is a INputStream is of size 0.

    Code used is:
    URLConnection uc = descriptionURL.openConnection();
    if (uc instanceof HttpURLConnection) {
    HttpURLConnection huc = (HttpURLConnection)uc;
    int statusCode = huc.getResponseCode();
    String statusMsg = huc.getResponseMessage();

    if (logger.isDebugEnabled()) {
    logger.debug("code="+statusCode+" msg="+statusMsg);

    int i = 1;
    String name = uc.getHeaderFieldKey(i);

    while (name != null) {

    if (logger.isDebugEnabled()) {
    logger.debug(" " + name + ": " + uc.getHeaderField(name));

    name = uc.getHeaderFieldKey(++i);

    if (statusCode != 200) {
    throw new IOException("code="+statusCode+" msg="+statusMsg);
    } // end if
    documentStream = uc.getInputStream();

    received InputStream size is 0 here. And headerInfo received is:
    code=200 msg=OK
    875247 [t Delivery Queue] DEBUG DeviceParser - CONTENT-LENGTH: 6263
    875247 [t Delivery Queue] DEBUG DeviceParser - CONTENT-TYPE: text/xml; charset="utf-8"
    875247 [t Delivery Queue] DEBUG DeviceParser - LAST-MODIFIED: Wed, 01 Jan 2003 01:01:18 GMT
    875247 [t Delivery Queue] DEBUG DeviceParser - DATE: Wed, 01 Jan 2003 01:01:18 GMT
    875247 [t Delivery Queue] DEBUG DeviceParser - SERVER: OpenRG/ UPnP/1.0 SAGEM_LB/RG_VERSION
    875257 [t Delivery Queue] DEBUG DeviceParser - CONNECTION: close
    875257 [t Delivery Queue] INFO DeviceParser - documentStream : size=0

    Please let me know you have any workaround or solution or reason for the same. port at which my application listen response, is getting valid xml. But this response is not recieved at application layer.

    Your help is most appreciated.


  2. #2
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Rep Power


    Please pick one part of the forums to post in...

    I replied in the Networking forum.

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power


    Three cross-posts, two locked. As noted above. Please abide by the rules you agreed to on joining this forum and post a question once in the single best forum. Cross-posting is not allowed.

Similar Threads

  1. email received has To: undisclosed-recipients:
    By lse123 in forum Networking
    Replies: 6
    Last Post: 05-06-2010, 09:20 AM
  2. Who has received private message from codeforme
    By Fubarable in forum Forum Lobby
    Replies: 4
    Last Post: 04-13-2010, 04:00 AM
  3. detecting data received is malicious or not
    By prashant in forum Networking
    Replies: 2
    Last Post: 02-02-2009, 04:58 PM
  4. saving bytes received in different request
    By renuka_anil in forum Java Servlet
    Replies: 18
    Last Post: 12-26-2008, 01:12 PM
  5. saving bytes received in different request
    By renuka_anil in forum Advanced Java
    Replies: 3
    Last Post: 12-23-2008, 08:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts