Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User bejoy_ak's Avatar
    Join Date
    Oct 2009
    Location
    Delhi
    Posts
    124
    Hi all

    I am trying to upload a .jpg file using HTTP Post method, but when i try upload i'm getting error-
    "Getting Java.io.IOException:53-Error in HTTP Operation"

    Even though its showing error by balance is getting reduced.

    Please help me to solve this error
    Thanks & Regards
    Bejoy A K

  2. #2
    Registered User bejoy_ak's Avatar
    Join Date
    Oct 2009
    Location
    Delhi
    Posts
    124
    Hi All

    Why is [moved] coming in front of my thread.?
    Thanks & Regards
    Bejoy A K

  3. #3
    Nokia Developer Champion hartti's Avatar
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192
    Someone of the moderators moved the thread to a better sub-forum and marked it with "[moved]". No need to worry about that.

    What comes to your question. Hard to answer with this little detail.
    Which device are you talking about?
    Is the image big? Have you tried with a really small image?
    What do you mean by this "Even though its showing error by balance is getting reduced." - are you saying that your data transfer balance shows that you have transferred data over the cellular network? Or something else?
    Do you have access to the server you are uploading the data? Do you see any error messages in there? Is the file transferred completely?
    Etc.

    Hartti

  4. #4
    Registered User bejoy_ak's Avatar
    Join Date
    Oct 2009
    Location
    Delhi
    Posts
    124
    Hi hartti

    Thanks hartti for the reply
    Now coming to the actual question

    i am using nokia 6303 classic..the images are less than 3KB...my balance is getting reduced..but the mobile device is showing Consumed volume 0.00MB


    The server guy told me that the request for uploading the photo hasnt reached the webservice..
    Below is the code part that i am using for uploading file

    String params = new String("strUserName=trxfileupload"+"&strPassword=trxfileupload"+"&strFileName="+fileName+"&base64String="+baseStr+"&strReturn=result");
    url ="http://www.trx.in/m/photoupload/photoupload.asmx?op=UploadFile";
    httpConn = (HttpConnection)Connector.open(url,Connector.WRITE);
    // Setup HTTP Request to POST
    httpConn.setRequestMethod(HttpConnection.POST);
    httpConn.setRequestProperty("User-Agent","Profile/MIDP-2.0 Confirguration/CLDC-1.1");
    httpConn.setRequestProperty("Accept_Language","en-US");
    //byte[] postmsg = params.getBytes();
    //Content-Type is must to pass parameters in POST Request
    httpConn.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
    httpConn.setRequestProperty("Content-Length", Integer.toString(params.length()));
    //getConnectionInformation(httpConn);
    os = httpConn.openOutputStream();
    //os.flush();
    os.write(params.getBytes());
    // append("Data send");
    os.flush();

    StringBuffer sb = new StringBuffer();
    is = new DataInputStream(httpConn.openDataInputStream());
    //Display.getDisplay(midlet).setCurrent(new Alert("Exception","Data send",null,AlertType.ERROR));
    int length = (int)httpConn.getLength();
    byte[] data = new byte[length];
    is.read(data);
    Thanks & Regards
    Bejoy A K

  5. #5
    Nokia Developer Champion traud's Avatar
    Join Date
    Mar 2003
    Posts
    3,898
    Did you try the emulator? There you can use the Network monitor and Wireshark to debug this much easier.

Similar Threads

  1. java.io.IOException : Error in HTTP operation
    By hieuttit in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2011-10-17, 16:15
  2. java.io.IOException: 7-Error in HTTP operation
    By murugacse4 in forum Mobile Java General
    Replies: 1
    Last Post: 2011-08-22, 20:49
  3. IOException java.io.IOException: 40-Error in HTTP operation
    By @RainierLabs in forum Mobile Java General
    Replies: 2
    Last Post: 2011-05-06, 14:23

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved