10-17-2009 11:01 AM
Is this two questions?
If you don't want BES handling cookies and redirection, then make a different type of connection.
For example, on the simulator, do not start MDS-CS, and as for a deviceside TCP connnection using ";deviceside=true". You will now see the redirect responses and the Set-Cookie headers.
For you other issue, "works on simulator not device": this question is asked and answered (as well as it can be) many, many times per day.
If you are not using BES or BIS-B, then your choices are WAP, WAP2, WiFi, or Direct TCP. Each of these options will require one or more connection parameters appended to the URL. Unfortunately, most of these parameters are carrier-specific, so you are going to need some research to find the correct WAP or APN info for each carrier that you plan to support.
See this article as a starting point, and be sure to look at ther Peter Strange sticky thread on this forum.
10-17-2009 03:12 PM
when you open the HTTP connection in the simulator, append this to your URL:
This tells the simulator (or the device) "I want a direct connection, not through BES".
I guess my next question is, "why do you want to do this?" If your customer has a BES-connected unit, chances are that his admin restricts non-BES connections from the device anyway, especially from 3rd party apps. One of the things that conapnies like about BES is they can track and police internet usage.
10-17-2009 03:41 PM
In the simulator, cookies are handled by the MDS simulator by default. So maybe it is working because it is still enabled.
To disable cookiehandling:
"Step1 - Make sure the BlackBerry® MDS Simulator is not caching cookies The BlackBerry MDS Simulator will, by default, cache cookies instead of passing them back to the requesting application. By default, requests made through a BlackBerry® Enterprise Server or BlackBerry® Internet Service will not cache cookies, so it is important to make sure that the BlackBerry MDS Simulator is performing similarly.
1. Open the rimpublic.property file. This file can be in one of the following locations: For BlackBerry MDS Simulators installed with the BlackBerry JDE \Program Files\Research In Motion\BlackBerry JDE #.#.#\MDS\config For standalone BlackBerry MDS Simulators \Program Files\Research In Motion\BlackBerry Email and MDS Services Simulators #.#.#\MDS\config
2. Under the [HTTP HANDLER] section, update the following: application.handler.http.CookieSupport = false