
type  String (respectively String[]) for the first two 
kinds of return values, and of type void for the last 
one. 
4.2  Determing the Return Value 
One major challenge during the implementation of 
the prototype was the determination of the actual 
return value. Usually Web Applications provide 
their result within a webpage. Therefore it is 
necessary to parse the webpage and determine the 
result of interest. In order to be able to do so, the 
position where the information of interest is located, 
has to be described. Usually an absolute description 
of the position, e.g. the information is placed 
between the n-th and m-th character doesn’t work, 
since Web applications usually provide the 
information of interest in specially designed 
websites where the absolute position of the 
information changes dramatically. Here another 
approach was necessary. Within the developed 
prototype we found that a contextual representation 
of the position of the information worked very well. 
Therefore we designed regular expressions to 
describe what kind of information is of interest to us 
on the webpage that the Web Application returns. 
For example, in the case of a certain search engine, 
the regular expression for the return type looks like 
this: 
<span class=”url”>.*</span> 
Here, the . represents any character. Therefore in 
this example the return value is an array of type 
String with all character sequences that are within 
the left border (<span class=”url”>) and the right 
border (</span>).  
5 XML REPRESENTATION 
As already shown in the architectural overview in 
Figure 1, the implemented approach produces an 
intermediate XML representation of the service of 
interest on its way to the final Web Service. The 
following two sections provide an overview first on 
the XML representation and the structure itself. 
Afterwards we provide a solution how this XML 
representation is used in order to implement the Web 
Service, including its necessary descriptions, with 
the help of XSL/T. 
5.1  An XML Datastructure for the 
Definition of Web Applications 
The here described XML representation of the 
methods finally implemented in the resulting Web 
Service is a minimal set of information necessary in 
order to be able to implement the Web Service later 
on. The Document Type Definition (DTD) that 
defines the grammar of the XML representation 
looks like this: 
<!ELEMENT forms (form*)>  
<!ATTLIST forms name CDATA #REQUIRED>  
 
<!ELEMENT form (parameter*)>  
<!ATTLIST form action      CDATA         #REQUIRED  
             leftBorder  CDATA           #REQUIRED  
             rightBorder  CDATA          #REQUIRED  
             method     (get|post)       #REQUIRED  
             result   (single|list|void) #REQUIRED  
             methodName  CDATA          #REQUIRED>  
 
<!ELEMENT parameter EMPTY>  
<!ATTLIST parameter name   CDATA        #REQUIRED  
                    value  CDATA        #IMPLIED  
                    hidden (true|false) #REQUIRED>
 
The root element of a certain XML representation is 
a  forms element. This one is basically necessary in 
order to encapsulate the different services that a 
Web Application provides. As an attribute, the forms 
element provides the possibility of a name that 
might be interpreted as an acronym for the provided 
service. 
On the next level the XML representation 
consists of a number of form elements. Each form 
element describes a single service of the Web 
Application on a syntactical level. Therefore it 
provides attributes that represent the URL under 
which the service is available (action), the left and 
the right border for the determination of the return 
values (leftBorder,  rightBorder), the HTTP method 
used to invoke the service (method), the result type 
as explained in section 5.1 (result) and the name that 
the method of the Web Service façade 
(methodName) should have.  
At the lowest level, each of the forms elements 
consists of potentially several parameter elements. 
Each parameter element consists of potentially three 
attributes that describe the parameter: first of all, 
each parameter can be identified (name), potentially 
parameters might have a value (value) that can be 
interpreted as the default value of this parameter 
and, last but not least, as already described in section 
4 some parameters might not be visible to the end-
user of the service (hidden).  
This XML representation of a certain service is 
enough to implement the corresponding Web 
Service façade automatically, as describe in the next 
section. 
CLOSING THE GAP BETWEEN WEB APPLICATIONS AND WEB SERVICES
629