Help, please! Problem in the use of http to call the url?

Hello

I develop application for Blackberry 8830, which is the cdma device. I want to develop the application that uses the http protocol to call url and gets the response. To use http everything I read there about 5-6 ways. But the only one that fits my needs is direct TCP. But my service provider in India i.e. Auntie Indidcom says that there can be no adjustments to the AFN for CDMA phones. What should I do now. I don't really know if that's the only problem.  I have this thread

Different ways to connect with Http.

There are six ways mentioned below: -.

1 blackberry Enterprise Server with Blackberry MDS - I have Blackberry Enterprise server, so this is not possible.

2. blackberry Internet Service - for this, the Alliance with the RIM so still no thuought on this subject.

3 order TCP - do not get the APN settings

4 WiFi network - I'm not network Wi - Fi is also to the equation.

5. WAP Gateway - not looked into this yet.

The only way I thought direct TCP, but it requires settings APN, but the message that I received from the people of Auntie, it's that the APN settings is supported for GSM based phones and not for CDMA phones. So is it possible, if yes, then please let me know, its urgency.

Here is the code that I use for the connection.

HttpConnection httpConnection = null;
            DataInputStream dis = null;
            DataOutputStream dos = null;
            url = "http://mailonphone.com:8180/automaticlicensing/LicensingServlet?" +
                  "UserName=ilesh&Password=ilesh123&SiteCode=012345678901234567890&" +
                  "ScratchCard=05533978;deviceside=true";
            System.out.println("URL=>" + url);
            try
            {
                httpConnection = (HttpConnection)Connector.open(url, Connector.READ_WRITE);
                httpConnection.setRequestMethod(HttpConnection.POST);
                InputStream istrm = httpConnection.openInputStream();
                String resMsg = httpConnection.getResponseMessage();
                System.out.println("REsponse Message=" + resMsg);
                int length = (int)httpConnection.getLength();
                String str;
                if (length != -1)
                {
                    byte servletData[] = new byte[length];
                    istrm.read(servletData);
                    str = new String(servletData);
                }
                else  // Length not available...
                {
                    ByteArrayOutputStream bStrm = new ByteArrayOutputStream();
                    int ch;
                    while ((ch = istrm.read()) != -1)
                        bStrm.write(ch);
                    str = new String(bStrm.toByteArray());
                    bStrm.close();
                }
                System.out.println("Registeration Key=>"+str);
                int in=str.indexOf("");
                int en=str.indexOf("");
                key=str.substring(in+6,en);
                key=key.trim();
                System.out.println("KEy="+key);
            }
            catch(Exception ex)
            {
                System.out.println("Error while calling url");
                key = "In catch while calling url";
                //sendMenuItem.setText("Message not send");
            }
        }

If there is a problem in the code then let me know also. I could not test this even on the MDS do not work on simulator emulator. Look into that, but if its related to another question please let me know.

Thank you & best regards

Sunil

The exception it throws in wrestling, will give you an idea about the problem.  I suspect something is wrong with your data, for example, you have specified HttpConnection.POST, but you provide no post data, so I think that you really wanted to say HttpConnection.GET.

WAP 2.0 does not work on the Simulator.

