Oracle TopLink Developer's Guide 10g Release 3 (10.1.3) B13593-01 |
|
![]() Previous |
![]() Next |
A Web services architecture is similar to the three-tier (see "Understanding the Three-Tier Architecture") or session bean (see "Understanding the EJB Session Bean Facade Architecture") architecture, however, in a Web services architecture, you encapsulate business logic (the service) in a Web service instead of (or in addition to) using session beans. In a Web services architecture, clients communicate with your application using SOAP messages (XML over HTTP).
As in any architecture, you can use TopLink to persist objects to relational or EIS data sources. However, in a Web services architecture, you can also use TopLink to map your object model to an XML schema for use with the Web service or as the Web service XML serializer.
An example of a Web services architecture implementation is the use of a Web service to expose parts of an existing application to a remote client (typically another application) by way of SOAP messages. In this application, you can use TopLink XML to unmarshall XML messages to Java objects to facilitate requests and marshall Java object responses back into XML for transmission to the client.
Using TopLink in Web services architecture has many advantages, including, but not limited to, the following:
you can map XML messages to an existing Java object model.
you can achieve a high level of complexity of mapping support
compliance with the JAXB standards
providing a scalable, high-performing solution
One debatable disadvantage is this solution's complexity over a simple RMI session bean service.
As with any technology, there are technical challenges associated with the use of TopLink in Web services architecture. These technical challenges are mostly related to special-case scenarios, such as when you need to implement a custom serializer because you have both the Java objects and the schema.
For more information, see the following:
Oracle TopLink as a Custom Serializer in a JAX-RPC 1.1 Web service at http://www.oracle.com/technology/products/ias/toplink/technical/tips/jaxRpc11/index.htm