HTTPS post doesn't work on device but in the Simulator

You are looking for suggestions on why a https post works all the time on a simulator, but what installation on the device and test it works the first time but the time the rest of the time after that.

Here is most of the code, this came from another sample written and posted on BB forums.

I tried with the removed ConnectionTimeout, and with it the value of different values.

As mentioned it works the first two times, maybe even just the first time and not after once using the real device.

Any thoughts would be greatly appreciated.

private String of doTransaction (postString String)]
{
String [] ccResponse;
HttpsConnection SC;
OutputStream outStream = null;
String url = "https://url/; ConnectionTimeout = 60000 "; just removed the url to view the code

Try
{
HC = (HttpsConnection)
Connector.Open (url, Connector.READ_WRITE); Set the POST request method
hc.setRequestMethod (HttpsConnection.POST);
hc.setRequestProperty ("Content-Type", "application/x-www-formulaires-urlencoded");
hc.setRequestProperty ("Content-Length", Integer.toString (postString.length ()));

outStream = hc.openDataOutputStream ();
outStream.write (postString.getBytes ());
outStream.flush ();
outStream.close ();
Get the answer back to the servlet
            
hc.getResponseCode ();
            
            
InputStream is = hc.openDataInputStream ();
LineReader lr = new LineReader (is);

While (true)

{
Try
{
Byte [] arr = lr.readLine ();
String $thisline = new String (arr);
Dialog.Inform ($thisline);
If (! thisLine.endsWith ("="))
{
Dialog.Inform ("splitting");
If ends with =, not split
String [] splitLineResponse;
String separator = '=';
splitLineResponse = split (new String (arr), separator);

String responseItem = splitLineResponse [0];
String responseValue = splitLineResponse [1];

There are a lot of topics split here.

}
                    
                        
}
catch (e EOFException)
{
Reached end of file
Dialog.Inform ("expressions of folklore Exception" + e.getMessage ());
break;
}
}
HC. Close();
            
}
catch (Exception ex)
{
Transaction time-out
Dialog.Alert ("TransException" + ex.getMessage ());

}
postData = null;
Return ccResponse;
        
}

How is it a failure?

My guess is that the problem is that the unit does not have a connection. Without any connection parameter, it will connect via MDS if the device is a network of MDS; If not, he'll probably try direct TCP. In the latter case, it will fail unless the APN settings are set correctly. The carrier may also have something to say about it.

I suggest you read the post-it by Peter Strange and also check out the videos of transport network that RIM posted. They provide a lot of information on how to establish connections.

Tags: BlackBerry Developers