I recommend that you get your code work using the Simulator (i.e. ";) deviceside = true') until you are exposed to problems trying to connect on a real device.

Tags: BlackBerry Developers

Similar Questions

  • Insert the module {cc_security} and captcha and continues to receive spam on forms Adobe Catalyst submissions. Help, please! Also the required field is be circumvented.

    Insert the module {cc_security} and captcha and continues to receive spam on forms Adobe Catalyst submissions. Help, please! Also the required field is be circumvented.

    This has been resolved through Adobe Live Chat Support. Thank you

  • technical help please on "show the power inverter.

    Hello

    I'm not sure weather its ther "inverter" or anything else... but the engineer told me that...

    I have a HP Pavilion lappy 1211-AX... I bought a stack of China made 12...

    now on the battery my screen begins to flickring and gets along with care makes the noise also (some courses like... in a light as tube)

    If the comp eng told me that the fault may be in the converter to display...

    but in the adapter power sector/display isn't ficker...

    so is it really the "inverter" problem or the battery...?

    and also

    battery does not load if cliberated...

    Urgent please help

    This is my second post... Please help...

    There was d ' assign problems with the dv6 with flickering white lines, but I don't know if this applies here, but here are the measures taken in other positions. (I'm not through all the posts, so I may have missed something).

    http://h30434.www3.HP.com/T5/notebook-display-and-video-e-g-Windows-8/horizontal-flickering-lines-on-DV6-screen/TD-p/829137/highlight/true

    http://h30434.www3.HP.com/T5/notebook-display-and-video-e-g-Windows-8/DV6-horizontal-line-flicker/TD-p/815489

    The threads say _ try to reinstall the latest driver of CCC _ try your support page or if it does not directly from AMD. Save the driver on the desktop and install from there, not in a temporary folder and don't forget to do an installation of the driver, just install it over your present.

    Also seems to be a problem with the power settings, go into power settings and choose not to have the display turn off on battery and plugged _ make sure that the display stays on all the time.

    To comply with all this trial and connect an external monitor with the battery and the adapter and run them both at the same time _ in the other threads were reported, Twinkle stopped.

    Here is an article also, but again I know not whether it applies here.

    http://www.TomsHardware.co.UK/Forum/273975-15-solution-screen-flickers-cards-4800-series

    My personal opinion on it is that it doesn't seem to be the inverter, if it was that she would make him just the adapter so _ inverter problems occur when the battery is inserted.

    It is also strange to just start doing it now _ it seems to be a temporary problem.

    You can also try installing an older graphics driver.

  • Help for problems with the functionality of Capture from Adobe

    Hello

    I recently installed Adobe Capture on my Smartphone (Android device) and the app is very cool.  However, after a few weeks of use, the software stops working.  I uninstalled the software and reinstalled to see if that would help solve the problem.  Unfortunately, it has not solved the problem.  Adobe does not provide an over-the-phone technical support for this product, so I hope someone here can help.

    Recreation of question:

    When you start the application, there are four 4 functions:

    1. Colors
    2. Forms
    3. Brushes
    4. Looks like

    In the lower right corner of the screen, we see a sign '+', which, depending on which function you select, invite the user to 1) select from the cloud or 3) take a new photo 2) select a picture in the camera.  When you select an option, Adobe Capture executes the designated function and the State final changes / outputs on the picture are visible.

    However, when you try to accept or to save changes / outputs, the screen seems to hang up and return to the initial splash screen.

    Can provide you any assistance?

    Thank you!

    Jerry

    Hi Jerry,

    I'm really sorry that capture does not work as it should. This is a known issue in the app and the team is working on a beta version with a fix. I hope that it will be available before the end of the week, but I'm not totally sure of the timeline.

    I know we'll get it on Adobe Android Apps - community - Google +, then join this page and you will be informed as soon as it is available.

    A couple of other things:

    It's an incredible description of the problem you are experiencing. Thank you very much for going into details so. It makes a huge difference when engineers are trying to understand what is happening.

    If please post here or contact us through the app (tap on the draw icon, then give us Feedback) whenever you need help. Sometimes on the weekends, I'm a little slow, but during the week, I'm trying to reach people as quickly as possible.

    I hope this helps.

    Sue.

  • Help! Problem with the windows registry

    Hello

    For the past few months I am not been able to apply windows updates and get code 646 and some windows registry errors, I would like to know how to repair the registry errors...
    Example: C:\Windows\System32\cmd.exe
    The NTVDM CPU has encountered an invalid statement
    CS:1237 IP:0156 OP:c5 f5 d8 4f 97 choose 'Close' to terminate the application.

    C:\Windows\System32\cmd.exe
    The NTVDM CPU has encountered an invalid statement
    CS:1237 IP:0160 OP:f0 22 bf 5th bb choose 'Close' to end the application.

    Thank you
    Kiran

    Hello

    For update problems:

    Try to disable UAC and then make below.

    Panel configuration-Classic view - user accounts - turn User Account Control Off

    How to turn User Account Control (UAC) on or off in Vista
    http://www.Vistax64.com/tutorials/48893-user-account-control-UAC.html

    THIS UTILITY MAKES IT EASY TO

    http://www.tweak-UAC.com/
    Tweak UAC utility - easily put UAC into Silent Mode or POWER

    ------------------------------------------------------

    After the foregoing:

    Try this 1st to see if it helps, and it should:

    Description of the Patch registration cleanup tool
    http://support.Microsoft.com/kb/976220/

    ------------------------------------------------------

    If necessary :

    Try this click - Control Panel - Windows Updates - updates that will be installed not - the
    Important updates or update itself - double click one, and then click View more information
    (or click on it and then discovered on the right)

    Those who will take you to a page where you can download the update.

    Or go here and the KBxxxxxx number to download it.

    Download Center - mount the KBxxxxxx.

    Microsoft Download Center
    http://www.Microsoft.com/downloads/en/default.aspx

    Download - SAVE - go to where you put them - click on - RUN AS ADMIN

    Then you can right click on the update in the updates Windows and HIDE.

    If you get an error Installer install this version:

    Windows install 4.5 Redistributable
    http://www.Microsoft.com/downloads/details.aspx?FamilyId=5A58B56F-60B6-4412-95B9-54D056D6F9F4&displaylang=en

    ----------------------------------------------------

    Then run this:

    How to reset the Windows Update components? -a Mr Fixit
    http://support.Microsoft.com/kb/971058

    Description of the system for Windows Vista, Windows Server 2008, update tool
    and for Windows 7
    http://support.Microsoft.com/kb/947821

    ------------------------------------------------------------
    Because these are all Office updates you might get more information if necessary in the Agency of those groups
    who might have experienced the same problem.

    Office newsgroups
    http://www.Microsoft.com/Office/Community/en-us/FlyoutOverview.mspx

    Microsoft.public.office.misc discussions
    http://www.Microsoft.com/communities/newsgroups/list/en-us/default.aspx?DG=Microsoft.public.Office.misc&cat=en_us_01cb749f-c998-4762-8099-df71793c11c7&lang=en&CR=us

    ------------------------------------------------------------

    If necessary you can incident free get reports however the above should take care of it for you.

    Windows updates - free Incident report

    Go here and click on-> Windows Update fails while searching, downloading or installation of updates
    http://support.Microsoft.com/GP/wusupport#tab3

    The security updates, you can get free support Incident report
    http://www.Microsoft.com/protect/resources/support.aspx

    I hope this helps.
    Rob - bicycle - Mark Twain said it is good.

  • When I try to update I get a U44M1I210, "Unable to extract the downloaded files" error message - help please, apply to the latest Indesign, Illustrator and Photoshop CC

    When I try to do a CC update I get an error message U44M1I210, "failed update - impossible to extract the downloaded files. Try to press to redownload again. (U44M1I210) ' - help please - re-don't download makes no difference, applies to the latest Indesign, Illustrator and Photoshop CC, others seem to be updated without problems. I can see the disk image files in the AAMUpdater folder, but they will not open and come up with message ' could not be opened - busy resource.

    Another thing that makes everything work ultimately (after I finally properly installed all Apps CC etc - I couldn't get the Apps to save my preferences for each of them and Indesign would not open yet).

    Make yourself as a user in the users and groups on "Admin", is added and with privileges "read and write" and "Apply to the clos etc.", when you 'get Info' on the hard drive if you can access/modify all the files and folders on the hard drive.

  • Help please problem with export

    I had some problems with safari on my imac (OS X), so I did "repairs" I finally remove some keychains and I think that's what's causing the problem I have. However I don't know how to fix it.

    When I try to export my rugged external hard drive from Lacie desktop RAW images to jpg I get this error...

    "An internal error has occurred:?: 0: attempt to index field 'rootFile' (a nil value)".

    I have a deadline soon (in an hour) and need help please.

    Hi Neo,

    I try to export the Cie and go to the Office first... we will know how you go, I'll be around an hour or two!

  • I can't download via the download link to download the Paint.Please tell me the URL to download!

    Please tell me the link to download Paint! No, no file, normal URL link!

    What is the problem with the integrated version of MSpaint?

    MS Paint woes - can only be the older version of Vista paint ran in Windows 7?
    http://social.answers.Microsoft.com/forums/en-us/w7programs/thread/e880bc2b-1460-4717-b76d-1dd643cc1c5f

    Old paint.
    http://download.Microsoft.com/download/winntwks40/Paint/1/NT4/en-US/Paintnt.exe

    Download the program Paint Portable XP
    http://www.intowindows.com/download-portable-XP-paint-program/

    Download Microsoft Paint / recover the missing copy
    http://www.sheeptech.com/download-Microsoft-Paint-recover-missing-copy

    Invalid Page fault opening the file in Microsoft Paint
    http://support.Microsoft.com/kb/162500

  • The URL you provided could not be reached. Please check that the URL is... Acrobat/SP2010

    The following error occurred in Acrobat when you try to click version history documents in SharePoint 2010. "The URL you provided could not be reached. Check that the URL is correct and that the network location is accessible. "The revision of the document is accessible, but through type HTTP via a web browser... but not through SharePoint <>== magic Acrobat X Pro COM object that works very well for currently extracted from documents. Please see image inserted. Reflections on a fix?

    error_adobe+.png

    Visitors have not been confirmed, but given the problem reports to is completed 6 months ago, it seems updated for the latest version of product fixes the issues.

  • Problem with the Url in the same page

    Copy the following code opens a new web browser. I need a code to open the url in the same browser. Can someone help me?

    / * Click here to go to the Web Page

    Click on the specified symbol instance loads the URL in a new browser window.

    Directions for use:

    1. replace http://www.adobe.com with the desired URL.

    Keep the quotation marks ("").

    */

    button_4.addEventListener (MouseEvent.CLICK, fl_ClickToGoToWebPage_5);

    function fl_ClickToGoToWebPage_5(event:MouseEvent):void

    {

    navigateToURL (new URLRequest ("http://site.coopershop.com.br/site/(uvzzxv553xpe4k451alf3afo)/site/indexInst.aspx?acao=pro d&id=138633&usuid=7164&conteudo=Tratamentos"), "_blank"); )

    }

    Thank you!

    use:

    / * Click here to go to the Web Page

    Click on the specified symbol instance loads the URL in a new browser window.

    Directions for use:

    1. replace the desired URL http://www.adobe.com .

    Keep the quotation marks ("").

    */

    button_4.addEventListener (MouseEvent.CLICK, fl_ClickToGoToWebPage_5);

    function fl_ClickToGoToWebPage_5(event:MouseEvent):void

    {

    navigateToURL (new URLRequest ("http://site.coopershop.com.br/site/(uvzzxv553xpe4k451alf3afo)/site/indexInst.asp x?acao=prod&id=138633&usuid=7164&conteudo=Tratamentos"), "_self");)

    }

  • Help, please! DOWNLOAD THE WINDOW PROBLEM

    When I start to download, without any window appears. If I open standard "downloads" in the start menu - a library opens. I can see my downloads here, but is not as usual. I just want to see the usual window! Help me please. Previously I never had problems with this app! / 20.0 (rus) Firefox / Windows 7 x 64

    Joergen salvation!
    Thank you very much! Your answer helped me! Now I am happy, everything is back! =)
    Best regards, Philip

  • Help please - what is the name of the font used in the logo?

    Hello

    Can someone help me please.

    I have the .eps of this logo, but I can't know what type of police is our logo.
    I need the company name and slogan.

    KEEKI Logo blue.jpg

    Note that each 'y' is different. It could mean he drew by hand, it has been converted to outlines and edited, or it's a font with a few smart contextual variants that will likely come at a price.

  • HELP Please: problems connecting to Google Chrome or Internet Explorer: think it has to do with my network cards

    My computer works perfectly except that I can't connect to the internet using Google Chrome or Internet Explorer. Internet works fine.  I have another computer that is connected to the same network, and it works fine.  Also my signal strength is optimal. When I try to go on Google Chrome, it says that the web page is unavailable & the reason why is error: 105 (net: ERR_NAME__NOT_RESOLVE) the server is not found.  When I try to use the Internet, I get this message:

    Device is not working properly because Windows cannot load the drivers required for this device (Code 31)
    I've tried everything and looked at other forums. I went into Device Manager and tried to update the driver, but whenever I do it just says that all updates are already made.
    I really feel that my problem has something to do with network cards. When I go to Device Manager and discovered the network adapters 13 different adapters appear. The 1st is Atheros AR5007 802. 11b / g Wireless Adapter and it looks like it works very well but there are 11 different (Microsoft 6to4 adapt #10) (all have different # s, 10,11,12,14,15,16,17,18,20,5,9) there is (NVIDIA nForce Networking Controller)
    I think the problem is with the Microsoft 6to4 adapters because win I right click & then click on PROPERTIES of each adapter says: State of the device, this device is not working properly because windows cannot load the drivers required for this device. (Code 31) So, is to "find solutions", says & when I do that nothing happens, a message flashes on the screen that says: "Could not load driver software" and that windows is looking for information, but nothing ever happens.
    Can some1 please help me! My computer worked fine and both Google Chrome and still worked and then out of the blue it just stoped working. Any information would be very useful

    wisports,
    Thank you for visiting the Microsoft Answers community forum.

    You have found the source of your problems.  You must remove or uninstall, all the cards of 6to4.  Also delete everything that said map Tunnel or card miniport WUN.  Also uninstall or disable, Internet Protocol version 6 (TCP/IPv6) Properties tab on existing network cards.

    Once you have done these things, restart the computer and make sure that the 6to4 adapters does not return.

    Let us know how it works for you.
    Thank you
    Gloria
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Urgent: need help on problems on the iPhone after updating iOS 10 6s

    Hey there! It's my third post about the problems Ive been face on my devices after 10 updated iOS. Initially, after that I've updated, the music app was not running on my phone-all I could see was an empty screen and the APP crashed and I was redirected to the homepage in a few seconds. Tired to restart the phone, deleting and then adding the app back, nothing worked. Not at all. So I tried to restore my phone, save all content via icloud. Followed all the steps and after the restoration of the aircraft of other problems surfaced, BUT the music app still does not work.

    Now, not only the app does not work, I can no longer sync my iPhone with iTunes. Whenever I try, I get the following errors:

    (1) itunes cannot sync the iPhone connection has been reset

    (2) iTunes sync session could start.

    IF PLEASE NOTE, BEFOR RESTORE IPHONE I COULD ALWAYS SYNCHRONIZE WITH ITUNES EVEN AFTER IOS UPDATE 10 AND TRANSFER THE MUSIC ETC, BUT JUST COULDN'T NOT OPEN MUSIC APP TO PHONE-NOW I CAN'T DO EITHER!

    I have tried pretty much everything, restart both phone & iTunes, reset the network settings on my iphone, reset itunes sync history, by removing the lockdown folder, running iTunes as administrator on my PC, change my USB in corduroy, update iTunes, reinstall iTunes on PC-nothing seems to work AT ALL. And it's extremely frustrating. I can sync music/documents on my iPad after update of the device and the restaurant then (iPad also has major problems) and then play the music on it but just isn't my phone can be synchronized. It is a function important and if I can't synchronize my device is a sitting duck.

    The new update of iOS also gave my massive lag of phone. Screen freezes, apps for time-consuming, HDR photos take longer to be broken. It is just too heavy to wear.

    CCAN anyone help me please with my iTunes sync + music matters app... I really regret updating to the new iOS. Please help me.

    Thank you.

    PS apologies for this long post, I had to write everything I tried.

    If you are on Windows, uninstall iTunes, uninstall Apple Mobile Device Support. Once both are uninstalled, reinstall itunes, see if it syncs with itunes then.

  • HP Pavilion 500-274ea: Hello, I need help please I installed the graphics card and nothing comes only a black screen

    Please help me I bought a new power supply 780w I had 2 graphics card work in my old pc, but on the new pc they do not fan spins everything well but no screen when I plug my graphics card? What should do?

    http://support.HP.com/us-en/document/c04177680

    It comes to my pc

    I fix thanks for reading. I just had to play in the bios for a bit lol like 2 hours but I did the job

Maybe you are looking for