Troubleshooting guide
7
Creating connections
Fetching data using HTTP or TCP sockets
Java™ applications for BlackBerry® devices can use standard HTTP, HTTPS, and TCP socket protocols to establish
connections over the wireless network. When establishing the connection over the cellular network, an
application can use one of two wireless gateways to proxy the connection to the Internet or the corporate intranet.
You can design your application to rely on the default gateway that is available to the BlackBerry device user, or
you can customize your code to explicitly select a preferred gateway.
Explicitly selecting a gateway
Set up your application to use the preferred gateway for a connection and the default gateway only when the
preferred gateway is not available.
Using the BlackBerry Enterprise Server as an intranet gateway
Enterprise organizations host the BlackBerry® Enterprise Server behind their corporate firewall to let BlackBerry
devices access the corporate intranet. The BlackBerry Mobile Data System™ component of the BlackBerry
Enterprise Server includes the BlackBerry MDS™ Services, which provides an HTTP and TCP/IP proxy service to let
third-party Java™ applications use it as a secure gateway for managing HTTP and TCP/IP connections to the
intranet. When you use the BlackBerry Enterprise Server as an intranet gateway, all data traffic between your
application and the BlackBerry Enterprise Server is automatically encrypted using AES or Triple DES encryption.
Because the BlackBerry Enterprise Server resides behind the corporate firewall and provides inherent data
encryption, applications can communicate with application servers and web servers that reside on the corporate
intranet.
If your application connects to the Internet rather than to the corporate intranet, you might be able to use the
BlackBerry Enterprise Server that belongs to the organization as a gateway as well. In this case, network requests
travel behind the corporate firewall to the BlackBerry Enterprise Server, which makes the network request to the
Internet through the corporate firewall. However, enterprise customers can set an IT policy to enforce that the
BlackBerry Enterprise Server is the gateway for all wireless network traffic, including traffic destined for the
Internet.
If your application connects to the Internet and you are creating your application for non-enterprise
organizations, you can also use either the BlackBerry Internet Service or the Internet gateway of the wireless
server provider to manage connections.
Fetching data using HTTP or TCP sockets
Datagram connections
Using port connections