Sei sulla pagina 1di 6

Design and Implementation of Web Service Integration Tool

Fu-Chiung Cheng

Tai-Chang Hung

Young-Jang Chiou

Te-Chun Chang

cheng@cse.ttu.edu.tw tommy.hung@msa.hinet.net vegachiu@ms68.hinet.net cool.bird@msa.hinet.net

Department of Computer Science and Engineering


Tatung University
Taipei, 104 Taiwan, R.O.C.
Phone Number: 886-938-729862
Abstract
WWW (World Wide Web) has become the richest
resource pool of services and information. But most of
services (e.g. real-time stock quote information and
web mail service) are independent and distributed. If
we need a new web service that sends us an email
when some stock quote reaches a specific price, a web
service integration tool is needed to compose the web
stock quote information with the web mail service. This
paper proposes a convenient and powerful integration
tool to seamlessly integrate the existing web services
into new services. Our tool, called Web Service
Integration Tool (WSIT), provides the functionalities to
record and modulize existing web services, to design,
modify and compose recorded web services, and to
play and test the new-composed web services.
KeywordsWorld Wide Web , web service integration,
web service integration tool, XML, UML

1. Introduction
WWW (World Wide Web) has become the richest
resource pool of services and information in human
history. But these services and information are
independent and distributed. To compose new services
from these independent web services, web services
integration tool is required. The difficulties of the
service integration can be analyzed from two
perspectives, users and service providers.
For service providers, the service integration
requires a back-end system to integrate different
services provided by different providers. The potential
solutions include RPC (Remote Produce Call), RMI,
COBRA and Web Service technology [3]. The
providers will need to wrap the existing service into
API (Application Programming Interface) to allow
different providers to use these API's to achieve the
objective of the system integration. The drawbacks of
this approach are inflexibility (i.e. the service is fixed
and not changeable by users), high cost and time

Fax Number: 886-2-25925252-2288


consuming in program development and maintenance.
This approach is apparently not cost effective to the
providers and, most importantly, the integrated web
services are predefined and not customized by users.
From the user's perspective [1,2,5,6], trying to
integrate these independent and unrelated services is
not an easy task. To compose and integrate web
services across several web sites, users need to write a
program in C/C++/Java/ Perl and use HTTP / HTTPS
protocols to communicate with different servers.
However, today's web services are not implemented
based on HTML pages alone. It is not uncommon that
modern HTML pages contain texts, icons, multimedia
contents, cookies, sessions, JavaScripts, and
JavaApplets. It is formidable and impractical for a user
to write a program to deal with the above web contents.
This paper proposes the design and implementation
of a web service integration tool (WSIT) for web users
to easily and flexibly customize and compose existing
web services into a new web service according to their
needs. By using WSIT, the existing web services can
be regarded as composible and reusable APIs. The web
services can be recorded in UML activity diagrams [8]
and then modified and composed into new services.
And, the new services can be automatically tested and
played using our WSIT.
The rest of this paper is organized as follows:
Section 2 presents related works and analyzes their
pros and cons. In section 3 we propose the objectives
of designing web service integration. Sections 4 and 5
present the implementation methodology and the
architecture of WSIT, respectively. Section 6 compares
our solution with others' service integration systems.
Section 7 concludes this paper as a whole and provides
suggestions for future work.

2. Related Works
This section discusses related works from two
perspectives: programming required and visual tool.

2.1 Programming Required

Proceedings of the 2005 IEEE International Workshop on Service-Oriented System Engineering (SOSE05)
0-7695-2438-9/05 $20.00 2005

IEEE

WebL [11] is a kind of script-like language. Using


this language, users can retrieve specific web page
and extract the content that users wanted from these
pages. Furthermore, users can use this language to
compose the web services. But users also have to
write programs to achieve this objective.
Wrapper induction [9] proposes the wrapper
concept and some kind of robust algorithm in order to
handle web pages that have different HTML structure.
Service combination for web computing [12]
research provides a new concept which treats the
whole WWW as a kind of computing environment,
and proposes a new model and language to fit the
specific environment. Users can use this language to
write program and composes individual services.

2.2 Visual Tools


