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
Contributor
laaa00
Posts: 11
Registered: ‎08-08-2012
My Device: BB developer
Accepted Solution

Connectivity problem Saudi Arabia

We built an app using our own app server and it's placed within the customer premises in Saudi.

When connecting the BB app locally (it works when connecting from Europe) we get error "403 Forbidden".

We use TCP.

 

We belive the customer has done their part right but believe this is a regional issue.

Any ideas what it could be and how to solve is appriciated?

 

Regards

Lars

Please use plain text.
Developer
Eugen
Posts: 467
Registered: ‎07-16-2009
My Device: Z10 LE

Re: Connectivity problem Saudi Arabia

Could you show cod with your connection functionality. Probably we will find something there.

 

We also use socket and I hope we don't have issues in Saudi Arabia. At least I see alot of active users there from Flurry and our own stats.

Please use plain text.
Developer
peter_strange
Posts: 19,609
Registered: ‎07-14-2008
My Device: Not Specified

Re: Connectivity problem Saudi Arabia

I guess the important thing here is what gateway is actually reporting the 403. 

 

Can you get at the same URL using the Browser?

 

Do you know what connection method is being used to access the Server (WAP, BIS-B, etc)?

 

What OS is on the devices?  This is only relevant because it might determine the testing that can be done. 

Please use plain text.
Contributor
laaa00
Posts: 11
Registered: ‎08-08-2012
My Device: BB developer

Re: Connectivity problem Saudi Arabia

[ Edited ]

Thanks. Check with coders.

Please use plain text.
Developer
simon_hain
Posts: 16,215
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Connectivity problem Saudi Arabia

403 usually means that some form of authentification is missing, for example BasicAuth headers.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Contributor
laaa00
Posts: 11
Registered: ‎08-08-2012
My Device: BB developer

Re: Connectivity problem Saudi Arabia

Hi,

We can connect from Europe to app servers in Saudi.

RIM support (Canada) has opened the IP's for these servers.

We can not connect from inside Saudi on BB (works on Android & iPhone).

Could it be that it's needed to be done locally (on RIM servers in the region)?

 

We have another app (demo app) that works fine on Blackberry in rest of world but not on BB's in that region (we have not told RIM support to open the IP's for the test app).

 

...and as developer/Alliance Partner there is no RIM support to call (just email with 5 working days response time at best)..

Please use plain text.
Developer
peter_strange
Posts: 19,609
Registered: ‎07-14-2008
My Device: Not Specified

Re: Connectivity problem Saudi Arabia

[ Edited ]

403 means this I think:

"The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated."

 

So whatever gateway you are connecting to appears to be rejecting your URL.  The trick appears to be to find out why and the first step along that path I think, is to to determine what connection method you are using.  So all my questions still stand.  Can you get answers to these?

 

In addition I think it would be useful to get the Headers from the response that you get - the Headers also contain information regarding the Server and will help too.

 

Here is some code to get the Headers:

 

                    if (rc != HttpConnection.HTTP_OK) {
                        // Log header info - can be very useful
                        StringBuffer sb = new StringBuffer();
                        sb.append("Response: " + Integer.toString(rc) + ", " + _httpConnection.getResponseMessage() + "\n");
                        String key = "";
                        for ( int j = 0; key != null; j++ ) {
                            String key = _httpConnection.getHeaderFieldKey(j);
                            if ( key != null && j > 0 ) {
                                String field = _httpConnection.getHeaderField(j);
                                sb.append("Header: " + Integer.toString(j) + ", " +
                                                key + " : " + field + "\n");
                            }
                        }
                        System.out.println(sb.toString());
                    }

 

This code has been taken from some production code but edited so may not compile or work correctly.  Also the names don't match your code.  But you get the idea. 

 

Please use plain text.
Contributor
laaa00
Posts: 11
Registered: ‎08-08-2012
My Device: BB developer

Re: Connectivity problem Saudi Arabia

 

Hi,

We are not using HTTP, just tcp connection

We are using BIS-B
Doesn't work on any BB OS
Please use plain text.
Developer
peter_strange
Posts: 19,609
Registered: ‎07-14-2008
My Device: Not Specified

Re: Connectivity problem Saudi Arabia

"We are not using HTTP, just tcp connection"

 

This does not seem right.  How can you get a 403, which is an http connection error, if you are not using HTTP.  I think there is a terminology issue here.  When you open a connection, the URL you supply will typically start with "http://" or "socket://".  Which of these are you using?  If http, then you are using an HTTP connection. 

 

"We are using BIS-B"

 

This suggests the most likely server that is rejecting your request is the RIM Operating Centre.  I believe there is one in Saudi, so it is rejecting the request.  I presume therefore you (or your coders) have asked RIM for this for this application and asked RIM to allow your URL in Saudi?

 

I would still print out the Headers to identify the Server.  It could be being let through the RIM gateway then rejected at another Gateway, or the firewall into your customer's premises.  I doubt this because you can get to the Server from outside Saudi and from other mobile phones. 

 

As a test, you (or your coders) should try using another connection method, such as WiFi, or WAP.  this will tie down the problem. 

 

"Doesn't work on any BB OS"

 

OK, do you have a BB OS 5.0 device that you can test on?  OS 5.0 is good becuase you can choose the Browser to match the connection method you want to test. 

 

Finally do you have an answer to this question from previously?

 

Can you get at the same URL using the Browser?

 

If I was working on this problem now, I would focus on:

a) Testing the Browser on a phone

b) Trying another connection method.

Please use plain text.
Contributor
laaa00
Posts: 11
Registered: ‎08-08-2012
My Device: BB developer

Re: Connectivity problem Saudi Arabia

Thanks Peter,
will check with programmers.

/Lars
Please use plain text.