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 Contributor
Posts: 3
Registered: ‎07-12-2010
My Device: 9700
My Carrier: BSNL, 3G

HTTP connection through WAP2

Hello All

 

> Environment

BB 9700, OS v 5.0.0.442

Connection: BSNL CellOne, 3G with BIS

<

 

This is my first post to the forum. I have been reading the threads on network connection mechanisms ..so peter_strange and others gurus are not strangers to me!!! :smileyhappy: Thanks for being out there to help.

 

We have been using the code in the KB article to get the WAP2  UID

[What Is - Different ways to make an HTTP or socket connection, Article Number: DB-00396]

 

But in my device Service Book, there is another additional entry which matches the search criteria in the KB article and the uid in this case is "WAP2 trans stream". Connection fails with this UID.

 

ServiceBook->WAP2 Transport [WPTCP] -> UID=WAP2 trans

ServiceBook->WAP2 Streaming Transport [WPTCP]  -> UID=WAP2 trans stream

 

So currently we have added an additional check to avoid this "stream" getting in our way.

if ((records[i].getUid().toLowerCase().indexOf("wifi") == -1)&& 
    (records[i].getUid().toLowerCase().indexOf("mms") == -1)) && 
    (records[i].getUid().toLowerCase().indexOf("stream") == -1)){ 
     uid = records[i].getUid(); 
     break;  
 } 

 

Now we are able to connect through WAP2.

 

Is this method correct? Any better methods?

 

Thanks

 

Best Regards

Contributor
Posts: 12
Registered: ‎12-23-2009
My Device: BB Bold 9700
My Carrier: WIND Mobile

Re: HTTP connection through WAP2

[ Edited ]

Yeah, I ran into this same issue and did not find any any posts on it. Your 'fix' works, I'd also like to know if it works all the time (no other records pose a similar problem)...

 

Anyone know of a definitive guide to Service Books descriptions? I managed to find this short one with a Google search.

 

9700 running 5.0.344

I've attached screenshots of the two service book entries.

 

Note, my stream entry has "WAP2 trans2" as a UID.

3117i175B3CC236114573

3118iBD89F45600DFEB6C

Shaheen,
Inkrypt Technologies Corp.
Developer
Posts: 466
Registered: ‎03-04-2009
My Device: 8520
My Carrier: some

Re: HTTP connection through WAP2

The post is quite old. But I have come across exactly the same issue.

I received a message from my customer about troubles with internet connectivity using my app.

according to log file the app used WAP2 gateway to perform HTTP connections.

the suffix to append to connection URL was : WAP2 trans and everything was OK.

the next day I see that the suffix became WAP2 trans stream and in this configuration it didn't work.

I get 'Stream closed' exception message.

So can anybody explain why  the service book entry changed? Or the case is that the newly SB appeared? How can we be aware of such issues?

Got resolved! Press kudo icon!
New Contributor
Posts: 3
Registered: ‎07-12-2010
My Device: 9700
My Carrier: BSNL, 3G

Re: HTTP connection through WAP2

Hello

 

We observed the "WAP2 Transport Streaming" entry appearing in the service book; before the "WAP2 Transport" entry. So upon enumeration of SB entries in code, we come across the Streaming entry first. This results in using the not suitable UID.

 

Observed the "Streaming"entry with a 3G connection.

 

It seems the selective elimination of UIDs to findout the correct one for "WAP2 Transport" has both positive and negative aspects.

+ Carriers may use any UID. i.e UID is not limited to "WAP2 trans". It may be "WAP2 trans2" or something else.

- If a new SB entry comesup like the one for "WAP2 Tranport Streaming"; existing code may or may not break.

 

The solution may be the new connection APIs in version JDE 5.0, which eliminate the need for explicitly searching for the connection UIDs ...etc. We haven't tried that yet.

 

HTH

Developer
Posts: 466
Registered: ‎03-04-2009
My Device: 8520
My Carrier: some

Re: HTTP connection through WAP2

swami_vivek, thank you for the reply. As in my case I have a problem of a breaking code due to this issue with service book's UID. The new connection API hasn't been tried out as we maintain lower OS version.

Got resolved! Press kudo icon!
New Contributor
Posts: 3
Registered: ‎07-12-2010
My Device: 9700
My Carrier: BSNL, 3G

Re: HTTP connection through WAP2

Hi

We too are tied down with support for lower OS versions (< 5.0). :smileyhappy:

 

The NDT (Network Diagnostic Tool) source-code from RIM also need to get updated [to circumvent the WAP2 Transport Streaming UID related issue] Not sure who maintains the source.

 

 

Developer
Posts: 466
Registered: ‎03-04-2009
My Device: 8520
My Carrier: some

Re: HTTP connection through WAP2

yea, in their NDT they handle wap2 through searching for the most appropriate SB and getting its UID. But as wee see that could be the tricky one...

Got resolved! Press kudo icon!