As the solutions mentioned above with the same
precondition, all of them need to write programs with
the capacity of handling cookies, session, and Internet
related issues.
ASByE tool and DEByE tool [5] provide GUI
interface to generate the rule of page retrieving. After
the page has been retrieved, users can use DEByE
tool to extract specific information of the web page.
But these tools do not provide the function of
composing individual services and information.
Internet Scrapbook [2] provides another visual tool
that allows a user to extract a portion of specific web
page and compose the portion of web page into a new
web page identified by the user. It allows information
resources to come from different web sites. But in the
current web site, there are much information hidden
(Perhaps, users must log into the web site to gain the
information or users must input some data first to
navigate web pages in order to gain access to the
information). Furthermore, the study doesnt provide
the implementation of service integration.
WebVCR [1] proposes a kind of visual VCR-style
interface, using this interface. Users can easily record
all their behaviors of the web navigation, including
the links or buttons they click, data that they input,
and so on. The tool can also reproduce the behaviors.
These records are called smart bookmark. But from
the users perspective, its difficult to use this tool to
integrate several services into a new service.
CHIP (Collaborating Host-Independent Pads)
[6,10] uses the IntelligentPad and the concept of
UNIX pipeline to implement visual method of service
integration. CHIP encapsulates single service in one
pad, and then uses the communications between pads
(Slot and I/O port [10] concept) to integrate new
services. This method allows users to integrate
services easier. But there are some issues that CHIP

cannot handle. For the new services composed by


CHIP, the reliability and exception handling
mechanism are still missing. For example, if the web
site changes its structure of the web page or page flow,
the encapsulation of IntelligentPad cannot handle
these changes to take care of these exceptions. This
may cause some terrible mistake since the user may
get wrong information or process wrong services
which the user will never know.

3. Objectives
In this paper, we define the web services as
HTML-based applications or services provided by
remote web servers and accessed via generic web
browsers such as Microsoft Internet Explorer, Mozilla
[13] and FireFox [13].

3.1. Simple Scenario


