204
Scenarios for Web Services Based Client Applications
tainer to manage the environment, stand alone clients require more work from the
developer.
Although each type of client works well, developers must deal with an
increasing level of complexity if they work directly with the JAX RPC or SOAP
runtimes. The advantage of the J2EE environment is that it shields developers
from some of the complexity associated with developing Web services, such as
the look up of the service and the life cycle management of objects used to access
a service. In the J2EE environment, a developer uses JNDI to look up a service in
much the same way as he or she might use other Java APIs, such as JDBC or JMS.
Given that many types of clients can access Web services, how do you deter
mine which type of client is best for your application? To make this determination,
you must consider how end users and the application expect to use the service.
You should also weigh the pros and cons of each client type, and consider that
each type of client has its own unique characteristics that may make it appropriate
(or not appropriate) for a specific application task. Thus, you should consider the
characteristics of the different client types as well as the communication mecha
nisms available to each client type when deciding which client type to use to
access a Web service. The following general guidelines should help with this deci
sion:
E
J2EE clients
J2EE clients have good access to Web services. J2EE clients
have other advantages provided by the J2EE platform, such as declarative se
curity, transactions, and instance management. J2EE clients may also access
Web services from within a workflow architecture, and they may aggregate
Web services.
E
J2SE clients
Generally, J2SE clients are best when you need to provide a
rich interface or when you must manipulate large sets of data. J2SE clients may
also work in a disconnected mode of operation.
E
J2ME clients
J2ME clients are best for applications that require remote and
immediate access to a Web service. J2ME clients may be restricted to a limited
set of interface components. Like J2SE clients, J2ME clients may also work in
a disconnected mode of operation.
Now that we have looked at some sample Web service scenarios, let's
examine in more detail the different types of clients that use Web services.
New Page 1