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

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.

Posts: 56
Registered: ‎07-14-2008
My Device: Not Specified

BES and XML content

This is a long shot, but I figured I'd ask:


I have an application that makes a HTTP connection to a third party site.  The third party then normally returns XML to my app (a listing of files).  


This app has been out for several months with no reported problems.  Now, however, I have one customer in Spain on BES who this does not work for.  I gave the user another build with extra logging and it appears that the connectivity to the server site is fine, it's just returning no content.


If I go to the same site, it all works fine.


Does anybody have any thoughts on why BES might not pass-thru XML?  (this is the only theory I have at the moment).


Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: BES and XML content

I assume that you have other BES users that are working OK? 


I would start by checking the level of the BES in Spain, and the OS Level and model of the device.  Compare these with levels that you know to work.  If you can tell us these details and the web service URL, that might help us recreate your problem.


You might consider copying the XML data to another site, and redirecting the Spanish user to your replacement site, just to see if they can pick up the data from there. 


In addition to the BES, I think there are a couple of other places that the link might be broken:

1) The Server Site might not send data back - for example, if the service has some restrictions on country IP addresses.

2) The customer's network/firewall might block XML traffic.


Unfortunately I don't have an easy way to detect which of the options actually is the problem.  But some logging/tracking should sort it out.


I've just checked our BES logs, and they do not, by default, include any details of an http response.  I'm not a BES expert, so there is probably a better way, but I changed the logging for MDS to include http and Verbose http logging, and for an http GET that I issue from a program, I see the log data I've pasted below (which I've severely edited to save space).  From this, you can see that the MDS sent a GET request to the Service and received 2675 bytes back.  I'm guessing that you if you ran similar logging you would see if the MDS was being supplied with all the data or not.


Alternatively, you could run some network monitor like WireShark, which would actually give you the contents of the message.  Mind you, they might not be happy about running something like that on their live BES in Spain!


Finally, they may already have some logging monitor on their network in Spain, so you ask them to log the data to and from the 3rd party site. 


I hope this is useful.


I had a similar problem in the past where I couldn't download XML data at all to a device I was testing - but I'm sorry to say I never investigated it. 


This log was generated on an BES 4.0 system, I found it in the following log:

C:\Program Files\Research In Motion\BlackBerry Enterprise Server\Logs\20080824\EMS_MDAT_01_20080824_0001.txt

To turn this logging on, I started the BlackBerry Manager, right mouse clicked on the Server, selected "Mobile Data Set Properties" and then selected the Logs tab. As noted above, I'm not a BES expert, so I hope you can translate this for whatever level of BES you have (or they have in Spain).


<....... EVENT = SentToServer, .... = GET ....>
<....... EVENT = SentToServer, .... = [Headers Section]: 6 headers>
<....... EVENT = SentToServer, .... = Connection:close>
<....... EVENT = SentToServer, .... = Via:MDS_4.0.2.6>
<....... EVENT = SentToServer, .... = Accept:*/*>
<....... EVENT = SentToServer, .... = Content-Language:en-US>
<....... EVENT = SentToServer, .... = Host:....>
<....... EVENT = SentToServer, .... = User-Agent:Profile/MIDP-2.0 Configuration/CLDC-1.0>
<....... EVENT = SentToServer, .... = [Parameters Section]: 0 parameters>
<....... EVENT = SentToServer, .... = [Entity Content Section]: 0 bytes>
<...... EVENT = ReceivedFromServer, .... = [Transmission Line Section]:>
<...... EVENT = ReceivedFromServer, .... = HTTP/1.1 200 OK>
<...... EVENT = ReceivedFromServer, .... = [Headers Section]: 9 headers>
<...... EVENT = ReceivedFromServer, .... = Connection:close>
<...... EVENT = ReceivedFromServer, .... = Accept-Ranges:bytes>
<...... EVENT = ReceivedFromServer, .... = Date:Sun, 24 Aug 2008 11:09:42 GMT>
<...... EVENT = ReceivedFromServer, .... = Server:Apache/1.3.34 Ben-SSL/1.55>
<...... EVENT = ReceivedFromServer, .... = Content-Length:2675>
<...... EVENT = ReceivedFromServer, .... = ETag:"1c20bc7-a73-48a4b43c">
<...... EVENT = ReceivedFromServer, .... = Last-Modified:Thu, 14 Aug 2008 22:39:56 GMT>
<...... EVENT = ReceivedFromServer, .... = Content-Location:...>
<...... EVENT = ReceivedFromServer, .... = Content-Type:text/html>
<...... EVENT = ReceivedFromServer, .... = [Parameters Section]: 0 parameters>
<...... EVENT = ReceivedFromServer, .... = [Entity Content Section]: 2675 bytes>


Posts: 56
Registered: ‎07-14-2008
My Device: Not Specified

Re: BES and XML content

Hi Peter -


This is great information, thanks for taking the time to spell it out.  I'll give some of your suggestions a shot and report back.




New Developer
Posts: 2
Registered: ‎08-05-2008
My Device: Not Specified

Re: BES and XML content



  I am developing an application in BlackBerry jde. I just want to download an xml file from an url .and have to read the contents . Can you Guide me on the same



T hanks




BlackBerry Development Advisor
Posts: 15,889
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: BES and XML content

Please have a look at the httpdemo sample application included with the BlackBerry JDE.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.