302 Patterns: Implementing Self-Service in an SOA Environment
Message structure
This scenario uses two simple text messages (request and a response) that are
exchanged between the Web service requester and the Web service provider.
These text messages contain customer details (the request) and the resulting
credit rating (the response). This could be extended to use a more structured
message approach in the form of XML messages.
Mediation
In this scenario, there are multiple delivery systems that can be called depending
on the delivery type selected by the client. Mediation can be used to route the
requests to one or more of the systems and if necessary, manage multiple
responses.
10.4 Development guidelines for Web services
The development process for building a Web service is very similar to the
development process of any other software. There are four main phases in
developing a Web service: build, deploy, run, and manage.
1. The
build phase includes development and testing of the Web service
application, including the definition and functionality of the service.
2. The
deploy phase includes publication of the service definition, the WSDL
document, and deployment of the runtime code of the Web service.
3. The
run phase includes finding and invoking the Web service.
4. The
manage phase includes the management and administration of the Web
service. This includes performance measurement and maintenance of the
Web service.
Figure 10-8 depicts the complete development process. Using different problem
domains, the terms used within this picture would change; however, the general
view would not.
Chapter 10. Web services scenario 303
Figure 10-8 Web services development
The remainder of this section describes the four development phases in more
detail.
Build phase
The build phase, which includes testing and debugging, is the first phase in the
development process of a new Web service. Because Web services can be
written from scratch and use already existing applications, there are two possible
paths to be followed:
򐂰 The solid path
From the initial state, we build or already have Java code. Using this Java
code, we build the service definition (WSDL document) with the business
methods that we want to expose. After we have generated the WSDL
document, we assemble the Web service application. This approach is called
bottom-up development. This is the approach used for developing our
CreditCheck application. We first implement the CreditCheck application as a
single application, and then expose these methods for use with a Web
service.
򐂰 The dashed path
From the initial state, we build or already have a service definition, a WSDL
document. Using this WSDL document, we build or adapt the Java code to
implement that service. After we have implemented the code, we assemble
the Web service application. This approach is called top-down development.
Deploy phase
The second phase of a Web service development process is deployment. In this
phase, we deploy the Web service to an application server. Deploying a Web
Build Deploy
1
1
Service
definition
WSDL
Initial
Java
code
Web
service
build
Web
service
deploy
Service
registry
Run
Client
deploy run
find
invoke
publish
build
build
or have
build or
have
assemble
assemble
Manage
Web
service
run
Web
service
manage
WebSphere
manage

Get Patterns: Implementing Self-Service in an SOA Environment now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.