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: 107
Registered: ‎10-06-2010
My Device: Not Specified

Web Service Call handling with customised event listener

Hi

 

I need advice regarding the implementation of web service calls and call back/event listener.

 

In my application, I have around 10 web service methods. I call web service to retrieve some data in background using thread. Once I get the result, I update the UI using UiApplication.invokeLater.

 

As I have many web services, I have to implement a method for each web service which starts thread in background, calls web service and updates UI.

 

Is that any way we can create event listener where web service method can fire events e.g.. WebServiceCallCompleted and we can implement the listener on main UI classes.

 

Any advice on handling multiple web services with well structured code would be very much appreciated.

 

Many thanks

Nitin