What is the problem with my http code?

I have a problem with the following code on the Bold 9700.  The code works on the Simulator and other devices, but some users have problems.  It seems that nothing is returned when getting the html page.

    static String get_page(String url)
    {

        StreamConnection s = null;
        InputStream input = null;

        try
        {

            s = (StreamConnection)Connector.open(url);

            input = s.openInputStream();
            byte[] data = new byte[4096];
            int len;
            StringBuffer raw = new StringBuffer();
            long startTime = System.currentTimeMillis();

            while ( -1 != (len = input.read(data)) )
            {

                if (len > 0) {
                    raw.append(new String(data, 0, len));
                }

                // check for timeout waiting for server; or
                // what if page never closes...
                if (System.currentTimeMillis() - startTime >  30000)
                {
                    s.close();
                    return("ERR2");
                }
            }
            s.close();

            return(raw.toString());
        }
        catch (Exception e)
        {
            return("ERR3");
        }

        finally
        {
            try
            {
                if (input != null)
                    input.close();
            }
            catch (Exception e)
            {
            }
        }
    }

Y does it have that none of the Options application settings must be defined? for example: TCP/IP

The Thread I pointed you to and the various "required reading" material, describes how the different network paths are selected by changing the suffix of the URL used connection.  The standard demo does not add a suffix, by default, choose BES connection, so will be.  Unless of course, the carrier has provided a different default value for a feature not BIS, for example, I understand that Vodafone UK will send it via WAP.

According to the treatment of suffix / default connection, the request will be routed through a number of "gateways" like BES/MDS or the carrier's WAP gateway.  If any of them could give the 500.

Assuming that it makes actually to your server (I assume this is a URL that you control), then the 500 from the treatment of your Web.  For example, this could be because your processing wait some headers in the http request which are not provided.  Or, that demand has been sent by a gateway changing the headers in a way that is not pregnant with your web server.

With same URL work on the browser is unfortunately not much of a test as it can be routed through a method of communication that you do not use (for example, on Vodafone BIS devices I think the default browser will use BIS - B) and, in addition, it could provide some headers for the http connection that you do not provide.

The point really is that there are many places that could break this code.  And there are number of variables, including what method of connection is used (and in the case of Vodafone, effectively forced to use), which carrier is used and which headers were provided.

But I think the first thing we do is to know who is giving you the 500.  If you can follow the application to your own server, so much the better.  If you can not, in the headers that come back with 500, you should some server information.  The dump out., empty the suffix of connection you use and if possible, get the log records from at the time this was done (which confirms the method of connection actually used).

I also search this forum for more information on issues people have had with the carriers.  I know that there is some information on Vodafone UK.  According to me, that there is still something at least another carrier.

Sorry, comms on the BB is not as simple as that...

Tags: BlackBerry Developers

