Failed to retrieve any kind of site data Web

I use the following code in different variations of the content of a web service, which works in the simulator when the Network Simulator is on, but when I go to wifi only on the simulator it retrieves all the data. It's just empty. On the device, I get nothing more. Now, I was just trying to retrieve data from the url as a test html, so www.example.com, but nothing. I tried sites randomly like google.com and they give me the html code. So now I'm puzzled as to why I can get data from my site. It is how the server is configured? It is clearly not a problem connecting to wifi that I am able to use the browser and working with the other URLS.

Exactly how does httpConnection? I'm so confused. Are there alternatives to extract a json string?

public class ConsumeFactoryThread extends Thread {
    private String url;
    private HttpConnection httpConn;
    private InputStream is;
    private CustomMainScreen m;
    private JSONArray array;

    public ConsumeFactoryThread(String url, CustomMainScreen m){
        System.out.println("Connection begin!");
        this.url = url;
        this.m = m;
    }

    public void finished(){
        m.onFinish(array);

    }

    public void run(){

        myConnectionFactory connFact = new myConnectionFactory();
        ConnectionDescriptor connDesc;

        connDesc = connFact.getConnection(url);
        System.out.println("Connection factory!");
        if(connDesc != null)
        {
            System.out.println("Connection not null!");
            httpConn = (HttpConnection) connDesc.getConnection();
            is = null;

            try
            {
                final int iResponseCode = httpConn.getResponseCode();
                UiApplication.getUiApplication().invokeLater(new Runnable()
                {

                    public void run()
                    {
                        System.out.println("Connection in run!");
                         // Get InputConnection and read the server's response
                        InputConnection inputConn = (InputConnection) httpConn;
                        try {
                            is = inputConn.openInputStream();
                            System.out.println("Connection got inputstream!");
                        } catch (IOException e) {
                            // TODO Auto-generated catch block
                            e.printStackTrace();
                        }
                        byte[] data = null;
                        try {
                            data = IOUtilities.streamToBytes(is);
                            System.out.println("Connection got data!");
                        } catch (IOException e) {
                            // TODO Auto-generated catch block
                            e.printStackTrace();
                        }

                        String result = new String(data);
                        System.out.println("Connection Data: "+result);
                        try {
                            array = new JSONArray(result);

                            //finished();

                        } catch (JSONException e) {
                            // TODO Auto-generated catch block
                            e.printStackTrace();
                        }

                    }

                });
            }
            catch(IOException e)
            {
                System.err.println("Caught IOException: " + e.getMessage());
            }
        }

    }

}

302 processing is not directly related to the data plan.  I suspect, however, that the 302 are treated differently according to the connection method you use.  If you connect using BES/MDS, then the SDM server can resolve the 302 and is probably.  If you connect through BIS - B, the server also will probably solve the 302 for you.  But if you connect through WAP, TCP or WiFi carrier, you need to fix yourself.

There was some discussion about 302 on this forum, I know because I've been involved in some of them!  You can look here for 302 and watch a little.

In short, if you receive a 302, you must use the returned header fields and your existing URL to create a new URL - then repeat your request using this new URL.

From my experience, 302 are usually some sort of blocking or logon page.  But you must follow the redirect address so you know exactly what you have been sent, and this page explains usually.

Tags: BlackBerry Developers

