Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
02-24-2012 09:40 AM
Hello eveyone, I'm sendind a request to my server from the Blackberry Simulator (obviusly using the MDS simulator), the server responds by setting some cookies on the response. What's strange is that I can see them by using any packet analyzer or even by testing the service using the Firefox plugin Poster.
However, in the simulator the response only shows 6 headers... ignoring the Set-Cookie one that should be there. Why is happening this? Is there any configuration I should do in the MDS in order to get the full headers of the responses?. Thanks a lot.
02-24-2012 09:55 AM
I have no idea what's going on... the same code used to work before. I only can think that the server ip address this time is not localhost, nothing else:
These ones are the headers that reach the simulator:
Response: 200, OK
[0.0] Header: 0, proxy-connection : Keep-Alive
[0.0] Header: 1, connection : Keep-Alive
[0.0] Header: 2, date : Fri, 24 Feb 2012 14:50:24 GMT
[0.0] Header: 3, server : Apache-Coyote/1.1
[0.0] Header: 4, x-powered-by : Servlet/3.0; JBossAS-6
[0.0] Header: 5, content-length : 10
[0.0] Header: 6, x-rim-etag : "76AE569A40BCF30E79A6169920ED616F85B3FEAA"
[0.0] Header: 7, via : 1.1 SVR-KQZYBAR
[0.0] Header: 8, content-type : text/plain
Please I have no idea what's going on... and I do really need to get the Set-Cookie header, (The cookies are there... no doubt about it, it's just the MDS that's blocking them...).
02-24-2012 09:58 AM
02-24-2012 10:06 AM
I'm using the ConnectionFactory class to create my httpConnection, still you suggest to create one manually, adding deviceside=true?.
It's strange, the same code in very similar situations used to work a week ago...
02-24-2012 11:09 AM
As Simon pointed out, MDS manages the session cookies on the simulator, if running.
In the *real* world, with a BES or BIS connection, you will not see the cookies, they will be managed by the RIM infrastructure.
However, in our apps we still look for the cookies to manage the session, because not all customers are on a RIM infrastructure. The apps still have to work. So we manage the sessions if we see the cookies, otherwise we rely on the RIM infrastructure.
IIRC, there is either a connection parameter, or a header, that tells RIM to pass the cookies.
02-24-2012 11:37 AM
Ok, thanks for the explanation. In this case I managed to retrieve the cookies by setting the following rimpublic.property, that was in true before.
application.handler.http.CookieSupport = false
And, for what you have said I think there will be a lot of problems when testing on a real eviroment using BES and RIM infraestructure, I guess is better to be prepared from now.
Again thanks a lot.
02-24-2012 11:53 AM
Thanks for the explanation, I managed to retrieve the cookies in this case by changing the rimpublic.property file. Especifically the following entry:
application.handler.http.CookieSupport = false (before it was in true)
And looking at what you have said, I think I will find lots of problems when testing on a real enviroment using BES and RIM infraestructure, well at least I know what to expect now.
Again thanks a lot.