Similar Questions

  • Downloaded cloud of CS of the trial, the trial has expired but did not continue, the time to be happy with CS5.5. Now my Acrobat doesn't work, decided to reload all the software, while downloading, an error appears: exit all applications: SafariCloudHisto

    Downloaded cloud of CS of the trial, the trial has expired but did not continue, the time to be happy with CS5.5. Now my Acrobat doesn't work, decided to reload all the software, while downloading, an error appears: exit all applications: SafariCloudHisto, why can I not proceed with the download, quit all programs that are restarted, everything always the same message. Any thoughts there?

    See the link below:

    https://helpx.Adobe.com/Acrobat/KB/install-prompt-close-safarinotificati.html

  • Just got 2 of SE. Weather app works on one but not the other.

    Just got 2 of SE. Weather app works on one but not the other. Ideas?

    Drosea,

    Define/describe does not.

    What's the weather App?

  • Download previous versions of Premiere Pro? The most recent one doesn't work on my computer. The screen keeps flashing black and white.

    Download previous versions of Premiere Pro? The most recent one doesn't work on my computer. The screen keeps flashing black and white.

    Hello

    You can see the following link to find out how to download a previous version of creative cloud apps.

    Download and install Adobe Creative Cloud apps

  • PS of CS4 - using my Rectangle tool doesn't work either it stretch from the lower right of the rectangle to the size. Is it a software flaw that has a solution?

    PS of CS4 - using my Rectangle tool doesn't work either it stretch from the lower right of the rectangle to the size. Is it a software flaw that has a solution?

    If the marquee tool worked correctly in the past, I would propose a reset of this tool.

    Select the marquee tool, then go to the top where the Options are for her.

    The left icon is the rectangular marquee tool. Right-click on it to display the reset menu, then choose "Reset Tool".

    He put the Marquee tool back to its "default values.

  • I have Adobe ID (* E-mail address Removed *) I want to buy Adobe Illustrator and Adobe Indesign for a year, but when I try it doesn't work. I see only the loading...

    I have Adobe ID (*deleted Email address *) I want to buy Adobe Illustrator and Adobe Indesign for a year, but when I try it doesn't work. I only see loading...

    Borisp40653041 it is likely that the difficulties to install the Adobe Creative application and the inability to communicate with our support team are both affected by your current web browsers security settings or modules.  Please try the links offered by Mary in another web browser.

    I recommend also to install and update applications - https://helpx.adobe.com/creative-cloud/help/install-apps.html , which deals with the installation procedure of applications Adobe Creative, included with your membership, using creative Cloud Desktop.

  • HTTPS Post does not work in the OFA Page

    Hi all

    I created a Page of the OFA, by clicking on button I do next.

    //--------------------------------------------------------
    private static String contactService(String xmlInputString) throws Exception {}
    String outputStr = null;
    OutputStream outputStream = null;
    try {}

    URL url = new URL ("https://wwwcie.ups.com/ups.app/xml/ShipConfirm");

    HttpURLConnection connection = () (HttpURLConnection) url.openConnection;
    System.out.println ("Customer connection established with" + url.toString ());
    Configure the HTTP POST parameters
    connection.setDoOutput (true);
    connection.setDoInput (true);
    connection.setUseCaches (false);

    outputStream = connection.getOutputStream ();
    outputStream.write (xmlInputString.getBytes ());
    outputStream.flush ();
    outputStream.close ();
    System.out.println ("Http status =" + connection.getResponseCode () + "" + connection.getResponseMessage ());

    outputStr = readURLConnection (connection);
    System.out.println ("Response..." + outputStr);
    } catch (Exception e) {}
    System.out.println ("error sending data to the server..." + e.getMessage ());
    throw e;
    } {Finally
    If (outputStream! = null) {}
    outputStream.close ();
    outputStream = null;
    }
    }
    Return outputStr;
    }

    //----------------------------------------------------
    public static String readURLConnection (URLConnection uc) throws Exception {}
    StringBuffer buffer = new StringBuffer();
    BufferedReader reader = null;
    try {}
    reader = new BufferedReader (new InputStreamReader (uc.getInputStream ()));
    Letter int = 0;
    reader.readLine ();
    While ((letter = reader.read ())! = - 1) {}
    Letter from buffer. Append ((Char));
    }
    Reader.Close ();
    } catch (Exception e) {}
    System.out.println ("could not read from URL:" + try ());
    throw e;
    } {Finally
    If (reader! = null) {}
    Reader.Close ();
    Reader = null;
    }
    }
    Return buffer.toString ();
    }

    Now, when I run this JDEVELOPER local it works fine, but when when depolyed on the server, then when I click the button then page gets hanged and it does nothing.
    Is there any setting I should do in APPS environment. or anyone had done the same. any help will be appreciated.

    Thank you
    Vijay chraibi

    Hello

    If your code works fine in JDev and it does not work on the instance, then you can trigger SR with Oracle for Ptoduct JDeveloper.

    Kind regards
    Out Sharma

  • Bluetooth doesn't work does not correctly after the installation of Windows Vista Home Premium Service Pack 2 (SP2) on Dell laptop

    I searched this forum and almost all resources on the net for days now nothing works.  Give the message to a thread more appropriate that I couldn't find one that is truly representative and am a newb at this.

    Summary of the problem: Bluetooth connectivity does not work properly after the window Vista Home Premium Service Pack 1 and 2 installation (SP 1 and 2).

    My system:

    Laptop Dell Inspiron E1705, 32-bit Winows Vista Home Premium SP2, Dell Wireless Bluetooth 355 Module + EDR 2.0

    * My system was purchased in 2006 with Windows XP, but was not entitled to a free Windows Vista Home Premium Upgrade I did. I installed Windows Service Pack 1 and 2 about a week ago.

    Problem: After downloading and installing the Windows Vista Home Premium Service Pack 1 and 2 (SP 1 and 2), my system does not recognize my Bluetooth (a touch of Sprint also) device known as the HTC Vogue.  I stress that I have not had any problems with this device before downloads.  I can't revert to the pre - SP State 1 and 2 because my system restore does not have these points more.

    I have read several posts on various sites about people having similar problems with Bluetooth connectivity after the Vista SP 1 and 2 facilities.  The problem is obviously the need for an updated driver.  I went to the site to download driver Dell and the Blueooth only updates available are the following. (Note: these drivers all date from 2006 and 2007).

    http://support.dell.com/support/downloads/driverslist.aspx?c=us&cs=RC956904&l=en&s=pub&SystemID=INS_PNT_P4_9400&os=WLH&osl=en&servicetag=&catid=-1&impid=-1&deviceid=12084&libid=5&typeid=-1&dateid=-1&formatid=-1&source=-1&releaseid=R159805&formatcnt=1&vercnt=1

    I had these installed before the SP 1 and 2 have been installed and they worked very well. After the upgrade, these drivers do not work.  They won't recognise BT devices.  I tried to upgrade the drivers by using update Broadcom suggested below it, but an error of following installation to contact Dell.

    http://www.Broadcom.com/support/Bluetooth/update.php

    I contacted Dell via e-mail and on the phone, but they want to charge me $60 for a one time service call just to talk about the problem because my warranty has expired. Provide updated drivers is not a problem of security in my opinion.  Even after explaining the situation, their continuous support to just send me the link to download Driver Dell above with out-of-date drivers.  I guess that's what they are charged to do, they do not have to admit a problem of compatibility.  This obviously the same link they would charge $60 to send.  I explained that I need just a Bluetooth Driver from Dell to at least version 6.3.   Needless to say, I will never buy another Dell product.

    On my end, I tried to uninstall my current drivers and then by installing a newer driver to support Gateway (Version 6.2.1.500 for and Acer).  This allows me to install some parts of this update and the update Broadcom. However, it is not a perfect installation and expires after about 90% saying "this update is not for this system" because it is the gateway not Dell to be provided.  Displays the version of the driver on my computer is Version 6.3.5.430 after doing this, but it is not a complete installation and some features are not available.

    Does anyone have experience with this issue? I would like to have a link with some bluetooth drivers generic Version 6.3 type which will allow me to use the Broadcom link to upgrade to the last version that works with Vista SP 1 and 2.

    Thank you for your help.

    Support FREE from Microsoft for SP2:

    https://support.Microsoft.com/OAS/default.aspx?PRID=13014&Gprid=582034&St=1

    Free unlimited installation and compatibility support is available for Windows Vista, but only for Service Pack 2 (SP2). This support for SP2 is valid until August 30, 2010.

    Microsoft free support for Vista SP2 at the link above.

    See you soon.

    Mick Murphy - Microsoft partner

  • Envy of HP dv6 7252er: laptop keyboard doesn't work anymore, any usb in the BIOS menu and start. In Windows, it works

    Recently, the keyboard no longer, no usb, in the BIOS menu bottled in the menu where you choose the Safe Mode boot. It's when you start the laptop, I press F10, it works in the BIOS, and is not a button doesn't work, the time comes, while the BIOS does not work. Also bottled menu at startup, I press F9, comes in bottles menu, but can't decide where to begin, arrows and enter does not.
    Laptop HP Envy dv6 7252er, a month or two ago, it worked.
    I must say, the night went to remove battery CMOS (Bios), bios folded, reinstalled windose. Did not help. In most windose, keyboard works.
    Any suggestions of what to do, or what could be the problem?

    PS Google translator

    The problem is resolved. Flashed the BIOS.
    Keyboard does not not in the BIOS menu and booth. Windows worked.

    After flash it worked.
    For flashed using the key USB Flash Drive and Windows + B. Image from the installer.

  • Scrolling is very slow in the unit. But in the Simulator, it works well


    My suspicion is that your device and the Simulator are at different levels of the BONE, and a level of operating system manages some internal processing differently to the other.  In general, when scrolling is slow, it's a matter of page layout.

    With this in mind and I'm not as good as others on this forum, there are two questionable things in your code.

    (a) super.setFont (Values.getDefaultFont ());

    Every time you paint anything in your gridManager, you ask to change the font for all what he.  Obviously if you change the font, it will all the fields to make sure they correspond to the new provision.  If you are originally a provision whenever you paint.  I'm surprised that you get anywhere with it because at the end of the layout, you probably call paint to ensure that the screen reflects the new layout.  It is I think where is your problem.

    You must not change the font in the paint.

    (b) setExtent (displayWidth, displayHeight);

    I don't think you need to do this.  You can force the full width with a USE_ALL_WIDTH on the constructor.  But this, I'm not sure.

    I'd be certain that (a) is your problem.

  • Tools doesn't work does not correctly to the second screen!

    I have several screens on mac mg. When I move the additional screen illustrator, some tools, like the pen tool, no longer work correctly. sjmilar setting in the case changed. but when I move the program back to the main screen of what the pen tool works perfectly. y at - there anyth I ng you can do. It worked fine before, but I'm not sure if there is a setting that has been changed without knowing. CS6

    System Preferences > displays and drag the menu white on the screen that you want to be the main screen.

  • HP Pavilion Elite m9543uk: BDDVDRW GBC-H20L CD/DVD doesn't work does not, but is in the Device Manager

    BDDVDRW GBC-H20L CD/DVD does not work after update to Windows 10 Pro Windows 7 Pro this in Device Manager & this PC but when I double LK on this take a long time to load (it is called playing autoplay but does ' t), then it says Windows cannot access the specified device, path or file. You do not have the appropriate permissions to access the item (I am an administrator with full control).  When I RC on the reader a list of options come & I play the disk after a long wait. but it is very choppy can you please help. I also tested for all the bad guys, but I seem to be clean.

    Again thanks for the advice I will now roll back to Windows 7

  • Hotmail no longer works. I can open mail on yahoo, MSN premium, IE9, chrome, but firefox doesn't work anymore? I reinstalled the two and point of restoration, still broken?

    When I open the Fire Fox, click Hotmail, it opens the page with the open.cannot of the Inbox folder, click on anything? Cannot open the mail, or all records thereon, the cursor turns into a finger, but nothing opens or closes in all? reinstalled evrything, made a restore point. It works on all browsers, but firefox? use fire fox for years?

    I found the problem. It's the ad block plus 2.0. I just noticed that I was disabling each of them was. I noticed in Firefox that the envelopes have disappeared! That's why the post did not open, so in safe mode with disabled modules returned envelopes. then I restarted in reg mode and then turned off one-by-one. It was the adBlock Plus 2.0. Thank you for your advice. I would have never found. Thank you!

  • Suddenly, an e-mail account doesn't work. Tried to remove the account and add it back, but it will not set up. Help?

    I have multiple accounts msn/hotmail. It has recently stopped working for no apparent reason.

    I tried to delete the account (from Thunderbird) and add new. It will not, configure saying "Configuration could not be verified - is the name of user or wrong password?

    I can connect to my account via the website (hotmail.com), but can't make it work in Thunderbird. Any suggestions?

    Thank you!!

    We had a whole bunch of users have reported problems with hotmail this week.

    Take a look at this thread: https://support.mozilla.org/en-US/questions/1147439

  • WiFi doesn't work on devices

    I have A1409 time capsule. WiFi works well for Iphone, iPad, mac air. My problems are WiFi printer, thermostat, video doorbell, wemo stop working after only a few days. All devices loses connection and then I have to do a reset on TC and all devices. Trying to decide if the TC must be replaced with another brand.

    TC Gen4 is at least 3 years now which is the economic life of a large number of national network equipment now.

    I would buy a router... wireless one of the AC1900 models later... and fill the TC it and keep it for use only with Time Machine.

    Apple had not yet replaced the Gen5 TC and the design is getting too old to consider.

Maybe you are looking for

  • Firefox deleted my Evernote cutting function, how do I get it back?

    Firefox has sent a message that the browser works slowly and then I ran the fix. Now my Evernote cutting function is missing and I don't know how to get it back.

  • HP Pavilion Slimline s7000n PC: HP Pavilion Slimline s7700 recovery disk for proclaiming

    Hello I clear my system using what I've been though a restallation vista drive. I used "RepairOS fixing system for all computers Boot CD Windows" I thought that he would return to the reset to factory, but instead, he destroy everything. How much wou

  • Airport Express from Apple

    I plugged my music system in an Airport Express as a work-around to play the music from Apple through Sonos.  Now I can get music Apple app Sonos, and my network is provided by my Time Capsule, Airport Express has all the useful functions or should I

  • Since my apple ipad AirPrint

    Cannot print from my apple ipad even if the printer is found.

  • black screen on HP Pavilion laptop

    After installing an update from Microsoft, my HP laptop suddenly went black and would not restart.Have tried rebooting in safe mode and may come to the point where I chose "start in safe mode" but the laptop does not start.The screen stays black, but