Similar Questions

  • Failed to retrieve the DIAdem DataFinder research data, using data-finder toolkit LabVIEW 2009

    I am facing problem to retrieve the DIAdem Datafinder data.

    At first, I developed this project in LabVIEW 2010. But because of a problem that I met in LabVIEW 2010, I thougth to work on the project in LabVIEW 2009.

    Then, I reused the project that I created using LV 2010 using option economy for the previous version.

    When I tried to retrieve the data from the tiara using data finder toolkit. I got a 305505 warning. Please see the attached message of Warninig.

    But I have not seen this warning while I was working in LabVIEW 2010 and also, I was able to get the data from the tiara.

    Please suggest me a way to solve this problem.

    Hi Nanda,
    There is a bug when using the SDK use in combination with DataFinder Toolkit 2009.
    This bug is already fixed in LabVIEW 2010 and use SDK 2010. But as you said there is another question in LabVIEW 2010, forcing you to LV 2009.
    I suggest you use LabVIEW 2009 with use SDK 2009 and DataFinder Toolkit 2009 and instead to use the "Waveform.vi results" to read the search results, I would recommend to use the screw storage. I spread your example VI and it attached to this message. You will still see the dialog box to search for "lvStorage.dll" but it will automatically disappear and the VI works anyway because in this case LabVIEW will find the dll itself.
    My extended VI uses the '_openWithRoot.vi' to open a file with a different use than CT or PDM. This VI is also described in the following knowledge base article: http://zone.ni.com/devzone/cda/epd/p/id/4181
    With LabVIEW 2010 use support has been enhanced and fully integrated in the standard palette of storage screws. So in LabVIEW 2010, you can replace the "_openWithRoot.vi" with the 'Open Data Storage.vi' standard but with LabVIEW 2010, you can also use "Waveforms.vi results" to read the search results.

    I hope this helps.

    Kind regards
    Eva

  • Failed to retrieve the installation of CS6 Design & Web Premium files

    I went through the steps that have been proposed in other threads. It's on a FRESHLY installed Windows 7 64 bit.

    When I try to use the Adobe downloader, I get error 101. When I received the Direct download files, I was still unable to extract through the installation of Adobe software. When I tried to extract the files using WinRAR, I got an error message stating that they are corrupt files. I tried to extract the files and download files on all three of my drives (SSD, HDD and laptop HARD drive) and get the same messages.

    I'm on an administrator account. I have to retrieve it from my programs or any other folder where I would not write permissions, and I probably have enough space for the installation. Any ideas where I could go wrong?

    Well, in case someone happens to have a similar problem... I downloaded on my laptop rather & then copied the files to my external HARD drive. The installation worked without a hitch. It seems that for some reason any the .7z file wouldn't download properly on my PC, no matter what method or the browser I used or drive I DLed to... Obviously a cause for concern on my end, but for now, at least he is finally working.

  • Any program will recover data disk hard possible unrecognizable fat32 without formatting.

    I scanned my Windows Vista laptop with McAfee on April 24 with my hard drive external plugged.
    I left scanning for I can go to sleep at 12:00 when it was already 90% complete.
    This morning, I opened my computer and a black screen pops up and says it's my drive I: scanning.
    He removed Shutter Island because it is unrecognizable.
    He did nothing else.
    I discovered that I had to format my hard drive because it is damaged. but the hard drive is there, at least he can read my hard drive.
    I tried on my other laptops, and it reads the same.

    I restarted the laptop original with my hard drive connected and now it deleted my files 2.
    I don't want to do something else, so I shut it down using the power button / stop, removed the hard drive and opened it again.
    It was fine. I plugged back it it and it was always the same as before. Unrecognizable.
    What should I do now to recover my important balls?
    Most of the programs do not read hard disks that are corrupt.

    Hi Alissa.123,

    If the computer is to ask you to format the drive, then unfortunately you may have to do. But, you can search for any third party Internet data recovery software to see if it helps to recover your data.

    Important note: this response contains a reference to third party World Wide Web site. Microsoft provides this information as a convenience to you. Microsoft does not control these sites and no has not tested any software or information found on these sites; Therefore, Microsoft cannot make any approach to quality, security or the ability of a software or information that are there. There are the dangers inherent in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

  • Failed to retrieve the mappings for the server. Reason: null

    I get the following in the Console error when I add or update my server

    [oolocal], (07 / 14 at 04:40:11): server is available. Get the settings from the server to the server
    [oolocal], error, 07 / 14 at 04:40:12, impossible to fetch Server mappings. Reason: null
    [oolocal], error, 07 / 14 at 04:40:12, failed to get the logs directory. Reason: null

    Standalone CF8

    Webroot in c:\inetpub

    RDS works (so I can browse the datasource)

    Kind regards

    Aaron

    This problem is known. Failed to retrieve the mappings for the server. Reason: null. We fix it.

    Just to check the parameters are collected successfully from the server. Create the project and join the server to the same. CFM open and type must identify the data sources.

  • Can't watch any kind of videos

    Welcome guys.
    I got really annoying problem.
    I can't watch yt/vimeo/other video streaming sites.
    I tried refreshing browser/reinstall/start without Add-ons.
    I have same fresh windows stock for it.
    And I have no idea why I can't watch them...
    I have error (attached screenshot) or http://puu.sh/jPKCQ/4e5e625f1b.png
    I have 8.1 x 64 on lenovo computer y570 laptop.
    Any kind of help will be really appreciated.
    Concerning

    FIXED!
    True Media.MediaSource.WebM.Enabled
    Media.MediaSource.MP4.Enabled True
    Media.fragmented - mp4. * to true
    Media.fragmented - mp4.use - white-decoder false

  • I use firefox (37.0.1). Since last week, I am unable to play any kind of videos youtube esp. I'm in a big problem. Please help me.

    I use firefox (37.0.1). Since last week, I am unable to play any kind of videos youtube esp. NO change in system or the installation has been made. Please help me

    Please try first: difficulty common audio and video questions

    Second: try to reinstall https://www.adobe.com/support/flashpl.../downloads.html Flash

    Third: To ensure that all drivers are up to date: update your drivers graphics to use hardware acceleration and WebGL

    What were the results?

  • Failed to retrieve on Satellite L300-19F

    My laptop computer is unbootable, so I start to recover with the 2 DVD that I made myself when I bought the laptop.
    (I already used successfully the DVD to get a 2nd hand laptop)

    The drive is already formatted successfully, but the procedure stops when the following error appears "error creating file - data error . Copy of the Base of the recovery files failed! Prees any key to continue... ».
    Then everything in BACK stops: X:\windows\system32>_
    How can I proceed with what DOS commands?

    Please notify. Thanks in advance.

    At the start of the recovery procedure everything works automatically, and if there is no problem with the recovery image, DVD you ve created or HDD recovery procedure everything will work correctly.

    You can have no influence on it and you can't put a few DOS commands to continue the recovery procedure.
    Using recovery DVD on computer, so they are created?
    Have you changed anything on the laptop as the HARD drive upgrade?

  • Service Manager Console 2012 can create tickets via email through any kind of process/workflow?

    Original title: create tickets by e-mail

    Hey guys,.

    I need to create a support metric and most of our users are used for sending emails to the support mailbox and do not connect a ticket. Service Manager Console 2012 can create tickets via email through any kind of process/workflow? I know another system that can - I did not know if the MSC can?
    I hope that makes sense.  THX,

    This issue is beyond the scope of this site and must be placed on Technet or MSDN

    http://social.technet.Microsoft.com/forums/en-us/home

    http://social.msdn.Microsoft.com/forums/en-us/home

  • Is it possible to put any kind of 'stop' on a netbook stolen to make it unusable by microsoft, or any other way?

    Is it possible to put any kind of 'stop' on a netbook stolen to make it unusable by microsoft, or any other way?

    Since this forum is not for questions about stolen laptops, you don't ask in the right place.

    Unless you load something like LoJack or TrueCrypt beforehand, there is nothing you can do to turn off a laptop flew.  Well, I hope that there is no personal data, like numbers of bank account on this PC.

  • Failed to retrieve the configuration of database file when installing EBS on 2 nodes

    I try to install EBS 12.1.1 on two different nodes on Redhat Linux 5. After properly installing the database on node1 (ebsdb), I started rapidwiz on node2 (ebsapps) to install the application technology. When I get to the screen where it asks "Do you want to create a new configuration or load a saved?", I chose to load a saved configuration, typied in the database connection information (ebsdb.sparkdb.com:PROD:1521) and get the following error. Anyone know what I am doing wrong? I am able to ssh to ebsdb to ebsapps and vice versa, and the database and listener is in place.

    Failed to retrieve the database configuration file.

    user564785 wrote:
    What file must be copied from DB node to the node of Apps and what place?

    conf_.txt - http://docs.oracle.com/cd/E18727_01/doc.121/e12842/T422699g54568.htm

    You can copy the file to any place on the application-level nodes.

    Thank you
    Hussein

  • Failed to retrieve this file?

    Hello

    I have written some documents in InDesign CS4 over the weekend and exported inx file to work on it to work using CS3. Something I do quite often.

    When I opened and save it as a new document in CS3 and trying to change my text, I get an error message that says:

    "Failed to retrieve this file. It can be used by someone else. "

    It's crazy, because it it only my folder and is not on any network etc... etc... etc...

    We know what could cause this and how I can close it, so I can work on my file?

    Thank you!

    Babs

    Are you sure that you didn't export an .incx file or resources (history of InCopy CS3) by chance?

    Bob

  • Safari support (Advanced > Web site data)

    Safari settings > advanced > Web site data... There is a website (facebook.com) who is stuck. It says "0 bytes". It will not erase! I tried to do everything in this piece... to turn off the phone, which goes back to the site, go to other sites... & even hard-reboot... but he is still stuck there. When a website that says "0 byte" is usually blocked after erasing my history & data, restart my phone, turn it back on, then erase the data usually deletes... but this time, he is blocked for good. Does anyone have a solution to that could help me? I would appreciate thanks a bunch

    Do a restore to the last iOS 9 to fix the bug

  • I have no toolbar of any kind, I have no search engine, I have no place to see or type in the Url

    I have no toolbar of any kind, I have no search function, I don't have a place to see or type the URL. All I have is the firefox logo and the button to make the page bigger or smaller and a line of old URLs is that when I go to them - I can not navigate out of them and not only no button back and forth. I downloaded new updates - but did nothing.

    This has happened

    Each time Firefox opened

    == Has always been buggy as hell, but it started a few weeks ago

    Don't see the menu bar (file, publishing, display, history...) (Help)? Hold down the key (key in OSX) and press the following letters in this exact order: V T M
    The bar of menus must now appear permanently, unless you turn it off again (view > toolbars). Turn on/off the menu bar is a new feature in version 3.6.
    See the other bars under view > toolbars. Click on one of them will place a check mark (display) or remove the check mark (not shown).
    To display the status bar, display, and then click status bar to place a control mark (display) or remove the check mark (not shown).

    • If items are missing then see if you can find them in the view > toolbars > customize window.
    • If you see the item in the window customize then bring her back in the window, customize the Navigation toolbar.
    • If you do not see this item then click Restore default set in the view > toolbars > customize window.
  • Can I share a link on iCloud drive for any kind of document?

    Can I share a link on iCloud drive for any kind of document?

    You can only share links to documents in iCloud drive iWork.

Maybe you are looking for