Get answer HttpPost and not

I call the web service using HTTP POST. But I get no answer. Here's the code.

public static String getPostData()
{
String url = "http://services.ex.samples.com/doAct.aspx";
InputStream is = null;
postData byte [] = null;
Gross StringBuffer = new StringBuffer();
Dim retVal = "";
If (CoverageInfo.isOutOfCoverage ())
{
Returns a null value.
}
Try
{
HttpConnection httpConnection = (HttpConnection), Connector.open (url);
httpConnection.setRequestMethod (HttpConnection.POST);

httpConnection.setRequestProperty ("Content-Type", "application/x-www-formulaires-urlencoded");

URLEncodedPostData encPostData = new URLEncodedPostData ("UTF - 8", false);

encPostData.append ("str1", "ABC");
encPostData.append ("strCode", "");

encPostData.append ("abcd", "0");
encPostData.append ("spercu", "ABCD");

encPostData.append ("strParam1", "");
encPostData.append ("strParam2", "");

encPostData.append ("strParam3", "");
encPostData.append ("strParam4", "");

encPostData.append ("strParam5", "");
encPostData.append ("strParam6", "");

encPostData.append ("strParam7", "");
encPostData.append ("strParam8", "");

encPostData.append ("strParam9", "");
encPostData.append ("strParam10", "");

postData = encPostData.toString ().getBytes("UTF-8");
httpConnection.setRequestProperty ("Content-Length", String.valueOf (postData.length));

OutputStream os = httpConnection.openOutputStream ();
OS. Write (postData);

a = httpConnection.openInputStream ();
int len = (int) httpConnection.getLength ();
int size = 0;
While (-1! = (len = _is.read (postData)))
{
RAW. Append (new String (postData, 0, len));
size += len;
}
retVal = raw.toString ();
}
catch (System.Exception e)
{
System.out.Print (e.getMessage ());
}
Return retVal;
}

So what happens?

What the Exception is thrown?