We illustrate a simple and useful example that the
integration of two web services is required. Suppose
you purchase some stock and you are very concerned
with the stock price and need to monitor stock quote to
decide when to sell the stock. So, you may need some
mechanism that, when the stock reaches at some
predetermined price, an email alter is immediately sent
to you so that you can decide whether to sell your stock.
This requires the integration of two web services: stock
quote information service and email service. Any
specific stock quote information can be freely and
easily accessed via Yahoo web site (e.g.
http://tw.stock.yahoo.com/ [19] in Taiwan) and web
mail can be accessed by Open Mail or MSN hot mail.
To monitor the stock quote in real time and send an
alter email, we need a tool to repeat checking the stock
price until the stock price is higher than the
predetermined price and then an email is automatically
sent to a predetermined email account. That is we need
a tool to record two existing web services as reusable
modules and to add some control logic to seamlessly
connect these two services.

3.2. Objectives
Based on the analysis of the above use case from
the user's perspective, we conclude some objectives in
our implementation:
1. Record and modulize the existing web services:
Users can easily modulize the existing services via
visual interface in order to be used in following
design and composition. For example, real-time
stock quote inquiry is an individual service module
and sending mail is another service module.

Proceedings of the 2005 IEEE International Workshop on Service-Oriented System Engineering (SOSE05)
0-7695-2438-9/05 $20.00 2005

IEEE

2. Redesign and compose recorded web services:


Users can easily compose the recorded service
modules and add/remove control logic to/from new
service modules.
3. Replay new services: Users can execute the new
services exactly as specified by the users.

4. Design and Implementation


Our methodology is called RDR standing for
Record-Design-Replay. That is, we first record the
WWW navigation behaviors via our behavior recorder
in a flowchart-like (i.e. UML activity diagram) format.
The flowchart-like diagrams can be composed with
control/data flow constructs in our behavior designer.
The new services in activity diagram can be executed
and replayed by our web service execution engine.

the action corresponding to the event, and input data if


any.

4.2. Composition of Web Services


The activity diagram [8] of Unified Modeling
Language (UML) can be used to specify the program
flows and behaviors. It is extended by adding web
action components to model the behaviors of web
services. The behavior designer consists two layers
shown in Fig 1: action layer and logic layer. The action
layer contains the recorded web services and the logic
layer provides control and data flow constructs such as
branches and operations.

4.1. Tracking and Recording Web Service


Behaviors
The web service behaviors can be classified into
four actions: URL [17] input, click (radio / select
option / button), date input and data extraction. These
"actions" are the activities of user's navigation in
WWW and need to be recorded for further design. Our
WSIT implement all the actions of user's behaviors.
z Open URL: Beginning a web service, users
usually inputs a URL to retrieve desired
information or service from the website.
z Click: After entering a URL and responding a
web page, users may then click a check box, a
radio box, a selection option, a button, a link or
an option menu by clicking the mouse button.
z Date Input: Users may be requested to input data
in text fields or in text area in order to extract
new information or to trigger a service.
z Data extraction: Users can extract data in current
web page and use the extracted data in next
service.
There are many ways to trace users web service
behaviors. For example, JavaScript event handler [1]
can be used to monitor user's actions. Such
implementation requires inserting event handlers into
all HTML nodes and thus is quite time-consuming.
Besides, if a page already containing some JavaScript,
inserting another JavaScript may quite possibly cause
errors.
A better way to trace the user's behaviors is to
monitor the DOM event [16]. We exploit Mozilla
GECKO [13] and JREX [7] to customize our own
browser to trace and record DOM Events that are the
actions exercised by users. A recorded action will
includes the node information sending out the event,

Fig 1. Action layer and logic layer of web service


composition

4.2.1. Action Layer


All recorded web actions can be imported into action
design layer and users may import as many as web
action records as they like. There are four types of web
actions correspond to the analysis of user's navigation
behaviors in section 4.1: OpenURL, Click, SetValue,
and DataExtraction. Among these, the SetValue and
DataExtraction components are the data integration
nodes. The information extracted by DataExtraction
actions can be set to another web services by SetValue
actions. Besides these information can be shared
between action design layer and logic design layer. The
detail description of integration is shown in section
4.2.3.

4.2.2. Logic Layer


The logic design layer provides control/data flow
constructs to "write programs" by "drag-and-droping"
the action components and the control/data flow

Proceedings of the 2005 IEEE International Workshop on Service-Oriented System Engineering (SOSE05)
0-7695-2438-9/05 $20.00 2005

IEEE

components. We define ten activity diagram


components shown in Fig 2:
1. Start node represents the start of an activity diagram
that means the start of service flow.
2. Conditional
branch
node
represents
the
decision-making in a flowchart.
3. Input node represents the input function. The input
data source can be a file or a result of a SQL query.
4. Operation node represents an expression statement.
5. End node represents the end of service flow.
6. Flow wire is used to denote sequential operations in
a web service.
7. Connection node is used to connect two flow wires
(or edges).
8. Fork node represents that processes can be executed
in parallel.
9. Join node represents a synchronization point to wait
for the completion of all parallel operations.
10. Action node represents a web action.

4.2.3. Data Exchange Between Layers


Data in either action or logic layers must be able to
exchange between layers. The concept of virtual
container is exploited in our design as shown in Fig 4.
For the data integration, there are two producers (i.e.
DataExtraction of action layer and input node of logic
layer) and three consumers (i.e. SetValue of action
layer and branch and operation nodes of logic layer).
The virtual container is a bridge of data integration for
two layers.

Fig 4. Virtual container mechanism for data exchange

Table 1 summarizes the data integration between


data producers and data consumers.
Table 1: Summary of Data Integration
Data flow
Function description
Fig 2. Components of activity diagram

Fig 3(a) shows a Java program segment to perform


GCD (Greatest Common Divisor) function and Fig 3(b)
shows the corresponding activity diagram.

1.DataExtraction
(Action) container
2.Input Node
container
3.Container
SetValue (Action)

4. Container
Branch

5. Container
Operation

DataExtraction node can extract data


from internet and push data into the
virtual container.
Users can declare a variable with a value
and then push the variable into the virtual
container for data exchange.
When our WSIT executes the SetValue
action in a new service, data stored in the
virtual container is used to fill in html
input field such as text fields or text area.
When our WSIT executes the branch
node in a new service, data stored in the
virtual container is used in the branch
operation to evaluate the condition.
When our WSIT executes the operation
node in a new service, data stored in the
virtual container is used in the
computation (i.e. ALU operations).

Note that before any consumer can use any data,


some data producer (DataExtraction or Input node)
must produce these data already; the data can be
produced at start of executing the web service or just
before it is used.
4.2.4. Example of Design Flow
Fig 3 (a). Java program (b). Activity diagram

To illustrate how the behavior design works, two


web services, real-time stock quote inquiry and web

Proceedings of the 2005 IEEE International Workshop on Service-Oriented System Engineering (SOSE05)
0-7695-2438-9/05 $20.00 2005

IEEE

mail system, are exploited in the data integration flow.


We first import the recorded web actions of real-time
stock quote inquiry as shown in Fig 5(a); then the web
mail service is imported as shown in Fig 5 (b). At this
point, these two individual services are treated as a part
of the new service. Some integration components (i.e.
the control/data nodes of logic layer) are used to
connect the two individual services into a single new
web service. These components provide programming
functionalities such as variable assignment,
input/output, decision-making and looping.
Suppose we want to create a new service that if the
stock price of IBM is higher than US$78, send an
email alter; otherwise query the IBM stock every 3
seconds. This can be done by adding a branch node to
test if IBM stock price is greater than 78, an operation
that wait for three seconds, an input node to input IBM
stock price to the email service, and a start/end node to
denote the start/end of the new service. Fig 5 shows the
new composed service flow.

Check price

(a) Stock quote inquiry

(b) Web mail

Fig 5. New composed service

4.3. Execution Engine of Web services


A new service is started from its start node and
stopped when an end node is carried out. When a node
has completed its task, the execution engine will
execute its outgoing node automatically. Any action
nodes are passed by our WSIT into browser engine for
execution and any logic nodes are carried out by our
WSIT.

5. WSIT Architecture
Our WSIT, as shown in Fig 6, consists of three
major subsystems: web behavior recorder, web service
designer, and web service execution engine.

Fig 6. WSIT Architecture

The main function of web behavior recorder is to


trace and record the user's web actions in browsers.
Our implementation is based on Mozilla GECKO
engine (the core engine of Mozilla browser and
FireFox browser), shown as (E) component in Fig 6,
and JRex (Java Browser Component), shown as (D)
component.
Any web actions exercised by users are passed to
Mozilla GECKO engine to communicate with web
server via HTTP/HTTPS protocol; and, all of user's
action events will be returned to the recorder through
JRex and finally the DOM events are recorded in a
XML file.
Web service designer provides interfaces to import
any recorded services, modify any actions or logic
operations in the web services, perform data exchange
and store the new composed and reusable service in a
XML file.
The main task of web service execution engine is to
carry out the composed web services including web
actions and logic nodes. The web actions are carried
out through JRex and Mozilla GECKO engine and the
execution result are returned to execution engine. The
logic (i.e. data/control) nodes such as value assignment,
evaluation of condition, the start of service flow and so
on are carried out in execution engine written in Java.

6. Comparisons of Web Services Tools


Unlike the WebL [11] and wrapper induction [9],
users do not require any programming skill to use our
WSIT. Compared to ASByE tool [5], DEByE tool [5],
and Internet Scrapbook [2], our implementation has
made easy for users to integrate and compose services.
For exception handling, our WSIT provides exception
handling mechanism while CHIP [6,10] does not.
Furthermore, in our WSIT, single node failure can be

Proceedings of the 2005 IEEE International Workshop on Service-Oriented System Engineering (SOSE05)
0-7695-2438-9/05 $20.00 2005

IEEE

handled by just adding the appropriate logic design to


handle exceptions. For example, if one node fails, users
can decide to execute another service flow or just stop
the execution. This insures the correctness of web
service execution. The comparison of web service tools
is summarized in Table 2.
Table 2 Summary of web service tool comparison
Criteria
CH SH CE SC FCD EH PNN
Solution
WebL
Wrapper
ASByE & DEByE
Internet Scrapbook
WebVCR
CHIP
WSIT

X
X

X
X
X
X

X
X
X
X

X
X
X

X
X
X
X
X
X

X
X
X

Comparison criteria:
z CH: Communication Handling.
z SH: Session Handling.
z CE: Content Extraction.
z SC: Service Composition.
z FCD: Format-changes Detection.
z EH: Exception Handling.
z PNN: Programming Not Need.

7. Conclusion and Future Works


In this paper, we propose a new approach to
integrate existing web services and implement a web
service integration tool, WSIT. WSIT allows users to
integrate and compose web services much easier and
flexible.
Our
implementation
includes
the
communications
with
web
servers,
session
maintenance, content data extraction, service
integration, detection of web page modification and
exception handling. No programming skill is required
to use WSIT. Users with basic logic design concept are
sufficient to exploit WSIT to compose web services.
There is no restriction of service integration, only the
user's imagination.
In the future, we plan to extend the application
domain of WSIT, not only for web application, but also
for desktop application. We also plan to implement the
server side solution such that users can design their
own services and upload them to the server and
execute the new services in the server automatically.

References:
[1] Anupam, V. Freire, J. Kumar, B. and Lieuwen D.
F. , Automating Web Navigation with the WebVCR, In
Proceedings
of
WWW9,
(Amsterdam,
Netherlands,2000), Computer Networks, Vol.33, No.
1-6, p.503517.

[2] Atsushi Sugiura ,Yoshiyuki Koseki , Internet


Scrapbook: Automating Web Browsing Tasks by
Demonstration , ACM 0-58113-034-1/98/11.
[3] David Chappel and Tyler Jewell, Java Web Services,
OReilly, March2002.
[4] Freire, J. Kumar, B. and Lieuwen D. , WebViews:
Accessing Personalized Web Content and Services, In
Proceedings of WWW2001, (Hong Kong, China, 2001),
pp.576586.
[5] Golgher P.B. Laender A.H.F. da Silva A.S. and
Ribeiro-Neto B. , An Example-Based Environment for
Wrapper Generation, In Proceedings of the 2nd
International Workshop on The World Wide Web and
Conceptual Modeling, (Salt Lake City, SA, 2000).
[6] Ito, K. CHIP (Collaborating Host-Independent
Pads) http://ca.meme.hokudai.ac.jp/people/itok/CHIP
[7] JRex - The Java Browser Component,
http://jrex.mozdev.org/.
[8] Kendall Scott Martin Fowler. UML Distilled: A
Brief Guide to the Standard Object Modeling
Language (2nd Edition). aw, August 1999.
[9] Kushmerick, N. Wrapper Induction: Efficiency
and Expressiveness. Artificial Intelligence, Vol.118,
No.1-2, pp. 15-68, 2000.
[10] Kimihito Ito & Yuzuru Tanaka , A Visual
Environment for Dynamic Web Application
Composition, Advances in HT03, August 2630, 2003,
Nottingham, United Kingdom.
[11] Kistler, T.and Marais H. , WebL - A
Programming Language for the Web, In Proceedings of
WWW7, (Brisbane, Australia, 1998), Computer
Networks, Vol.30, No. 1-7, pp.259-270.
[12] Luca Cardelli and Rowan Davies , Service
Combinators
for
Web
Computing,
IEEE
TRANSACTIONS ON SOFTWARE ENGINEERING,
VOL. 25, NO. 3, MAY/JUNE 1999.
[13] Mozilla , http://www.mozilla.org/.
[14] Paolo Atzeni and Giansalvatore Mecca and Paolo
Merialdo , To Weave the Web , Proceedings of the 23rd
VLDB Conference Athens, Greece, 1997.
[15] Phelps, T.A., and Wilensky, R. Robust
Intra-document Locations. In Proceedings of WWW9,
(Amsterdam,Netherlands, 2000), Computer Networks,
Vol.33, No.1-6, pp. 105-118.
[16] The World Wide Web Consortium. Document
Object Model (DOM) Level 2 HTML Specification,
2003. http://www.w3.org/DOM/.
[17] URL
(Uniform
Resource
Locator)
,
http://www.w3.org/Addressing/URL/Overview.html.
[18] Web Mail service of Tatung University,
http://ms2.ttu.edu.tw:8383/.
[19] Yahoo Stock , http://tw.stock.yahoo.com/.

Proceedings of the 2005 IEEE International Workshop on Service-Oriented System Engineering (SOSE05)
0-7695-2438-9/05 $20.00 2005

IEEE

Potrebbero piacerti anche