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
New Developer
Posts: 6
Registered: ‎01-06-2009
My Device: Not Specified

BES Blocking Communication between my app and web-service?

I've written a app using BB JDE that gets GPS coordinates and sends them to a .NET Web-Service.  The app works smoothly on the simulator but when installed on an actual device, it fails to transmit the coordinates.

 

I've tried the app on 4 physical devices so far:

1) Storm (not on BES): worked

2) Pearl (not on BES): worked

3) Bold (on BES): failed

4) Curve (on BES): failed

 

From the tests above, I can safely guess the BES is blocking the communication between my app and the web-service.  I'm not using any signed APIs (as far as I know) so its probably not the cause of this issue. Is there a setting that needs to be changed on the BES to allow my app to communicate with a web-service?

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: BES Blocking Communication between my app and web-service?

[ Edited ]

I assume that you are not using any "deviceside=" string in the connection URL?

 

Are you getting any result back from the BES server, like a 406? (or something along those lines)?

 

Have you tried this on the simulator, with no "deviceside" parameter, and all traces running on MDS (to simulate BES connection)?

 

I spent many hours trying to track down just such an issue, and found that BES was eating the response because I specified "text/xml" in the accept header (per the specification of the host) and it was actually returning "application/xml" as the content type. Although the response was fine otherwise, BES was eating it and returning a "406" back to me (content unnacceptable).

 

 

Message Edited by RexDoug on 01-08-2009 04:56 PM
New Developer
New Developer
Posts: 6
Registered: ‎01-06-2009
My Device: Not Specified

Re: BES Blocking Communication between my app and web-service?

1) Yes, I'm not using the deviceside parameter.

 

2) When I debug this app directly on the device, I get the following error (no error code):  java.io.IOException: Failed to transmit

 

3) When I run the simulator, I can see the MDS-CS cmd window pop-up simultaneously but I don't know if its actually being used by the simulator - how can I check?

 

4) Where exactly did you specify the content type?  I'm using kSoap2 and sending the data as a SOAP v1.1 request - none of the parameters I'm currently using contain the content type.

 

Thanks for your help!

 

 


RexDoug wrote:

I assume that you are not using any "deviceside=" string in the connection URL?

 

Are you getting any result back from the BES server, like a 406? (or something along those lines)?

 

Have you tried this on the simulator, with no "deviceside" parameter, and all traces running on MDS (to simulate BES connection)?

 

I spent many hours trying to track down just such an issue, and found that BES was eating the response because I specified "text/xml" in the accept header (per the specification of the host) and it was actually returning "application/xml" as the content type. Although the response was fine otherwise, BES was eating it and returning a "406" back to me (content unnacceptable).

 

 

Message Edited by RexDoug on 01-08-2009 04:56 PM

 

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: BES Blocking Communication between my app and web-service?

[ Edited ]

OK, you didn't mention KSOAP in your original post. The KSOAP library should be setting the correct content-type and Accept in the POST header.

 

To set up the MDS Simulator to give better debug info:

 

* go to your MDS directory

* open the file config/rimpublic.properties

 

In the "logging" section, make sure you have these parameters set as follows:

[Logging]
Logging.level=4
Logging.console.log.level=4

 

In the HTTPHandlers section, make sure these parameters are set.

 

application.handler.http.logging = true
application.handler.http.logging.verbose = true

You will probably have to add the "verbose" line.

 

Now you should get detailed back & forth messages, including response codes and header info, in the MDS console window.

 

Oh - and I forgot to mention - treat this just like a BES connection on the device (no deviceSide=) and hope that you can duplicate whatever the problem is. Smiley Happy

Message Edited by RexDoug on 01-09-2009 02:15 PM