Which method of connection you are using (see http://supportforums.blackberry.com/t5/Java-Development/Different-ways-to-make-an-HTTP-or-socket-con...)

Your server sees the request?

Tags: BlackBerry Developers

Similar Questions

  • Can I get 1 simple and not 500 response difficult to understand the answers on a firefox theme

    Very simply. Step 1. How can I get the icon of firefox on my screen.

    See:

  • Is a major test for Rutgers and use Firefox, all answers lost and not registered! Please help very desperate

    Fact the test on the site of Rutgers and the Professor only informed me today that no responses were recorded. Graduating next week and I'm so angry. is it possible in the browser? Please is there a way to find them in the browser if I can refer? 6 need tonight.

    Hi BobDavis,
    The question is unanswered for 24 hours, so a ticket has been created to Help Desk. Unfortunately, it wasn't at the time that you need this answer. If this happens, in the future, you can recover the old pages of the history Manager.

  • How can I get regular Firefox and not the version of "Yahoo"?

    I want firefox, but I do not like the version where I always search yahoo page and it won't let me set my own homepage.

    Do a clean reinstall and delete the program folder before Firefox to (re) install a new copy of the current version of Firefox.

    Download a new copy of Firefox and save the file to the desktop.

    Uninstall your current version of Firefox, if possible, the settings in the software security and cleaning of the Windows registry.

    • Do NOT remove the data personal when you uninstall your current version of Firefox, because all profile files will be deleted and you will lose all personal data such as bookmarks and passwords from other versions of Firefox profiles.

    Delete the program folder Firefox before installing newly downloaded copy of the Firefox installer.

    • (32-bit Windows) "C:\Program Files\Mozilla Firefox\"
    • (Windows 64 bit) "C:\Program Files (x 86) \Mozilla.

    Your bookmarks and other personal data are stored in the Firefox profile folder and will not be affected by a uninstall and (re) install, but make sure that 'delete personal data' is NOT selected when you uninstall Firefox.

    If you keep problems also create a new profile.

  • Presenter getting hung up and not to work with any browser

    Since a few days ago that a large number of my students is suddenly reports that my lessons of course are not loading/opening lessons are located on a CD-ROM, which they can successfully access the services menu, however, when they engage in a lesson, the lesson trying to load on the screen in the adobe presenter (which opens the lesson in a Web browser) but hangs with a grey-white screen.

    Any help would be greatly appreciated.

    Hi Scott,.

    We are studying the issue widely introduced as part of the latest update of flash player.

    However, if it is really urgent for you I would suggest workarounds:

    1 if you play the content of the SWF to a server rather than play on the spot, it will work well for you. You can play from a webserver or wamp etc server.

    2. If in the case where you do not want to exceed with the workaround, here's another one: button press Windows + R and type %appdata%\protector.exe and click on enter key. Go to the folder "Flash #Security\FlashPlayerTrust ...\appdata\Roaming\Macromedia\Flash" and open the file named "TalkToAdobeFlashPlayerTrust.cfg" and add the location of your presenter publish output folder and save the file to the same location.

    For example. in my case, I added this entry - 'C:\Users\zhussain\Documents\My Adobe Presentations. Once you have made changes to this file, you will be able to play your local SWF output in Internet Explorer and Firefox. Don't forget that this still does not work for the Chrome browser.

    kindly let me know if you need additional assistance.

    Kind regards

    Zitouni

  • I have a new computer with Windows 10 and will use Acrobat 9.0 Standard of my old computer (Windows 7). I download the program for Adpbe and when I install it so I put my serial number and get the answer, it is not a number valid serial. What it takes

    I have a new computer with Windows 10 and I use Acrobat 9.0 Standard of my old computer (Windows 7). I download the program from Adobe, and when I install it then I put my serial number and get the response "is not a number valid serial. What should do? I have an account at Adobe with all my serial number

    Hi rolfb13339293,

    I would like to inform you that acrobat 9 is not compatible with windows 10.

    You can check system requirements here: Adobe Acrobat required configuration

    The latest version is Acrobat DC.

    Please let us know if you need additional assistance.

    Concerning

    Sarojini

  • IN response to an email, how can I get my signature and info directly in my answer and not in the email that I received the message?

    If I reply to an email, my signature is found in the email that I received, and not under my response directly, so I have to cut and paste to do this.

    https://support.Mozilla.org/en-us/KB/reply-above-or-below-quoted-text

  • My forum ID is connected to my Apple ID email, but when I log in to the forum with my Apple ID email, I get an error and can not reach the forum. How do I merge my accounts so my Apple sign-in ID is working again?

    My forum ID is connected to my Apple ID email, but when I log in to the forum with my Apple ID email, I get an error and can not reach the forum. How do I merge my accounts so my Apple sign-in ID is working again?

    Apple ID cannot be merged. We'll see if we can get to the bottom of your connection error...

    Tell us step by step, in detail what your actions.

    Tell us a story

    -with a beginning, middle and end. We need to figure out what you know and that you have lived.

    If this problem is new, tell us what immediately preceded its appearance - add software, upgrade or update? New equipment?

    Quoted by of Apple  'how to write a good question.

    To help other members in answering your question, give as much detail as possible.

    • Include your name (peripheral) product and specifications such as the speed of the processor, memory and storage capacity. Please do not include your serial number, IMEI, MEID or any other personal information.
    • Provide the version of your operating system and the relevant applications numbers, e.g. "OS X 10.4.11" or "Safari 4.1.3.
    • Describe the problem and include all the Details on what seems to make it.
    • The list of troubleshooting steps you have already tried, or temporary corrections that you discovered.

    For a detailed 'coaching', please see usage tips , help us help you on these forums and wrote an effective communities of Apple Support question

    "Keep it short and Simple"-take your time... but be thorough - CCC

  • I come from components to build a new computer. Try to use the Windows XP Pro computer old version but after BIOS and XP installation I get the error "file not found \i386\ntkrnlmp.exe. The error code is 7. "What should I do?

    New components is a new computer.
    Inserted the XP Pro CD in the drive but get the error "file not found \i386\ntkrnlmp.exe. The error code is 7. »
    Rebooted comp 5 times with the same problem after BIOS.

    Hi Milkshake83,

    Thanks for posting. Proceed as follows for this error.

    Method 1: Restore the default settings of the BIOS WARNING: this procedure may involve changing the semiconductor (CMOS) settings of the computer's complementary metal oxide and by changing the BIOS of the computer. Incorrect changes to the BIOS of your computer can result in serious problems. Change the CMOS settings of the computer at your own risk.

    To resolve this issue, restore the BIOS of the computer to its default settings. For more information about the correct settings of the BIOS of the computer and how to check and change these settings, see the computer documentation or contact the manufacturer of the computer.

    In addition, to confirm that the computer's BIOS is current, contact the computer manufacturer to inquire about the last update of the BIOS available for the computer.

    Method 2: Remove the faulty RAM to resolve this issue, remove the memory modules installed in the computer.

    NOTE: you must leave enough RAM for the computer to start and run Windows.

    For more information on the amount of RAM that is required to run Windows, click on the number below to view the article in the Microsoft Knowledge Base:

    304297 configuration (http://support.microsoft.com/kb/304297/) System requirements for Microsoft Windows 2000 operating systems

    If the error message described in the "Symptoms" section of this article appears again after removing the memory module, remove a different memory module. This procedure may ask you to restart your computer several times to identify the specific memory module that is not working properly.

    For more information about how to add and remove RAM to the computer, contact the manufacturer of your computer or see the documentation that came with your computer.

    http://support.Microsoft.com/kb/318729

    I hope this helps!
    Shawn - Support Engineer - MCP, MCDST
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • How can I get my action button can be log off and not closed? I select it in the customization tab, hit apply and then ok, but nothing changes.

    How can I get my action button can be log off and not closed?  I select it in the customization tab, hit apply and then ok, but nothing changes.

    Hi Erin,.

    Please check if you have followed the steps below to change the action of the Power button.

    By default, clicking on close button in the start menu stop your computer. You can change this so that instead of close, your computer logs you off, crashes, restarts, goes into a State of sleep or goes into hibernation.

    1. open properties of the Start Menu by clicking theStart button, clickingControl Panel,appearance and personalization, then clicking on thetaskbar and Start Menuand the taskbar.

    2. click on theStart Menu tab.

    3. in the list ofthe power button , click an item, and then clickOK.

    When you change the action of the closure of the key, the button name changes to reflect the new action.

    If the steps above do not change the option, you can try creating a new user account on your computer and check to see if it helps you change.

    To create a new user account.

    1. open user accounts by clicking the Start button, clickControl Panel, click user accounts and family safety (or by clicking onuser accounts, if you are connected to a network domain), and then clickinguser accounts.

    2. click on Manage another account. If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.

    3. click on create a new account.

    4 type the name that you want to assign to the user account, click an account type, and then clickcreate an account.

    If you are able to change the action of the power button by using the new profile, access the link below and follow the steps to correct the user's profile.
    http://Windows.Microsoft.com/en-us/Windows7/fix-a-corrupted-user-profile

    I hope this helps. Let us know the results.

    Thank you and best regards,

    Srinivas R Microsoft support.

    Visit ourMicrosoft answers feedback Forum and let us know what you think.

  • How to get the phone and messages back in my dock apps? And for some reason, I discover now all my app pages from the middle of my phone and not at the top?

    How can I get the phone and messages apps in my dock? And for some reason, I discover now all my app pages from the middle of my phone and not at the top?

    Try

    Settings > general > reset > reset home screen presentation.

    Note: All other applications will be organised by alphabetical order.

  • Firefox does not open and not get Profile Manager.

    I'm running Windows 7 Professional. So about two weeks ago, I had suddenly couldn't open Firefox and since then have tried to solve it myself does not. the process of Firefox opens in the Task Manager, however, the browser window does not appear. Trying to open Firefox again, another process opens and the same thing happens. Process just keep opening and that's it. I tried the Profile Manager, but it opens only once and I couldn't so he can reopen. Every once in a while Firefox actually opens when I run it, but when I close it to see if it works once again it does not work. Firefox opens in safe mode with network consecutively without any problem. While he was in safe mode, I ran a full scan of the system with Nortan Antivirus and allowed thirty or threats, but after restart of Firefox will not always open, treated only. I tried to remove the x 86 erased my local path and Mozilla appdata roaming Mozilla, then re installed with 34.0.5. I tried to open Firefox in safe mode, but it will not open at all, only the process again.

    It is possible that your security (firewall, antivirus) software blocks or limit Firefox or the process of plugin-container without you inform, possibly after the detection of changes (update) for the Firefox program.

    Delete all rules for Firefox and the plugin-container in the permissions list in the firewall and allow your firewall to ask permission to get access full and unrestricted, again to install for Firefox and the plugin-container and the update process.

    See:

    Make a check of malware with several malware scanning of programs on the Windows computer.
    Please scan with all programs, because each program detects a different malicious program.
    All of these programs have free versions.

    Make sure that you update each program to get the latest version of their databases before scanning.

    Alternatively, you can write a check for an infection rootkit TDSSKiller.

    See also:

  • Get a message "do not answer." It gets worse every day. Nothing seems to work, including to reset.

    I get this message for weeks. And this is the 3rd time I asked for help with that and nothing works. I think to deserting a ship to Internet Explorer. Can't believe I'm saying it since I was with you guys for years. Please can someone help? Get this bloody message "not responding".

    Note that your system details list shows several Flash plugins.

    • Shockwave Flash 15.0 r0
    • Shockwave Flash 14.0 r0
    • Shockwave Flash 13.0 r0

    You can find the installation path of the plugins on the topic: plugins page.

    You can view the installation folder of Flash player for multiple Flash player plugins and delete older versions of the plugin (NPSWF32) and possibly (re) install the latest Flash Player.

    • (32-bit Windows) C:\Windows\System32\Macromed\Flash\
    • (Windows 64 bit) C:\Windows\SysWOW64\Macromed\Flash\

    You can try to disable hardware acceleration in Firefox.

    • Tools > Options > advanced > General > Browsing: "use hardware acceleration when available.

    You will need to close and restart Firefox after enabling/disabling this setting.

  • I can't reinstall firefox, I get the error 'Could not load profile' and not a solution I found works. / Appdata/roaming/mozilla folder is not accessible.

    I'm on Win7 64 bit. Initially, I uninstalled because a program has changed my page of the new tab to something unwanted and I literally had no way to change this back. Now, every time I reinstall, I get the error "cannot load the profile, it may be missing or unreachable", and I can't create a new profile. Whenever I try to any method of opening the profile editor, I get the error 'Could not load profile' then too. I can't access the folder in/appdata/roaming/mozilla at all. It is said it is accessable and access is denied, and tries to remove it tells me I have not permission (even if I'm the admin). No other difficulty I saw worked. Can someone help, please?

    I have done a virus scan, cleaned up one piece of adware, rebooted, and it worked all of a sudden. I don't know what exactly caused to start working, but he did, so I consider this issue closed.

  • How to print a document all e-mail and not a 'screenshot' that I get in the option Print Preview.

    How to print a document all e-mail and not a 'screenshot' that I get in the option Print Preview. I would like to print "file" "as I can on other browsers (IE, for example). When I try to print from Firefox it catches all my info (shirts, etc.) from the left side of the page. I need only e-mail information, not information of the entire screen. Thank you!

    -Bruce

    I had the same problem at first. You open the e-mail as usual. And then in the Actions drop-down list box, you select the print option. This has worked for me and printed the actual e-mail only.

Maybe you are looking for

  • need Photos of iMovie - explanation

    Hi all im hoping someone can explain the behavior of photos in Imovie... I have a Macbook Pro and I created an album on photos called any vacation 1500 of my pictures/videos. My Mac is configured to record the full versions. Ive then went into iMovie

  • Laptop HP Pavilion 17-f010us: HOW to ORDER RECOVERY DVD SET 17-f010us Pavilion laptop

    Well, I broke one of my recovery disks. I made a set of 6. Is it possible to order the recovery disks or make another game? I ordered my laptop from Fingerhut, bad move because of the price. There is no Windows sticker on the laptop. I don't know if

  • XP license

    I would like to sell computers for a camera dvr, but want to use xp. Can I purchase the license according to the needs, or in bulk, also be able to legaly to sell systems?

  • Delete previous backups

    After a number of backups from my external drive of 232G is essentially complete.  Can I safely delete the previous backups to make room for the new?

  • [COMICS] BlackBerry Web services - create e-mail profiles

    Hello world The web service provides a method to create profiles of e-mail for users. However, it is not possible to create a profile of electronic mail user which replaces the default values for the name of the account, email address, username and d