Similar Questions

  • What is the problem with this embed code (pretty please)?

    Hello - anyone can tell me what I am doing wrong? I modified a friends homepage and I am tryring to incorporate the new .swf file that works perfectly in the second URL

    http://www.verityslice.com/grownuphtml/index.html (does not work)

    http://www.verityslice.com/grownuphtml/gum.html (work - published originally in Flash)

    Thank you

    In

    http://www.verityslice.com/grownuphtml/index.html

    Line under causing your html trying to load gum.swf of http://www.grownupmarketing.com/gum.swf, which failed.

    http://www.grownupmarketing.com/"/ >

    Option 1: use the good relative to your swf file path

    "grownuphtml/gum.swf".

    Option 2: use the full path to your swf file

    'http://www.grownupmarketing.com/grownuphtml/gum.swf'.

    Option 3: remove the tag base above.

    * but you may need to correct the target of the link of your page menu items.

  • Can't stop... What is the problem with this button code?

    Hello

    I am totally confused as to why I can't navigate to another frame.

    I put 2 days in this simple problem now and I'm ready to give up and go back to AS2.

    Help, please!

    I use CS4; publish the AS3 settings, 10.0


    I have a button on frame 2 that should take me to frame 3 when you click it.

    (So far I tried a hundred different ways, but I don't get to frame 3...)

    I tried different things...

    > Create the button dynamically from the library...

    > Insert statically library on frame 2...

    > referencing the mainTimeline by a variable...

    > wrapping the stop action in another function... (if it is placed directly on the timeLine of the movie properly goes directly to frame 3)

    > naming frame 3...

    > using "nextFrame" rather than "STOP"...

    etc...

    In most cases I don't get an error in the output panel and no compiler error either. It simply doesn't get it!

    (Just on the same frame after I click the button)

    Here is the code which I think should work; but does not work:

    function moveTo3 (event: MouseEvent): void {}

    trace ("Button_Clicked"); always redraws correctly; but the film does not go to frame 3.

    gotoAndStop (3);

    }


    f_btn.addEventListener (MouseEvent.CLICK, moveTo3);

    WHAT ME MISSING HERE?

    Thanks in advance...

    If you found the trace, you get frame 3.  Something else is causing the stop(); to ignore.  You have any kind of active continuous operation code in the file, as an ENTER_FRAME listener, or some other listener who might have been waiting in the wings?  As I said, it is not likely to be a bug, it is not impossible.  If you can save a copy of the fla file in a CS3 file and make it available via a server I can take a look and see if I can find the suspects.

  • What is the problem with this simple code?...

    Can someone help out please why the track will come out as two "undefined" s?...

    On the stage is a MC called 'link_mc' which is essentially a box. Then, there is an another MC on the stage, called "box_mc" and inside that is a field of text called "output_txt. Thank you!...

    haha - okay, when you assign an instance name for a clip dynamically attached a
    string is required, so:

    _root.attachMovie ("box_mc", MC, this.getNextHighestDepth ());

    --
    -------------------------------
    Remove "_spamkiller_" at the post office
    -------------------------------

  • I agree with the CC. But I also have APS CS6. I get the message that the updates are available. But whenever I try to 'install', I get the message that it failed and the error code is U44M1P7. What is the problem with obtaining this update?

    Whenever I try to install I get message that he had failed. The error code is U44M1P7. What is the problem with this update?

    U44... Update error http://forums.adobe.com/thread/1289956 can help

    At some point in the past (I don't know the exact date) Adobe "merged" the original update manager in cloud Update Manager, which means that you no longer use your original update manager

    I read a lot of posts that the updater latetest (cloud) sometimes does not work with old programs... Try to install your updates manually

    Beginning of the updates here and product selection, read to see if you need to install updates in the order of the numbers, or if updates are cumulative for the product http://www.adobe.com/downloads/updates/

  • What is the problem with this pl/sql code?

    What is the problem with this statement of the cursor? I am getting PLS-00341 error for her:
    CURSOR cur_rsource(p_sql_stmt IN VARCHAR2) IS
            SELECT plan_table_output FROM v$sql s, table(dbms_xplan.display_CURSOR(s.sql_id, s.child_number)) t WHERE sql_text LIKE '''%'||p_sql_stmt||'%''';
    How to solve this problem?

    Thank you

    Published by: PhoenixBai on December 14, 2009 14:05

    I don't have time right now to study exhaustively, but for me his vomit ORA-00942 table or view does not exist on this line:

        SELECT sql_id, child_number into tmp_sql_id, tmp_child_number
             from v$sql where sql_text like sql_statement||'%' and sql_text not like '%v$sql%';
    

    I am able to select from v$ sql in normal SQL as user I am compiling as, so don't know why it's complaing.

    Anyone know if there are certain restrictions on access to the views v$ through PL/SQL?

    EDIT: http://www.dbasupport.com/forums/showthread.php?t=22299

    Access to the views of $ v seems to be through a role - try giving explicit access to it.

    As SYS, you must grant select permissions on V_$ SQL (V$ SQL is synonymous with V_$ SQL) to your owner of the procedure. Just tested on my system and it allows him to compile.

    Published by: Cyn on December 14, 2009 10:30

  • How I download 80070103 windows update is update safe what is the problem with this update

    Just got the update installation today to download update 80070103 time ever I go to download the update fail what is the problem with this update & how do I get updated.

    Hello

    Thanks for posting in the Microsoft Community.

    If I understand correctly that you have problems with Windows Update.

    Please answer these questions:

    1. What is the update's KB number?

    2 have you made any changes to the computer before the show?

    Let us try the following methods:

     

    Method 1: Run the following fix - it:

     

    The problem with Microsoft Windows Update is not working:

    http://support.Microsoft.com/mats/windows_update/

    Method 2: See the following article:

    Windows Update 80070103 error code:

    http://Windows.Microsoft.com/en-us/Windows-Vista/Windows-Update-error-80070103

    Hope the helps of information. We know if you need help. We will be happy to help you.

  • Qosmio X 70-A-13th-what is the problem with cooling fan?

    System: Toshiba x 70-13th with Evo 850 256 GB Samsung SSd
    Windows 8.1
    Intel Extremutilitiy - Voltage of the CPU Dynamik Offset 84,96 mV
    3D Mark 06 Score: 24096

    Thermal paste CPU/GPU: GCelid Solution GC Extreme
    temperature: MAx CPU: 85 ° C low game of normal of 45-49 ° C 41-45 ° C: 75-80 ° C

    Fan Max Speed: 60 % (bad hard)

    What is the problem with the fan?

    What is the problem with the fan?

    Why do you think that there is something wrong?

    I found your other thread on the review of the thermal grease...
    https://Forum.Toshiba.EU/showthread.php?82764

    Looks like you have replaced the thermal paste... right?

  • What is the problem with kernel_task?

    Hello everyone,

    What is the problem with kernel_task?

    I explan: Macbook Pro early 2011 LION OS up to date.

    I bought 8 GB on China supplier, CRUCIAL...

    Well, I got a lot of kernel Panic. Usually, he is involved material, taken on my RAM, back is the original, so still have in the kernel_task to 300% CPU monitoring followed up to 500%...

    Well, I went back to a clean install, a manufacturing one, with nothing.

    Wish I 'd' diagnosis of the equipment, never went on, test it on safe mode, disable all extensions, then nothing:

    Sometimes the kernel_task crazy sometimes not...

    Good read a lot on the internet but nothing has worked... I went to the Apple store in DIJON, they do not have diag any hardware problem, and all my App are approved Apple.

    Used to play the eve online thought, therefore, the graphic chipset pourrait was damaged, so when it's too 'hot' the mac gets crazy... but I expected crazy restarts and that sort of thing.

    I bought a manual, there is no french support to the opening of Apple, but found nothing about my question.

    So what?

    I bought something conivient on Support and friability so today he's dead?

    What should do?

    If you still get the panic of the core, thanks to post separate 2 or 3 of the most recent as answers on this.

    Reports of kernel panic: "/ Library/Logs/DiagnosticReports".

    http://support.Apple.com/kb/ht2546>

    http://support.Apple.com/en-us/HT200553>

    The panic report should have "panic" in the name of the file.

    Kernel panics tend to come from 2 sources

    • Material:
      • 3rd party RAM is the most common.  Replace or return the original is usually the solution.  Crucial and MacSales.com were 2 of the most reliable sellers for the initial quality and guest without question of replacement.
      • Broken USB cables or USB devices have turned up as the 2nd most likely material number.  Usually remove all USB devices, or replace the keyboard and USB mouse to see if it's one of those existing.
      • There are a few Macs with graphics chips that have failed.  I don't know that they exist, but do not know what model Mac had these chips.
    • Software
      • antivirus protection.  It is the number 1 most panicked related software cause.  More OS X does not need antivirus, because it has its own built-in protections http://www.thesafemac.com/mmg-builtin/>.
      • Other core 3rd party extensions are a distant 2nd.
      • NOTE: not all 3rd party kernel extensions are causing problems, but when there is a kernel panic, it's the first thing to look at.

    If run kernel_task is often caused by core 3rd party extensions.  It can be caused by an application program, but then the Applications-> Utilities-> Activity Monitor show "As" an application that consumes a lot of CPU, disk IO and network IO in collaboration with the kernel_task using lots of CPU.  If there is no application burns the CPU at the same time, so it is almost always a 3rd special part of the kernel that was originally the use excessive CPU kernel_task.

    Start in safe mode is usually a test to see if 3rd party extensions are part of the case.  But in safe mode is not how you run your system, because it also loads less advanced graphics drivers and other components.  Safe mode is very conservative, but it's a great way to see if the 3rd party software is at fault and have started when 3rd party software panic the system at boot.

    The contributors to the forum long strongly warn against getting 3rd party anti-virus, cleaners Mac and additions increasing.  This class of 3rd party additions have shown time and time again to really harm performance, remove things they shouldn't and cause a kernel panic.  Especially right after an OS X update to a new version.

  • What is the problem with Windows 7 Live Mail?

    What is the problem with Windows 7 using Windows Live Mail?

    When I type my emails using special characters, for example "$- + = % sometimes even Live Mail change my characters to a reverse with a top character."  And it it changes between the time wherever I sends it and receives the other person, so I never really know if they receive a message scrambled or not.  I never had this problem with Outlook Express.  What can we do about it.  I use this for business and it is absolutely unacceptible.

    Hello

    This forum deals with aspects of electronic mail on your computer network.

    If the problem related to the Live mail Server, or configure the features of the software, you'll do better by logging and displaying the question on Live Mail support forum.

    My moderator tools cannot transfer messages on the forums of Windows,

    Please re - ask your question on the Forum Windows Live,

    Windows Live Mail Forum
     
    http://windowslivehelp.com/forums.aspx?ProductID=15

  • What is the problem with my Oracle reports parameter?

    Hello

    We use a PL SQL package that allows the user to select the report you want Oracle and associated parameters.   While the control is passed to Oracle 11 g reports.

    The requirement of one of the reports is to enable more detailed codes be selected by the user and then shown.  The detailed code is an alphanumeric field that can hold between 4 and 6 characters.

    If my data model looks like this

    SELECT student_id

        FROM my_view

       WHERE detail_code IN :p_detail_code;

    and the parameter that I'm passing to Oracle reports looks like this (when I view the source HTML code)

    & p_detail_code =('1001','1002')

    so no record is selected.

    However, if my data model looks like this, I get the records you want:

    SELECT student_id

      FROM my_view

    WHERE detail_code IN ('1001', '1002');

    We have Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production.

    Please tell me what is the problem with my setting.  Thanks a lot for your help.

    This isn't how you can use in. See this example on how to solve it with the digital settings. If your setting is a character, you need to change this.

    In fact, when you simply enter 1,2,3 as an input parameter, you actually create this query:

    Select *.

    from my_table

    where num_column in ("1,2,3")

    Use rather a lexical parameter:

    Select *.

    from my_table

    & p_where

    In the parameter after relaxation shape, build the lexical like this:

    :p_where := 'where num_column in ('||:p_param||')';
    
  • What is the problem with this URL

    Can someone tell me what is the problem with this url
    owa_util.redirect_url(apex_util.prepare_url('f?p='||:APP_ID||':25:'||:APP_SESSION||'::'||:DEBUG||':25,28'||':P25_JOBID,P25_PG:&P3_JOBID.,3, null,||:APP_SESSION'));
    It gives me a value for P25_PG, that is to say 3 but always sets P25_JOBID to 0

    Gus

    Hello Gus,

    It looks like point P3_JOBID has no value for the rendering of the page.
    If the value is set subsequently, you can try the following change

    owa_util.redirect_url(apex_util.prepare_url('f?p='||:APP_ID||':25:'||:APP_SESSION||'::'||:DEBUG||':25,28'||':P25_JOBID,P25_PG:'||:P3_JOBID||',3, null,||:APP_SESSION'));
    

    But the part at the end

    ||',3, null,||:APP_SESSION'
    

    Wil do nothing because you give only 2 items in the list separated by commas of the page elements you want to submit. Everything after the second comma in the comma separated value list is of no use for the url of the apex.

    As additional info, the URL of the Apex is built like this:
    >
    1 - application ID or alias
    2 - page ID or Alias
    3 - session & SESSION. : APP_SESSION
    4. application (for example, PRINT_REPORT = REPORT_1) & ASK. : REQUEST
    5 - debug (YES or NO) & DEBUG. : DEBUG
    6 - cache framework

    APP - clear the cache for the entire application
    SESSION - clear the current user session cache
    PR - Reset pagination
    x - clear the page cache x
    -empty the cache for the element y

    7 - separated by a comma list of items on the page
    8 - the list of values separated by commas
    9 - mode printer friendly (YES or blank)

    f? p = & APP_ID.: 1010: & APP_SESSION. : & DEBUG. : RP, 1010:P1010_ITEM1, P1010_ITEM2, P1010_ITEM3:A, B, C
    >

    Kind regards
    Kees Vlek
    -----
    Company: http://www.orcado.nl
    Blog: http://www.orcado.nl/blog/blogger/listings/69-kvlek
    Twitter: http://www.twitter.com/skier66
    If the answer to question please change replied and mark the appropriate post as correct / helpful.

  • What is the problem with my iMac mid-2011

    Hello

    Need help find out what is the problem with my iMac to mid-2011.

    Yesterday during a reboot it just never came to life.

    On turning the power on, I get the RINGTONE to start and that's it. The screen is totally black. Nothing behind tried with a torch.

    VRAM rearmament so far I tried repeatedly, unplug and plug, all kinds of combinations of keys in the carillon and nothing.

    Connected to an external monitor and shows nothing of too - no signal.

    Any way that I can know what is wrong with it before sending it to the service tech? I suspect bad graphics card but how do you ensure?

    From what you describe, it looks like a hardware issue that Apple will only be able to resolve, but not to despair immediately.

    Read it please get help with graphics issues on external displays connected to your Mac - Apple Support.

    I know that the title and subject are not suitable to your concern, but buried in this document is the following passage that contains three links describing the steps to follow.

    If you can not change the resolution of your screen because you see no image, restart your Mac in safe mode to reset the default display resolution.

    If booting safe mode doesn't resolve the problem, reset your Mac NVRAM and SMC to reset the video ports on your Mac to their default values.

    That first, then write again for additional suggestions if you are still having problems.

  • I installed the download tool usb/dvd windows 7, but after you have selected the iso file when I insert the USB stick and refrecing, it does show that "no usb drive compatible' what is the problem with my USB

    I installed the download tool usb/dvd windows 7, but after you have selected the iso file when I insert the USB stick and refrecing, it does show that "no usb drive compatible' what is the problem with my USB

    I have sandisk cruzer blade USB key

    Hi Rohit,

    Thanks for posting your query in Microsoft Community Forum. I understand that your USB drive is having problems of compatibility with your computer, but I would like to learn more about the issue in order to provide you with better assistance.

    1. You did it any significant hardware or change software on the computer before this problem?
    2. When do you get exactly the error message?
    3. Have you tried to connect to any other computer on this flash drives?
    4. Your USB key works on other computers or have you tried to connect to different USB ports on this computer?
    5. Is the pen drive getting detected in the case or you are able to access the drive folder in the window of the computer ?

    The question may arise if the currently loaded USB driver has become unstable or damaged, or if your PC requires an update for problems that could conflict with a device USB and Windows. This can also occur if your USB controllers may have become unstable or corrupt. So, I would suggest trying the following steps and check if the problem persists.

    Method 1:

    Please try the fixit (s) provided below which will help you solve common problems associated with devices and USB ports.

    If method 1 does not work, try Method 2.

    Method 2:

    Remove and reinstall all USB controllers.

    1. Open Manager devices by clicking the Start button, click Control Panel, click system and security, and then, under System, clicking Device Manager. If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.
    2. In the list of the categories of equipment, locate and expand Bus USB controllers.
    3. Right-click every device under the Bus USB controllers node and then click Uninstall to remove them one at a time.
    4. Restart the computer and let the USB controllers get reinstalled.

    Plug in the removable USB device and test to make sure that the problem is solved.

    If the problem persists, go to method 3.

    Method 3:

    This method will install the latest drivers from device to your USB device.

    1. Click the Start button, type Windows Update in the search box, and then click Windows Update in the results pane.
    2. Click find updates. When the scan finished, click optional review updates.
    3. Click the check box next to the update, and then click install updates.
    4. If you are prompted, read the license agreement, then click I agree.
    5. Follow the instructions on the screen to download and install updates.
    6. If you are prompted, restart your computer.

    More information: Update a hardware driver that is not working properly

    Hope this information is useful. If the problem still persists, please post back for further assistance, we will be happy to help you.

  • What is the problem with the conversion of objects with gradients to the gradient mesh?

    What is the problem with the conversion of objects with gradients to the gradient mesh?

    Radial gradients are special, and it could become difficult edit the gradient mesh resulting.

    Take the layer apnel and inspect your objects. You will find a clipping mask the cracks inside.

Maybe you are looking for

  • Kaspersky PURE total security is safe for Mac

    Is Kaspersky

  • Reload button missing in the toolbar and not available to add

    There is no refresh button in the navigation toolbar in Firefox 4. When I go to add a customization, I am not offered a refresh icon. There are only 17 icons of your choice. The 'help' on personalization shows many more options.

  • Two routers connected, but no Internet on the router downstream

    Hi, I followed the instructions in the FAQ for routers chaining daisy with only partial success.  I have a WRT54GS V6 router configured as my gateway.  The downstream router is a BEFSR41 v4.  Both have the latest firmware. I have visibility on the fu

  • T60 erro

    I ask for help! When the laptop enters sleep mode and retorana, displays the blue screen with the following error message: STOP: 0x0000008E (0x00000005, 0XEB3DDAE2, 0XB2FB8B78, 0x00000000). How can I solve?

  • Tuncated from database values

    We use System.Data.OracleClient with .net 2.0 to connect to the server Oracle 12 c. We see that if the value returned from the Oracle database is 'AABBCCDD', in the application shows "AABB" only. We have verified that the value of the database is ret