Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
MatthewJDrover
Posts: 25
Registered: ‎03-20-2009
My Device: Not Specified

MDS Issues

How can I stop the MDS from handling cookies and redirection ?

 

I'll my HTTPConnection code works great in the simulator, but not on my device.

 

I'm working with an 8330.

 

Thanks

Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: MDS Issues

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.

 

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is...

 

 

 

 

Please use plain text.
New Developer
MatthewJDrover
Posts: 25
Registered: ‎03-20-2009
My Device: Not Specified

Re: MDS Issues

Ahh, so If I just ceate a socket and write out the http headers myself instead of a httpconnection, will it go through the mds ?

Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: MDS Issues

uhhhh....no

 

when you open the HTTP connection in the simulator, append this to your URL:

 

";deviceside=true"

 

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.

 

Please use plain text.
Developer
johnbibs
Posts: 905
Registered: ‎02-07-2009
My Device: BlackBerry Torch 9800
My Carrier: Globe Telecom

Re: MDS Issues

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:

check out: http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800440/How_To_...

 

"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

Please use plain text.