Chapter 5 Client Design
239
gui.setStatus("");
JOptionPane.showMessageDialog(gui, 
"Order Not found with Order ID " + orderId,
"Error",
JOptionPane.ERROR_MESSAGE);
} catch (Exception ex) {
// do nothing for now
}
gui.setStatus("Completed lookup for order ID " + orderId);
SwingUtilities.invokeLater(this);
done = true;
}
}
}
Code Example 5.19
J2SE Client Using 
SwingUtils.invokeLater
This example illustrates how a J2SE client can use the J2SE platform APIs to
enhance the user experience. In this example, the user has selected an option to
track an order currently being handled by the Web service. That option calls the
invokeLater
 method, which in turn invokes a class implementing the 
Runnable
interface. This class, using a callback mechanism, updates the user with messages
indicating the status of the Web service call and details pertaining to the order
being tracked. If the order is not found, the code handles displaying to the user a
suitable error message indicating the exception. 
Note:
 More information is available on the 
SwingUtilities
 API, along with
using threads and GUIs with J2SE clients. You can find this information at
http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html
.
5.4.3 Server Side Design Considerations for Clients
It should be clear by now that client developers and service endpoint providers do
not operate in a vacuum. When it is known that the target client environment is
based on JAX RPC, the service endpoint developer can provide prepackaged librar 
ies and server side documentation. These libraries should contain all files, such as
the client side representation of the service endpoint interface and its dependent
classes, that are necessary to access the service. The library can include additional
facade classes that simplify the client view of the service and potentially shield the






New Page 1








Home : About Us : Network : Services : Support : FAQ : Control Panel : Order Online : Sitemap : Contact : Terms Of Service

java web hosting

 

 

 Our partners: | PHP: Hypertext Preprocessor | Best Web Hosting | Java Servlet Web Hosting | Inexpensive Web Hosting |

Jsp Web Hosting | Cheapest Web Hosting | Jsp Hosting | Cheap Hosting

 

Virtualwebstudio. Business web hosting division of Web Design Plus. All rights reserved