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
Developer
Posts: 21
Registered: ‎07-14-2009
My Device: Not Specified
Accepted Solution

JSR 172 - Connectivity issue

Hey all,

 

Hope someone can shed some light on an issue I am experiencing. I have written an app in OS 4.5 and implemented JSR 172 to retrieve data from web services.

 

The app works great in simulators for all devices, and I have been testing it on about 5 different models ranging from 8310s to 9700s with success. That is until last night when I tested it on a friend's 9700 device which was not getting data at all. I had tested it on 2 other 9700s previously, which worked fine. The device that it did not work on is on Wind Mobile which is an HSPA network.

 

The device had internet connectivity, as I was able to browse the internet, and was later connected to WiFi, but the issue persisted.

 

Are there any configuration settings for JSR 172 that need to be enabled? Am I missing something here? I am concerned that this is not an isolated issue, and may appear on other devices as well.

 

Thanks!

Highlighted
Developer
Posts: 70
Registered: ‎05-04-2009
My Device: Blackberry 9800/Blackberry 9530/Blackberry 9700/Blackberry 8530
My Carrier: T-Mobile/Wifi

Re: JSR 172 - Connectivity issue

Are you appending ;deviceside= to your URL? If your using ;deviceside=true make sure the device has a APN set in the TCP/IP options.

If you find this post useful please give kudo's
Developer
Posts: 21
Registered: ‎07-14-2009
My Device: Not Specified

Re: JSR 172 - Connectivity issue

thanks for the response

 

no, i did not have that set, but somehow i do not think it fits.. i tried applying it and testing it, but then ws not getting any data at all in the simulator

 

is this what you meant?

 

public MyWebServiceSoap_Stub() {
  _propertyNames = new String[] {ENDPOINT_ADDRESS_PROPERTY};
  _propertyValues = new Object[] {"http://www.myurl.com/MyWebService.asmx; deviceside=true"};
 }

 

 

Developer
Posts: 21
Registered: ‎07-14-2009
My Device: Not Specified

Re: JSR 172 - Connectivity issue

could someone confirms that jsr 172 does not require a connections class, as is the case w/ ksoap2? it's been working for me great (aside from the noted issue), so i assume that no class is required, but i would like a confirmation.

 

thanks!

Developer
Posts: 70
Registered: ‎05-04-2009
My Device: Blackberry 9800/Blackberry 9530/Blackberry 9700/Blackberry 8530
My Carrier: T-Mobile/Wifi

Re: JSR 172 - Connectivity issue

Developer
Posts: 21
Registered: ‎07-14-2009
My Device: Not Specified

Re: JSR 172 - Connectivity issue

Thanks again for the response and videos.

 

The thing is that JSR 172 is supposed to abstract the connection layer where the API performs the connectivity. It seems to work fine, as I have not had to define specifically the connection method to be used.

 

Where these videos would add value is with connection managers if ksoap2 were implemented for web service calls.

 

Perhaps the question should be whether it is possible to create a connection class for JSR 172 web service stubs provided by the J2ME wireless tookit? If so, it may address the issue we are experiencing with this one particular 9700 device, as described in the first post.

Developer
Posts: 21
Registered: ‎07-14-2009
My Device: Not Specified

Re: JSR 172 - Connectivity issue

Has anyone got experience creating a custom connection class for JSR 172?

 

Thanks

Developer
Posts: 21
Registered: ‎07-14-2009
My Device: Not Specified

Re: JSR 172 - Connectivity issue

We have come accross another device (9000) which is unable to read the web service. The only similarity between the two devices is that they are both not on BES.

 

Does JSR 172 require BES? I would think not, but would like a confirmation.

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

Re: JSR 172 - Connectivity issue

The reason the BES devices work is that this is the default connection when you do not request a specific connection. If the unit is on BES, it work. If not, then it may or may not work, depending on the carrier.

 

So, your JSR172 conneciton will work on a non-BES device, as long as you provide the correct parameters attached to your URL.

 

";deviceside=true" will (in most cases) require additional APN parameters, such as an APN name and user credentials.. This is highly dependent on the carrier and the provisioning of the device.

 

Your code needs to detect what of network connections are available, and correctly specify the URL parameters to make it happen.

 

If you search the forum, you will find that this is well-covered ground.

Developer
Posts: 23
Registered: ‎12-01-2009
My Device: Not Specified

Re: JSR 172 - Connectivity issue

You may have a WS call that is too big for your device.  This link may help: http://stackoverflow.com/questions/4138603/blackberry-8330-connection-issue