communication with the proxy objects. The JSP developers working on implementing
the OddJobs functionality into the site need only know how to use and configure
these JSP tags. The JSP tags make the data bean objects available to the jsp page for
getting/setting properties and submitting data to the back-end.
3 OddJobs Webmodule Architecture
In this section, we describe the architecture of the different components that make up
the web module. The Java Beans data objects encapsulate the data that need to be
passed around by the SOAP services and SOAP clients. They avoid having to use
method calls that require dozens of arguments. For instance, all details concerning a
user (login, password, address, email, company or university, gender, …) can be
encapsulated into a single object. Even if the exact amount of fields contained in the
beans changes, the SOAP/Taglib implementation remains independent of the exact
contents of a data object, as mapping/serialization is handled in a generic way
through introspection.
All web services are handled by dedicated service managers. These managers can
be used transparently by the client, as if they were available locally. For instance, the
User Manager handles all requests that are related to the OddJobs users: user
login/logout; user registration; user profile updates, etc. The catalog manager handles
job catalog or job category related requests: retrieval of a job catalog; retrieval of the
questionnaire attached to a certain catalog; posting the answers to a questionnaire
back to the system, etc. In the future, additional managers can be added, without
worrying about the SOAP remoting code. By implementing a manager interface, new
managers can automatically be exposed to clients without having to write a new invo-
cation handler.
The Web service managers do nothing more than calling the corresponding
methods of the backend and encapsulating the sent and received data into Java Beans
data objects. All non primitive data needs to be type mapped however before it can be
serialized into an XML SOAP call. On the server side these mappings are defined as
deployment descriptors and can easily be modified and redeployed (this is only
required if the object types sent and returned by services change, not if the structure
of the beans change). On the client side however a mapping must also be defined
before the SOAP call can be invoked. Most web services deployment tools generate
hard-coded client stub and server skeleton classes containing the logic of type
mapping and serializing the transferrable data. This method has a serious
disadvantage: whenever the deployment parameters change or the structure of the
passed data needs to be modified, the client stub code needs to be regenerated. This of
course is not a valid option when dozens of clients connect to a back-end solution as
each of these clients would need to be updated.
To alleviate this problem, all SOAP requests/reponses pass through a central Call
handler. In stead of defining the serializers for every argument or returned object,
every time a soap call is made, the SOAP Handler dynamically introspects the Java
beans it receives and create the required type mappings at runtime. Furthermore, the
Handler is capable of proxying the serverside service manager objects as local objects
106