HTTP - Error 502 gateway connection

Hello

In an application I'm developing with java and SDK v. 7.0.0, I am trying to connect via http to a server that is located on a private network. The code is pretty basic:

String url = ""http://site.bl.company.net/login.asp;deviceside=true "; "
ConFactory ConnectionFactory = null;
try {}
conFactory = new ConnectionFactory();
conFactory.setTimeLimit (1000);
HttpConnection conn = null;
Conn = conFactory.getConnection (url) .getConnection () (HttpConnection);
conn.setRequestMethod (HttpConnection.GET);
conn.setRequestProperty ("Content-Type", "application/x-www-formulaires-urlencoded");
RCODE int;
RCODE = conn.getResponseCode ();
If (rcode! = 200)
{
Error ("failed server to ' + this.urlStr + 'code HTTP' + String.valueOf (rcode));
}
}
catch (Throwable t)
{
Error ("connection error:"+ t.getMessage () ');
return;
}

The url is visible inside the company VPN. Phones, when the 3G, through BES to reach the VPN. If I type the url in the browser application when, the 3G, it can very well be reached. However, the app in 3G, the connection fails with code 502 (gateway error). We looked through newspapers and it seems that the request does not reach BES; where it might be failing?

The connection works perfectly fine when the phone is connected in wifi on an access point in the VPN. It works very well to other URLS not on VPN under 3G and wifi.

Any help/advice/suggestions/questions would be greatly appreciated!

Thank you.

If you run in a BES environment, and want to access something that's within the corporate network, you must use the suffix

« ; deviceside = false '.

otherwise, you are gong through the gateway to mobile operators, who of course has no access to the internal network.

See here for more information:

http://supportforums.BlackBerry.com/T5/Java-development/different-ways-to-make-an-HTTP-or-socket-con...

But there is a curve ball here.

Once an application has attempted to access a network located outside the corporate network (like you did with ";) deviceside = true'), that the request is normally prohibited access URL within the network.  It is the problem of split-pipe.  The idea is that if an application could open connections inside and outside of the firewall, it could copy the data from the corporate network to the outside.  It is so restricted.

So, if you change your current application to use '; deviceside = false ' and then try on a business device that already has had your application under running with. " deviceside = true', it will probably fail the problem of split pipe.

To work around this, you have three options:

(a) wipe the device and reinstall the OS and application

(b) to obtain your BES administrator to allow the app to access both inside and outside

(c) create a new application.

Tags: BlackBerry Developers

Similar Questions

Maybe you are looking for

  • Truck Series 2

    Hallo from Germany, today in 2 weeks, we will begin our roadtrip across California, Nevada... and my plan is to buy a Apple Watch series 2 as a birthday gift and a memory for me :-) Now, I saw in the online store that I'm not able to take one in a st

  • How to stop additional instances of my Firefox home page to open when I click the links?

    Often, when I click on a link in an e-mail or web page, and Firefox is not yet running, not only opens this web page linked, but also an additional instance of my home page opens. I would like to avoid this.

  • Password for HP 15-g039ca

    Do the legwork for a friend who is not a good comand of the English language and in some sort got his laptop in the administrator password screen.   The number that appears after 3 trials is - 56463094.  Someone has an answer on how to get through th

  • Get the string inside parentheses - to help scan from string

    I have a very basic question here. I would like to extract a part of a chain that is inside the brackets (example: I work with [National Instruments]). In the string, I want to extract only of National Instruments, I know logical extraction in findin

  • I can print in "Portrait" mode but not in "Landscape" mode! " Help!

    Printer prints documents in Portrait mode, but not in the landscape!