<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Composite Web Services</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Kung-Kiu Lau</string-name>
          <email>kung-kiu@cs.man.ac.uk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Cuong Tran</string-name>
          <email>ctran@cs.man.ac.uk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>School of Computer Science, The University of Manchester</institution>
          <addr-line>Manchester M13 9PL</addr-line>
          ,
          <country country="UK">United Kingdom</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Currently, composition of web services is done by orchestration. An orchestration is a workflow that combines invocations of individual operations of the web services involved. It is therefore a composition of individual operations, rather than a composition of entire web services. In this paper we propose a different approach to web service composition, whereby entire services are composed into composite services. The latter are again entire web services, that is, they can be further composed using our composition, or they can be used in an orchestration. We show how these composite services can be constructed hierarchically and used in practice.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>
        In a service-oriented architecture [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ], individual services are combined into a single
workflow that reflects the business process in question. Although services can be
defined in a general way, in practice the most widely used services are web services [
        <xref ref-type="bibr" rid="ref13 ref2">13,
2</xref>
        ].
      </p>
      <p>
        Currently, composition of web services is carried out by orchestration [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. An
orchestration is a workflow that combines invocations of individual operations of the web
services involved. It is therefore a composition of individual operations, rather than a
composition of entire web services.
      </p>
      <p>In this paper, we propose a different approach to web service composition, whereby
entire services are composed into composite services. The latter are again entire web
services, that is they can be further composed using our composition, or they can be
used in an orchestration.</p>
      <p>
        The key difference between our approach and web service orchestration lies in the
nature of a composite web service created by our approach. A composite service has
all its operations available for composition or orchestration. By contrast, in an
orchestration, only the chosen individual operations of the member services are available for
invocation. A composite service is a service, whereas an orchestration is a workflow. By
the same token, a composite service is also different from a choreography [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] (which
is defined on a chosen set of individual operations).
      </p>
      <p>Another important feature of our approach is that composition is hierarchical. This
means that a composite service can be constructed step by step from sub-services in a
systematic manner.</p>
      <p>
        Our approach is based on our component model [
        <xref ref-type="bibr" rid="ref10 ref11">11, 10</xref>
        ]. In our model, components
are built from computation units. These units provide operations but do not invoke other
units, and so behave like web services. Our components are composed in a
hierarchical manner by using special connectors, which we call exogenous connectors [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. It
is these connectors that make the difference between our model and other component
models, and the difference between our approach to web service composition and
current practice in web service composition.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Motivation</title>
      <p>
        Currently, web service composition is done by orchestration [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. A web service
orchestration is a coordination of web service invocations, and can be represented by a
workflow. It can therefore be defined as a function ORC with the following type:
      </p>
      <p>ORC : op × op · · · × op → wf (1)
where op is the type of operations in web services, and wf is the type of workflows for
invoking a set of such operations.</p>
      <p>
        An orchestration is defined using workflow languages such as BPEL [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], BPML [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]
and XLANG [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ]. A workflow in these languages can be converted into a web service
by giving it a WSDL [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] interface. The resulting web service can then be orchestrated
with other web services.
      </p>
      <p>To motivate composite web services, in this section we use a simple example to
show how composition is different from orchestration.</p>
      <p>Consider a bank system with just one ATM that serves two bank consortia BC1
and BC2, each with two bank branches, B1 and B2, B3 and B4 respectively. The
ATM reads the customer’s card, performs a security check, identifies the customer’s
bank consortium and passes customer requests together with customer details to the
customer’s bank consortium. The customer’s bank consortium checks customer details
and identifies the customer’s bank branch, and then passes on the customer requests
and customer details to the customer’s bank branch. The bank branch checks customer
details and provides the usual services of withdrawal, deposit, balance check, etc.</p>
      <p>Suppose all the elements of the bank system are available as web services, each
providing appropriate operations. Then we can build a web service for the bank system by
orchestrating all these web services, and converting the resulting workflow into a web
service. For any particular orchestration, operations to be invoked in the web services
have to be chosen, and one specific corresponding workflow is defined. Figure 1 shows
one possible orchestration. [d]</p>
      <p>ATM.pc
[c1]
[c2]</p>
      <p>BC1.gb
BC2.gb
[c1]
[c2]
[c1]
[c2]</p>
      <p>In this workflow, the operation pc (processCard) of the ATM is invoked to identify
the customer’s bank consortium. The operation gb (getBank) of bank consortium BC1
or BC2 is invoked to get the customer’s bank branch. The operations dp (deposit) or wd
(withdraw) are invoked in the bank branches (B1, B2, B3 or B4). This workflow can be
converted into a bank web service that provides the deposit and withdrawal operations.</p>
      <p>Orchestration is not compositional with respect to the operations invoked. That is,
given an orchestration, it is not possible to add to its set of invoked operations and hence
its workflow. For example in Figure 1 it is not possible to add an invocation of security
check to ATM, or a balance check operation to the bank branches. Any such change
would require an entirely new orchestration.</p>
      <p>
        This is true even if the orchestration is defined in a hierarchical workflow language
like YAWL [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ]. Figure 2 shows how the bank system workflow in Figure 1 can be
defined in YAWL.
      </p>
      <p>BC1.gb
ATM.pc
BC2.gb
[c1]
[c2]
[c1]
[c2]
[c1]
[c2]
[d]</p>
      <p>To add security checks to ATM, it would be necessary to change the top-level
workflow. To add balance check to bank branches, it would be necessary to change the
subworkflows for BC1 and BC2.</p>
      <p>Of course in an orchestration, it is possible to include all the operations of all the
web services involved. However, such a workflow can potentially be very large,
complex and cumbersome. Furthermore, it will contain many redundancies and repetitions
because many sub-workflows are duplicated, as can be seen in Figures 1 and 2.</p>
      <p>By contrast, we define a composite web service as a web service that is composed
from sub-services. A composite web service is not just one orchestration, but is a web
service that provides all the operations of all the sub-services, i.e. it contains all possible
orchestrations of these operations. For the bank system, the composite service would
have the workflow shown in Figure 3, where # denotes a parameter. This workflow is
parameterised over all the operations of every web service involved.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Web Service Composition</title>
      <p>So we want to define web service composition differently from web service
orchestration. In particular, we want to define it hierarchically, that is, we want to be able to
ATM.#
[c2]
[c1]
B2.#
B3.#</p>
      <p>B4.#
compose services into composite services, which in turn can be composed into even
bigger composite services. This is illustrated by Figure 4</p>
      <p>W7
+
W5</p>
      <p>W6
W1 + W2</p>
      <p>W3 + W4</p>
      <p>where web services W1 and W2 are composed into a composite service W5, and
web services W3 and W4 are composed into a composite service W6. W5 and W6 are
in turn composed into W7.</p>
      <p>A composition can be defined as a function COMP with the following type:</p>
      <p>COMP : ws × ws × · · · × ws → ws (2)
where ws is the type of web services.</p>
      <p>The difference between orchestration and composition can be seen clearly by
comparing (1) and (2): an orchestration takes named operations (in the web services
involved) as arguments and returns a workflow (for the invocations of these operations);
whereas a composition takes web services and returns a (composite) web service.</p>
      <p>
        Our definition of web service composition is based on a component model that we
have defined [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], in particular composition in the design phase [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. This model defines
what components are, as well as composition operators for them, for different phases,
namely design and deployment phases. We will show that our model can serve as a
component model for web services and their composition.
3.1
      </p>
      <sec id="sec-3-1">
        <title>A Component Model for Web Services</title>
        <p>
          In our model [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ], components have the distinguishing features of encapsulation and
compositionality. Components are constructed from two kinds of basic entities: (i)
computation units, and (ii) connectors (Figure 5). A computation unit CU encapsulates
computation. It provides a set of methods (or operations). Encapsulation means that
CU’s methods do not call methods in other computation units; rather, when invoked, all
their computation occurs in CU. Thus CU could be thought of as a web service.
        </p>
        <p>There are two kinds of connectors: (i) invocation, and (ii) composition (Figure 5).
An invocation connector is connected to a computation unit CU so as to provide access
to the methods of CU.</p>
        <p>
          A composition connector encapsulates control. It is used to define and coordinate
the control for a set of components (atomic or composite). Composition connectors can
be defined for the usual control structures for sequencing and branching. A sequencer
connector that composes components C1, . . . , Cn can call methods in C1, . . . , Cn in
that order. A pipe connector is similar to a sequencer, but additionally passes the results
of calls to methods in Ci to those in Ci+1. A selector connector that composes
components C1, . . . , Cn can select one component out of C1, . . . , Cn and call methods in
that component only. The control structure for looping is defined as iterators on
individual composition connectors (and invocation connectors, see below). Our composition
connectors are thus a Turing complete set [
          <xref ref-type="bibr" rid="ref12 ref5">12, 5</xref>
          ], for defining control flow.
        </p>
        <p>
          Clearly composition connectors can define (and encapsulate) workflow for a set of
connected components. They can define workflow control-flow for sequencing,
branching and looping, as described in e.g. [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ].
        </p>
        <p>Components are defined in terms of computation units and connectors. There are
two kinds of components: (i) atomic, and (ii) composite (Figure 5). An atomic
compoInvocation
connector
Computation
unit
ic
cu</p>
        <p>Composition
connector</p>
        <p>cc
ic1
cu1
ic2
cu2</p>
        <p>C
o
m
p
o
s
iit
o
n
a
lit
y
Encapsulation
(computation)
(a) Atomic component</p>
        <p>Encapsulation
(computation and control)</p>
        <p>(b) Composite component
nent consists of a computation unit with an invocation connector that provides an
interface to the component. An atomic component encapsulates computation (Figure 5(a)).
A composite component consists of a set of components (atomic or composite)
composed by a composition connector. The composition connector provides an interface
to the composite. A composite component encapsulates computation and control
(Figure 5(b)).</p>
        <p>An atomic component can thus be a web service, its invocation connector being the
WSDL interface. A composite component can be a (composite) web service that
contains sub-services as well as workflow between the sub-services. Its top-level
composition connector is its interface. However, this interface cannot be described in standard
WSDL since the web service now contains workflow (in the composition connector).</p>
        <p>Our components are also compositional, i.e. the composition of two components
C1 and C2 yields another component C3. In particular, C3 also has the defining
characteristics of encapsulation and compositionality. Thus compositionality implies that
composition preserves encapsulation (Figure 5(b)).</p>
        <p>Encapsulation and compositionality lead to self-similarity of composite
components, as can be clearly seen in Figure 5(b). Self-similarity provides the basis for a
hierarchical way of composing systems from components.</p>
        <p>
          Encapsulation and compositionality result form the nature of our connectors. They
are in fact exogenous connectors [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ], and encapsulate control outside of computation
units in a system. Exogenous composition connectors are defined in a hierarchical way.
For example, a sequencer connector, or a pipe connector, that composes two atomic
components A1 and A2 is clearly defined in terms of the invocation connectors in A1
and A2. In general, exogenous composition connectors form a hierarchy built on top of
invocation connectors for atomic components. Connectors at level n for any n &gt; 1 can
be defined in terms of connectors at levels 1 to (n − 1). Indeed, exogenous connectors
have a hierarchical type system [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ].
        </p>
        <p>The hierarchical nature of exogenous connectors entails a strictly hierarchical way
of constructing systems by composing components. In such a system, atomic
components form a flat layer, and the entire control structure (of composition connectors) sits
on top of this. The precise choice of connectors, the number of levels of connectors,
and the connection structure, depend on the relationship between the behaviour of the
individual components and the behaviour that the whole system is supposed to achieve.
Whatever the control structure, however, it is strictly hierarchical, which means that
there is always only one connector at the top level. This is the connector that initiates
control flow in the whole system.</p>
        <p>As an example, the bank system can be constructed using our component model
as shown in Figure 6. P 1, P 2 and P 3 are pipe composition connectors; S1, S2 and
I1
ATM</p>
        <p>I2
BC1</p>
        <p>P3
P1</p>
        <p>I3
B1</p>
        <p>S1</p>
        <p>S3
I4
B2</p>
        <p>I5
BC2</p>
        <p>P2</p>
        <p>I6
B3</p>
        <p>S2</p>
        <p>I7</p>
        <p>B4</p>
        <p>S3 are selector composition connectors; and I1 . . . I7 are invocation connectors. The
top-level connector P 1 is the interface to the system, and is where control flow starts.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Composite Web Services</title>
      <p>Using our model as a component model for web services, we can use standard web
services as atomic components, composite web services as composite components, and
use the composition connectors1 as composition operators for web services. This is
W3</p>
      <p>Comp
W1</p>
      <p>W2</p>
      <p>Composition operator</p>
      <p>Web service
illustrated in Fig 7, where two services W1 and W2 are composed by a composition
operator Comp into a composite service W3.</p>
      <p>W3 is a web service, just like W1 and W2. However, whereas W1 and W2 have
interfaces described in standard WSDL, W3 has an interface that cannot be described in</p>
      <sec id="sec-4-1">
        <title>1 In the design phase.</title>
        <p>standard WSDL, because W3 contains workflow embodied in the composition operator
Comp. Therefore, in order to define W3 as a web service, we need to extend standard
WSDL in order to incorporate workflow description. Then we need to devise a method
to generate its interface in the extended WSDL from the standard WSDL interfaces of
W1 and W2.</p>
        <p>The bank system in Figure 6 can be built as a composite web service composed
from standard web services for ATM, BC1, BC2, B1, B2, B3 and B4 (Figure 8). The
S3</p>
        <p>C4</p>
        <p>P2
C3
B3</p>
        <p>S2</p>
        <p>B4
C6</p>
        <p>C5</p>
        <p>C2
ATM</p>
        <p>BC1</p>
        <p>B2</p>
        <p>BC2
P3
C1
B1</p>
        <p>P1</p>
        <p>S1
structure of this composite is of course identical to that of the bank system in Figure 6.</p>
        <p>The composition is hierarchical (composite services are denoted by dotted boxes):
B1 and B2 are composed into the composite service C1 by using the selection connector
S1; the composite C1 is in turn composed with BC1 using the pipe connector P1,
creating the composite C2; similarly B3 and B4 are composed into C3 by using the selection
connector S2; the composite C3 is then composed with BC1 using the pipe connector
P2, creating the composite C4; the composite C2 is in turn composed with C4 by using
the selector connector S3 to create the composite C5; the composite C5 is composed
with ATM by using another pipe connector P3, creating the composite C6.</p>
        <p>The composite service C6 provides all the operations offered by its sub-services.
4.1</p>
        <sec id="sec-4-1-1">
          <title>Defining Composite Web Services</title>
          <p>In order to define composite web services, we need to extend standard WSDL to
incorporate the workflow added by connectors in composition. To this end, we define a new
extensible element for WSDL documents, called workflow. It contains child elements
which describe the details of the workflow structure. The extended WSDL document
for a composite service consists of standard elements such as types, messages,
portType, binding and services, together with the additional workflow element, as shown in
Figure 9.</p>
          <p>Under the workflow tag, there are extensible tags describing workflow structures.
We define such a tag for each of our composition connectors. The behaviour of the
connectors is defined by their implementation on the web server concerned.</p>
          <p>The tag for each connector in turn contains child tags specifying the services (and
operations) involved. If a connector provides sequential invocation, e.g. sequencer and
pipe, then the child tags describe the sequence of services involved. If a connector
&lt;definitions&gt; Root element of WSDL document
&lt;types&gt; Data types
&lt;message&gt; Message structures
&lt;portType&gt; Provided operations and messages
&lt;workflow&gt; Workflow structure description and available operations
&lt;binding&gt; Message exchange protocol
&lt;service&gt; Service name and address
provides a branching structure, e.g. selector, then the child tags specify the branching
condition and the corresponding services.</p>
          <p>The schema for workflow consisting of pipe and selector connectors is depicted
in Figure 10. This workflow element has either a pipe or choice child element. Each
contains a number of services (and operations). Furthermore, workflow structures (pipe
and choice) may in turn contain one another.</p>
          <p>The pipe tag is used to represent the pipe workflow structure provided by the pipe
connector. The pipe connects a sequence of services specified by set tags, or other
workflow structures (pipe or choice). The pipe invokes every service, or passes requests to
structures, in the sequence. An invocation result is used as input to the next invocation.</p>
          <p>The choice tag represents the branching workflow structure embodied by the
selector connector. It contains a number of cases specified by the case tag. A case is a
combination of a matching condition and an operation set (i.e. service) or another
workflow structure. Different cases have different matching conditions. The choice workflow
invokes a service or a structure if the corresponding matching condition is satisfied.</p>
          <p>As an example, the workflow description for the composite bank service in Figure 8
can be described by the following outline:
&lt;workflow&gt;
&lt;pipe&gt; &lt;set name="ATM"&gt;
&lt;operation name="procCard"&gt;...&lt;/operation&gt;
&lt;/set&gt;
&lt;choice&gt;
&lt;case condition="1"&gt;
&lt;pipe&gt;
&lt;set name="BC1"&gt;
&lt;operation name="getBank"&gt;...&lt;/operation&gt;
&lt;/set&gt;
&lt;choice&gt;
&lt;case condition="1"&gt;&lt;set name="B1"&gt;
&lt;operation name="withdraw"&gt;...&lt;/operation&gt;
&lt;operation name="deposit"&gt;...&lt;/operation&gt;
...&lt;/set&gt; &lt;/case&gt;
&lt;case condition="2"&gt;
&lt;set name="B2"&gt;
&lt;operation name="withdraw"&gt;...&lt;/operation&gt;
&lt;operation name="deposit"&gt;...&lt;/operation&gt;
...&lt;/set&gt;&lt;/case&gt;&lt;/choice&gt;&lt;/pipe&gt;&lt;/case&gt;
&lt;case condition="2"&gt;
&lt;pipe&gt;
&lt;set name="BC2"&gt;
&lt;operation name="getBank"&gt;...&lt;/operation&gt;
&lt;/set&gt;
...</p>
          <p>The intended meaning of this workflow is that it first invokes any operation of ATM,
and pipes the result to the branching structure; if the result is 1, then any one of BC1’s
operations can be invoked or if the result is 2 then any one of BC2’s operations can be
invoked; the result of BC1’s operation is used to compare with the branching condition;
if the value is 1, then any one of B1’s operations can be invoked, or if the value is 2, then
any one of B2’s operations can be invoked. Similarly the result of BC2’s operations is
used in comparison with branching condition; if the condition is 1 then any one of B3’s
operations or B4’s operations will be invoked. After that, the workflow ends and the
result of the last invocation is returned.</p>
        </sec>
        <sec id="sec-4-1-2">
          <title>4.2 Implementing Composite Services</title>
          <p>Given the extended WSDL document for a composite service, we need to implement
the service on a web server. This implementation consists of the implementation of
the intended behaviour of the workflow defined in the extended WSDL document, as
well as the implementation of the interface of the composite service, also defined in the
extended WSDL document.</p>
          <p>For every composition connector, we need to implement its workflow defining its
intended behaviour. To this end, we implement our connectors as Java classes which are
stored as templates. Every time we use connectors to create composite services, these
templates are used to generate real Java classes.</p>
          <p>In general, for a composite service, the Java class for the top-level connector always
has one operation invoke, that is the operation provided by the composite service to the
outside world. Clients use a composite service via its invoke operation.</p>
          <p>Depending on the behaviour of each connector, the invoke operation may have
different signatures. Basically, the signature of invoke comprises three main elements, viz.
condition, operation names and operation parameters. The condition is used in a
branching workflow structure for selecting sub-services. Operation names indicate which
operations of the selected sub-services are invoked. Operation parameters are parameters
passed to the invoked operations. Also, the signature of invoke includes the results
returned by the composite.</p>
          <p>The signature of invoke is reflected in the definitions of types, messages and
portType of the extended WSDL document for a composite service. We implement message
exchange style as RPC, and transport as SOAP over HTTP, in the popular manner. This
information is contained inside the binding section of the extended WSDL document.
The composite service address is specified at design time and contained in the service
section.</p>
          <p>
            The Java classes for connectors after generation are compiled and deployed to a
web service engine, which is Axis [
            <xref ref-type="bibr" rid="ref1">1</xref>
            ] in our implementation. We now show our
implementation for the pipe and selector connectors. For simplicity, our implementation
only deals with parameters of primitive data types, e.g. string, integer, float, etc. We use
String as intermediate type because other primitive types can be converted to String and
vice versa.
          </p>
          <p>The Pipe class template has one method:
invoke(String[] methods, String[] params);</p>
          <p>The pipe connector receives a list of operations and a list of parameters for these
operations. The invoke method is used to sequentially call every operation in the list.
Each operation is provided by a sub-service.</p>
          <p>If a sub-service is standard service, the connector identifies the number of
parameters for every operation so that the parameters can be taken out of the parameter list
and passed to the operations invoked. The connector also does type conversion for
parameters if the invoked operations use primitive types different from String. If it is at
the beginning or the middle of the operation list, the result of an invoked operation will
be inserted into the first position of the parameter list for subsequent operation
invocations. Otherwise, the result is returned as the output of the composite. The completed
operation and used parameters are thus removed from the operation and parameter lists.</p>
          <p>If a sub-service is a composite service, the connector just passes the whole operation
list at that point to the invoke operation of the sub-service. However, if the (composite)
sub-service has a branching structure, then the connector extracts the first element of
the parameter list before passing a call to the sub-service operation.</p>
          <p>The definitions of types, messages and portType of the extended WSDL document
for composite services having a pipe as the top-level connector look like the following:
&lt;wsdl:types&gt;
&lt;schema targetNamespace="urn:cbsd" .../&gt;
&lt;complexType name="ArrayOfString"&gt;
&lt;sequence&gt;&lt;element name="item" type="xsd:string"/&gt;
&lt;/sequence&gt;&lt;/complexType&gt;&lt;/schema&gt;...&lt;/wsdl:types&gt;
&lt;wsdl:message name="invokeRequest"&gt;
&lt;wsdl:part name="operations" type="ArrayOfString"/&gt;
&lt;wsdl:part name="params" type="ArrayOfString"/&gt;
&lt;/wsdl:message&gt;
&lt;wsdl:message name="invokeResponse"&gt;
&lt;wsdl:part name="result" type="xsd:string"/&gt;
&lt;/wsdl:message&gt;
&lt;wsdl:portType name="..."&gt;
&lt;wsdl:operation name="invoke"</p>
          <p>parameterOrder="operations params"&gt;
&lt;wsdl:input message="invokeRequest".. /&gt;
&lt;wsdl:output message="invokeResponse".../&gt;
&lt;/wsdl:operation&gt;&lt;/wsdl:portType&gt;</p>
          <p>ArrayOfString is not a primitive data type, so we need to define it in the extended
WSDL document. The invoke operation has the input message invokeRequest consisting
of two arrays of string containing the operation and parameter lists. The output message
invokeResponse contains the result of the invoke operation.</p>
        </sec>
      </sec>
      <sec id="sec-4-2">
        <title>The Selector class template also has just one method:</title>
        <p>invoke(String condition, String[] operations, String[] params);</p>
        <p>Like the pipe connector, the selector connector receives a list of operations
(provided by the sub-services) and a list of parameters for these operations. In addition,
it also receives a condition for selecting one of the sub-services. The invoke method
is used to call one operation in the selected sub-service, i.e. one which matches the
condition passed to the method.</p>
        <p>If the selected sub-service is a standard service, when the selector selects whichever
operation, it will identify the number of parameters and their types for the selected
operation, extract parameters from the parameter list, convert to appropriate types if
needed, and pass the extracted parameters to the selected operation. The result of the
selected operation is the output of the composite.</p>
        <p>If the selected sub-service is a composite service, the connector will extract the first
parameter from the parameter list, and put it together with the operation and parameter
lists into a call to the invoke operation of the selected sub-service.</p>
        <p>The definitions of types and output message of the extended WSDL document for
composite services having selector as the top-level connector are similar to those for
pipe connector. However, the invoke operation of selector has a different signature (with
the addition of condition), which affects input message and portType definitions. These
definitions are as follows:
...
&lt;wsdl:message name="invokeRequest"&gt;
&lt;wsdl:part name="condition" type="xsd:string"/&gt;
&lt;wsdl:part name="operations"</p>
        <p>type="impl:ArrayOfString"/&gt;
&lt;wsdl:part name="params"</p>
        <p>type="impl:ArrayOfString"/&gt;&lt;/wsdl:message&gt;
...
&lt;wsdl:portType name="..."&gt;
&lt;wsdl:operation name="invoke"</p>
        <p>parameterOrder="condition operations params"&gt;
&lt;wsdl:input message="impl:invokeRequest".../&gt;
&lt;wsdl:output message="impl:invokeResponse".../&gt;
&lt;/wsdl:operation&gt;
&lt;/wsdl:portType&gt;
&lt;wsdl:binding name="..." type="..."&gt;
&lt;wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/&gt;
&lt;wsdl:operation name="invoke"&gt;
&lt;wsdlsoap:operation soapAction=""/&gt;
&lt;wsdl:input name="invokeRequest"&gt;
&lt;wsdlsoap:body
encodingStyle="..." namespace="urn:cbsd"
use="encoded"/&gt;&lt;/wsdl:input&gt;
&lt;wsdl:output name="invokeResponse"&gt;</p>
        <p>The binding and service sections for composite services are shown below:
...
&lt;wsdl:service name="..."&gt;
&lt;wsdl:port binding="..." name="..."&gt;
&lt;wsdlsoap:address</p>
        <p>location="http://server/composite_service"/&gt;
&lt;/wsdl:port&gt;&lt;/wsdl:service&gt;</p>
        <p>As mentioned before, the message exchange style is RPC, and the transport is SOAP
over HTTP.
To support our approach to service composition, we have implemented a tool. The tool
can be used by a service designer to construct a composite web service, and also by a
client to invoke a composite web service.</p>
        <p>The process of creating composite services with our tool is illustrated in Figure 11.
We start with WSDL documents of standard web services, or extended WSDL (WSDL’
in Figure 11) documents for composite services as inputs. The tool generates Java
classes and the associated extended WSDL document for the resulting composite
service. The Java code of the composite service is compiled and the binary is deployed on
to the web service engine. This construction process can be applied hierarchically, by
building (composite) services and composing them successively.</p>
        <p>Figure 12 shows a screen shot of our tool being used to create a composite service.
Through the user interface, the tool allows the service designer to choose WSDL or
extended WSDL files as its input. The designer can also choose a desired connector,
give a name to the composite service, assign composite service address, and specify the
directory for the generated code.</p>
        <p>The example in Figure 12 shows the creation of the composite web service C1 by
composing two standard web services B1 and B2 using a selector connector. The
composite service address is http://server/services/C1. The composite service
Java code is generated and compiled. The composite service in binary is deployed to
the server at the directory c:\tomcat-axis\webapps\...\classes\.</p>
        <p>Figure 13 shows a screenshot of our tool being used by a client to invoke a
composite service. Our tool allows clients to input a composite service description file (WSDL’
file). The tool then draws a diagram of the workflow structure embodied in the
composite service. The client clicks at each activity in the diagram and chooses one operation
to be invoked. Based on the chosen operations, our tool generates the syntax for client
calls to the composite service.</p>
        <p>The example in Figure 13 shows a client using our composite bank service. The
client can see the workflow embodied in the service, chooses the operation withdraw
of the bank branch, and clicks the Generate button. The tool then shows the syntax to
invoke the composite bank service, and the code for this invocation is also generated in
a directory.
5</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Discussion</title>
      <p>The key difference between composition and orchestration lies in the nature of a
composite web service created by our approach. A composite service has all its operations
available for composition or orchestration. By contrast, in an orchestration, only the
chosen individual operations of the member services are available for invocation.
Because it contains a workflow structure, a composite service can specify many different
business logics involving the operations of its sub-services. In other words, a composite
service contains many workflows, whereas an orchestration defines just one.</p>
      <p>Our approach is distinctive compared with other current approaches. Our composite
service now is truly a composite which captures entire element services and
composite exists at every composition. Composite service is constructed by using our special
connector as composition operators. Moreover, composite has separation between
invocation control structure (given by connector). and services. This leads to our approach
brings up some strong benefits.</p>
      <p>Because composition is fundamentally different from orchestration, our approach is
novel. For practical purposes, we believe our approach also has some advantages over
current approaches to web service orchestration.</p>
      <p>First, our approach eases the creation of composite services. Developers need only
focus on building up a structure of available services. Composition does not involve
fixed operations. By allowing parameterisation of operations to be invoked, it enables
clients to choose the operations based on their business logic. Thus, a composite service,
once built, can be used in many different applications. In our example, the composite
bank service C6 can allow multiple applications.</p>
      <p>The second benefit of our approach is the reduction in effort of creating and
maintaining web service orchestrations that belong to the same composite. Instead of
incurring cost for creating and keeping separate multiple workflows working, developers of
applications can just use an appropriate composite service which is already constructed
to fulfil their needs. For example, in our bank composite, only the parametric
workflow needs to be maintained, instead of the individual workflows that it contains. Thus
our approach minimises the maintenance problem as maintenance only happens on the
composite service, and the client need not change the code of his application for each
business logic embodied in the composite service.</p>
      <p>The third benefit is the hierarchical manner of building composite services. After
every composition at every level of the whole system, there exist composite services.
These individual composite services can be used separately by other applications. For
instance, in the bank example, two composites C2 and C4 could be used in an
application involving multiple bank consortia. In this case, C6 would allow customers
belonging to multiple consortia to use its sub-services. Another benefit is easing service
composition maintenance. Thanks to the hierarchical nature of our composition approach,
if one sub-service has changed its location, only one composite service containing this
sub-service is affected. The composite can be updated locally by its developer and the
change can happen without requiring updates to other related services. For instance, in
the bank example, if B1 changes, then only C1 is affected.</p>
      <p>
        Finally, as mentioned before, our composite service is still a web service. Thus it can
be used in orchestration. As shown in the previous section, our tool allows a composite
service to be invoked, yielding a workflow. However, our tool is not yet integrated
with standard orchestration tools. For such an integration we need to extend existing
workflow designer tools such as Eclipse-BPEL. Such a tool would combine a standard
WSDL processor with a processor for extended WSDL as defined in Section 4.1. Our
tool can provide the processor for extended WSDL, and we are currently working on
its integration with Eclipse-BPEL.
Although orchestration and choreography are related to our work, we have already
pointed out that our approach is fundamentally different. In orchestration, an
orchestration language, such as BPEL [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], is used for defining executable workflows in
XMLbased format, consisting of series of activities. Every activity requires a particular
service operation as input. The workflow can be deployed onto a workflow enactment
system, such as the BPEL engine, which manages the workflow execution. However,
existing orchestration languages like BPEL and YAWL [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] cannot describe parametric
workflows as embodied in our composite web services.
      </p>
      <p>
        Choreography focuses on describing interactions between services by specifying
operations in structures such as sequence, choice, etc., using a language like
WSCDL [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. The approach still explicitly requires specific operations to be named in the
choreography document. Furthermore, choreography of services does not result in a
service which can be executed.
      </p>
      <p>
        Aspect-oriented Web Service (AOWS) [
        <xref ref-type="bibr" rid="ref16 ref7">7, 16</xref>
        ] is web service based on AOCE
(Aspect-Oriented Component Engineering). A service is enriched with an aspectual
description which supports automated service discovery. This approach uses an
AOConnector object which serves as a gateway to a client. The connector receives client
requests and relays them to an appropriate AOWS. Their connector is unlike our
composition connector because it does not define a workflow structure, and using their
connector on an AOWS does not produce a service.
      </p>
      <p>
        Web Transact [
        <xref ref-type="bibr" rid="ref15 ref6">6, 15</xref>
        ] is a framework for providing transactional features to service
composition. It suggests to compose web services in hierarchical architectures.
Standard web services providing similar functional capabilities are bundled using the
mediator pattern to create mediator services. Mediator services are later composed to create
composite services by using WSTL (Web Service Transaction Language) to specify the
execution sequence of specific mediator service operations. Thus, a composite service
in this approach still involves invocation of specific operations. Also, a composite does
not exist at every level of composition, unlike our approach. Therefore we believe their
approach is not hierarchical.
7
      </p>
    </sec>
    <sec id="sec-6">
      <title>Conclusion</title>
      <p>We have presented a new approach for web service composition using exogenous
connectors as composition operators on web services. The composite service captures all
the operations provided by the sub-services, and it allows the operations to be invoked in
a defined workflow structure. A composite service thus represents a rich service, giving
clients a choice of many operations. Our approach appears to have benefits compared
with current approaches, especially orchestration.</p>
      <p>In future, we plan to work on outstanding issues such as complex data structure
manipulation in service communication, and error propagation among composite services.</p>
      <p>
        In addition, it will be interesting to test the practicality of our approach, with regard
to SOAs for larger real-world applications. To this end, we will need to investigate how
to publish composite services in a suitable registry, along the lines of UDDI [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ].
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1. Axis - web
          <article-title>services framework web site</article-title>
          . http://ws.apache.org/axis/.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>G.</given-names>
            <surname>Alonso</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Casati</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Kuno</surname>
          </string-name>
          , and
          <string-name>
            <given-names>V.</given-names>
            <surname>Machiraju</surname>
          </string-name>
          .
          <source>Web Services: Concepts</source>
          ,
          <source>Architectures and Applications</source>
          . Springer-Verlag,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>T.</given-names>
            <surname>Andrews</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Curbera</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Dholakia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Goland</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Klein</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Leymann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Roller</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Smith</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Thatte</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Trickovic</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Weeragwarana</surname>
          </string-name>
          .
          <article-title>Business process execution language for web services - version 1.1</article-title>
          .
          <source>Technical report, IBM</source>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>A.</given-names>
            <surname>Arkin</surname>
          </string-name>
          .
          <article-title>Business process modeling language</article-title>
          .
          <source>Technical report, BPMI Organisation</source>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>C.</surname>
          </string-name>
          <article-title>Bo¨hm and G. Jacopini. Flow diagrams, Turing machines and languages with only two formation rules</article-title>
          .
          <source>Comm. ACM</source>
          ,
          <volume>9</volume>
          (
          <issue>5</issue>
          ):
          <fpage>366</fpage>
          -
          <lpage>371</lpage>
          ,
          <year>1966</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>S.</given-names>
            <surname>Dustdar</surname>
          </string-name>
          and
          <string-name>
            <given-names>W.</given-names>
            <surname>Schreiner</surname>
          </string-name>
          .
          <article-title>Survey of web service composition</article-title>
          .
          <source>Int. J. Web and Grid Services</source>
          ,
          <volume>1</volume>
          (
          <issue>1</issue>
          ):
          <fpage>1</fpage>
          -
          <lpage>30</lpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>J.</given-names>
            <surname>Grundy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Panas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Singh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>and H.</given-names>
            <surname>Stockle</surname>
          </string-name>
          .
          <article-title>An approach to developing web services with aspect-oriented component engineering</article-title>
          . In
          <source>In Proceedings of the 2nd Nordic Conference on Web Services</source>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>N.</given-names>
            <surname>Kavantzas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Burdett</surname>
          </string-name>
          , G. Ritzinger,
          <string-name>
            <given-names>T.</given-names>
            <surname>Fletcher</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Y.</given-names>
            <surname>Lafon</surname>
          </string-name>
          .
          <source>Web services choreography description language version 1.0. Technical report, W3C</source>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>K.-K. Lau</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          <string-name>
            <surname>Ling</surname>
            , and
            <given-names>Z.</given-names>
          </string-name>
          <string-name>
            <surname>Wang</surname>
          </string-name>
          .
          <article-title>Composing components in design phase using exogenous connectors</article-title>
          .
          <source>In In Proc. 32nd Euromicro Conference on Software Engineering and Advanced Applications</source>
          , pages
          <fpage>12</fpage>
          -
          <lpage>19</lpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>K.-K. Lau</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Ornaghi</surname>
            , and
            <given-names>Z.</given-names>
          </string-name>
          <string-name>
            <surname>Wang</surname>
          </string-name>
          .
          <article-title>A software component model and its preliminary formalisation</article-title>
          . In F. de Boer et al., editor,
          <source>Proc. 4th Int. Symp. on Formal Methods for Components and Objects, LNCS 4111</source>
          , pages
          <fpage>1</fpage>
          -
          <lpage>21</lpage>
          . Springer-Verlag,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>K.-K. Lau</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Velasco Elizondo</surname>
            , and
            <given-names>Z.</given-names>
          </string-name>
          <string-name>
            <surname>Wang</surname>
          </string-name>
          .
          <article-title>Exogenous connectors for software components</article-title>
          . In G. Heineman et al., editor,
          <source>Proc. 8th Int. Symp. on Component-based Software Engineering, LNCS 3489</source>
          . Springer,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12. D. Le Me´tayer, V.-
          <string-name>
            <given-names>A.</given-names>
            <surname>Nicolas</surname>
          </string-name>
          , and
          <string-name>
            <given-names>O.</given-names>
            <surname>Ridoux</surname>
          </string-name>
          .
          <article-title>Exploring the software development trilogy</article-title>
          .
          <source>In IEEE Softw.</source>
          , volume
          <volume>15</volume>
          , pages
          <fpage>75</fpage>
          -
          <lpage>81</lpage>
          ,
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <given-names>E.</given-names>
            <surname>Newcomer. Understanding Web</surname>
          </string-name>
          <article-title>Services: XML, WSDL, SOAP, and UDDI</article-title>
          . AddisonWesley,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <given-names>C.</given-names>
            <surname>Peltz</surname>
          </string-name>
          .
          <article-title>Web services orchestration and choreography</article-title>
          .
          <source>Computer</source>
          ,
          <volume>36</volume>
          (
          <issue>10</issue>
          ):
          <fpage>46</fpage>
          -
          <lpage>52</lpage>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <given-names>P.</given-names>
            <surname>Pires</surname>
          </string-name>
          .
          <article-title>Webtransact: A framework for specifying and coordinating reliable web services compositions</article-title>
          .
          <source>Technical report</source>
          , Federal University of Rio De Janeiro,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>J. Hosking S. Singh</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Grundy</surname>
            and
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Sun</surname>
          </string-name>
          .
          <article-title>An architecture for developing aspect-oriented web services</article-title>
          .
          <source>In Proceedings of European Conference on Web Services</source>
          , Vaxjo, Sweden,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <given-names>S.</given-names>
            <surname>Thatte</surname>
          </string-name>
          . Xlang:
          <article-title>Web services for business process design</article-title>
          .
          <source>Technical report, Microsoft</source>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18. E. Thomas.
          <article-title>Service-Oriented Architecture: Concepts, Technology, and</article-title>
          <string-name>
            <given-names>Design. Prentice</given-names>
            <surname>Hall</surname>
          </string-name>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19. W. van der Aalst, L. Aldred,
          <string-name>
            <given-names>M.</given-names>
            <surname>Dumas</surname>
          </string-name>
          , ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A. ter</given-names>
            <surname>Hofstede</surname>
          </string-name>
          .
          <article-title>Design and implementation of the YAWL system</article-title>
          .
          <source>In 16th Int. Conf. on Advanced Information Systems Engineering</source>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20. W. van der Aalst, A. ter
          <string-name>
            <surname>Hofstede</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Kiepuszewski</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Barros</surname>
          </string-name>
          .
          <article-title>Workflow patterns</article-title>
          .
          <source>In Distributed and Parallel Databases</source>
          , pages
          <fpage>5</fpage>
          -
          <lpage>51</lpage>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>