SlideShare a Scribd company logo
1 of 21
Turning Web Applications into Web
 Services by Wrapping Techniques

                    Giusy Di Lorenzo
                   Anna Rita Fasolino
                   Lorenzo Melcarne
                  Porfirio Tramontana
                     Valeria Vittorini
              Dipartimento di Informatica e Sistemistica
               University of Naples Federico II, Italy
Motivation

   With the diffusion of new paradigms and technological
    solutions for the Web (RIA and Ajax, SOA, …), existing
    Web Applications are rapidly becoming legacy

   A strategic objective: to integrate existing Web
    applications with the new platforms

   An Open Issue:
         Turning Web applications functionalities into Web Services using
          systematic migration approaches based on Wrapping techniques



Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007             2
Comparing Interaction paradigms…

           Web Applications                                               Web Services
Users seeing an HTML page, fill                                  A Client party invokes a
input fields in a form and submit                                service implemented by a
them, or click on a link in the page.                            provider party, using a request
Web Server answers by producing a                                message.
HTML page containing output values                               The provider processes the
and new input fields and command                                 request and sends a response
buttons that is rendered by the                                  message with the obtained
browser                                                          results.

                                                                   Req

                                                                   Resp



  Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007                                     3
Turning WA to WS

   Turning Web applications functionalities
    into Web services
         Transforming the original (non programmatic)
          user-oriented interface of the Web application
          into a programmatic interface that exposes
          the full functionality and data of the
          application and that can be suitable for:
             Web Services
             APIs (e.g. accessible via Ajax requests)




Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007   4
Migration solutions

   White Box
         Invasive; they depend on the specific languages and technologies
          adopted on the server side of the Web Application

   Black Box
         Web Wrappers solutions
         Baumgartner et al., 2004
               Web Services returning output data of Web pages obtained via visual
                selection
         Jiang and Stroulia 2004
               Web Services returning output data of Web pages obtained via http
                request/response analysis
         Canfora et al. 2006
               Web Services executing functionalities of form based legacy system via
                wrappers




Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007                             5
Our Wrapper solution
         The goal of our wrapper is to drive the Web Application during
          the execution of each possible interaction scenario associated
          with the use case to migrate, by providing it with the needed
          flow of http requests
         The Wrapper behaviour must replicate all the possible behaviour
          of the user of the Web application in the execution of the
          functionality to migrate

                                                   Application Server
                       Web
                                                      Wrapper
                      Service
                      Request
                                                            Web Application

                       Web
                      Service
                     Response

Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007                  6
Wrapper Architecture
                          Application Server
                           Wrapper                                 State              Discriminating
                                                                                       Expression
                                                                 Identifier                            Automaton
       Web                      Browser
                                                        Identified                     ,               Description
    Application                 Emulator         Interaction State    Current State
                                                                                                       Document
                                        Click or Submit        Automaton
                                  HTML Page                     Engine


                                               Web Service               Web Service
                                                  Request                Response

• Http Unit acts as a Browser Emulator
• A XPath Library (such as Jaxp) supports the Class Identifier
• The behaviour of the wrapper for a given functionality to migrate is completely described in
the corresponding Automaton Description Document

  Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007                                                       7
The Model of the Interaction

   A Finite State Automaton FSA= (S, T, A, Sin,
    Sfin) where:
        S is the set of Interaction States; they may be:
              Input States
              Output States
              I/O States
              Exception States
        A is the set of Actions performed by the user when an
         Interaction State occurs,
        T is the set of Transitions between states,
        Sin and Sfin are the Initial and Final states of the
         interaction.


Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007   8
Non Deterministic finite State Automata
                                                                Login and        Access
                                                   Login and    Password         Permitted
                       Home        Click ‘Login’
                                                               Login and
                       Page                        Password
                                                    Request    Password      ?
                                                                 Login and        Access
                                                                 Password         Denied


                                  What is the next State?
 The next state depends on the internal logic or on the internal state of the legacy system.

 Non Deterministic Finite State Automaton (NFA) is a finite state machine where for each pair
of state and input symbol there may be several possible next states

 The wrapper must know the list of the possible Next States of a given State
    • Possible successors of Password Request State are Access Permitted and Access Denied states

 The wrapper must be able to identify the current state on the basis of the returned screen
    • Wrapper must discriminate among Access Permitted screen and Access Denied screen

  Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007                                      9
The proposed Migration process
1.         Selection of the Web application functionality to be turned into a
           Web service, based on:
             Business Value
             Potential reusability
             Cohesion and State Independence

2.         Reverse Engineering of the Web application User Interface
      1.      Identification of execution scenarios
      2.      Characterisation of execution scenario steps

3.         Interaction Model design
      1.      Evaluation of alternative modelling solutions
      2.      XML-based design of the model

4.         Wrapper Deploy and Validation


Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007                10
The Migration Toolkit
           Web Pages                   Candidate Features
                                                               Interaction
                                                               states and
                                                             discriminating
                                                                                                      This toolkit
                          Classified
                                         Discriminating       expressions      Interaction           supports the
           Page            pages
                                          Expression                              State                migration
          Collector                        Generator                           Repository              process
    Page                                                                                                 steps
Classification          Interaction model knowledge
                                                                                    Discriminating    needed to
                                                                                     Expressions
                                                                                                     produce the
                                Automaton                 Classified pages      Page                  Automaton
  XML Automaton description
                                                                                                      description
                                 Designer                                     Classifier              needed by
                                                                                                     the Wrapper

                                  Web Pages


  Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007                                             11
Case studies

   Based on a real italian Web Application for
    train journeys planning and booking
   3 case studies have been carried out n
    order to:
         Explore the feasibility of the wrapping
          approach
         Explore the different migration alternatives
             Service BS1 realise a simple train booking service
             Services BS2 and BS2* realise a more complex
              service in two different manners

Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007       12
Booking Service #1

         Input:
               Departure Station – Arrive Station – Date and
                Starting Time – Login – Password
         Behaviour:
               The system books one seat on the first available
                train solution listed in the timetable iff it can be
                purchased on-line and the Standard fare can be
                applied
         Output:
               Train number – Departure Time – Coach number –
                seat number – Exception description

Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007           13
BS1 Automaton

                                State 3
                               Available
                                                      State 5
                                                   Train Details
                                                                           State 6                   • No preconditions
                             Standard Fare            shown
                                                                        Authentication
                                                                                                     • 19 Interaction States
                                                                                                     • 14 scenarios
           State 2                          State 4                State 7
                                                                                   Failed
                                                                                         States 11
                                                                                                         • 1 successful
                                        Not Available              Booking
        Available Trains
                                        Standard Fare                          Authentication            • 13 exceptions
       State 1                         States 8
       Home                   Other Exception
                                 Scenarios



                          State 9
                        Not Available
                           Trains

                 States 10
            Incorrect
           Input data




Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007                                                             14
Booking Service #2

         Input:
               Departure Station – Arrive Station – Date and
                Starting Time – Login – Password - NMax
         Behaviour:
               The system books one seat on the first available
                train solution listed in the timetable iff it can be
                purchased on-line, the Standard fare can be
                applied and it is in the first NMax listed solutions
         Output:
               Train number – Departure Time – Coach number –
                seat number – Exception description

Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007           15
BS2 realisation

   Problem:
         The interaction model need to maintain some
          information about the current state of the interaction
               Number of done searching attempts
         Some pieces of logic must be added to the automaton
               If the number of attempts N is equal to the number of
                maximum allowed attempts NMax then go to an exception
                state else decrease the departure time and retry
         2 possible solution:
               Put the logic in the automaton
               Put the logic in a Workflow


Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007            16
BS2 – Automaton solution
                                 State 3                State 5
                                                                                                   • An Automaton Variable N is
                                                                                                   managed, representing the
                                                                         State 6
                                Available            Train Details    Authentication
                              Standard Fare            Showed
                                                                                                   actual attempt number.
                                                         (1)
                                                   State 4
                                               Not Available          State 7
                                                                                       States 11
                                                                                      Failed
                                                                                                   • The value of Departure
                                                                                                   Time is decreased in State 4
                   State 2                     Standard Fare         Booking      Authentication
                  Available
                   Trains
                                                      N++
                                              (2)
        State 1                               State 12
        Home                                  Too Much
                                              Attempts
            N=0




• States 4 and 12 hthe State Identifier has
the same interface: the State Identifier can
discriminate between them by evaluating the
value of the Automaton Variable N:
      • N=NMax  State 12
      • N<NMax  State 4
  Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007                                                            17
BS2* – Workflow Solution

                     (1)
                         Receive
                                                                     Implemented with BPEL
                                                                      Reuses the basic service
                       Request Train
                         Booking
                                                                  
                               N=0
                      (2)
                                                                      BS1
                         Invoke
                     Booking Service     BS1
                                                                     The other activities model
                                                                      the business logic of BS2
[ReplayBS =" NA Fare   Exc"       [ReplayBS ! = "NA Fare   Exc"
             &                                  Or
       N < =Nmax ]                         N >Nmax]

                                                                          Realised as BPEL directives
                            (3)
                                                                      
                                                                          or other Web Services
   (4)                                 (5)
   Modify (DepartHour )
                                           Reply
         & N++
                                       Train Booking




Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007                                            18
Discussion
   BS2, Automaton Solution
      Better performances
      Can reuse transition isolation mechanisms that could be
       implemented in the existing WA
      Larger Automaton
      Much effort in Automaton design and testing

   BS2*, Workflow Solution
      Easier to implement and test (for peoples that are skilled in
       workflow design!)
      Possibility to reuse existing services
      Transition isolation mechanisms should be implemented in the
       workflow
      Worst performances

Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007           19
Conclusions

   A tool supported process for wrapping based migration of
    functionalities of Web Application to Web Services has
    been proposed
   Reported case studies show the feasibility of the wrapper
    solution in real problems
   Comparisons between different possible solutions have
    been proposed
   Future Works:
         Support to existing RIAs
         Improvements of process steps in order to reduce effort
         Training of peoples in order to realise empirical studies for
          evaluation and comparison of the needed effort

Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007              20
Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007   21

More Related Content

Similar to Turning Web Applications into Web Services by Wrapping Techniques

Mobile Web Network
Mobile Web NetworkMobile Web Network
Mobile Web Network
chenjennan
 
Asynchronous Mobile Web Services:
Asynchronous Mobile Web Services: Asynchronous Mobile Web Services:
Asynchronous Mobile Web Services:
Dr. Fahad Aijaz
 
ESWC SS 2012 - Tuesday Keynote John Domingue: Services, Semantics and Linked ...
ESWC SS 2012 - Tuesday Keynote John Domingue: Services, Semantics and Linked ...ESWC SS 2012 - Tuesday Keynote John Domingue: Services, Semantics and Linked ...
ESWC SS 2012 - Tuesday Keynote John Domingue: Services, Semantics and Linked ...
eswcsummerschool
 

Similar to Turning Web Applications into Web Services by Wrapping Techniques (20)

Building tomorrow's web with today's tools
Building tomorrow's web with today's toolsBuilding tomorrow's web with today's tools
Building tomorrow's web with today's tools
 
Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns FrameworksMike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
 
The path towards pervasive computing
The path towards pervasive computingThe path towards pervasive computing
The path towards pervasive computing
 
Migrating Interactive Legacy Systems To Web Services
Migrating Interactive Legacy Systems To Web ServicesMigrating Interactive Legacy Systems To Web Services
Migrating Interactive Legacy Systems To Web Services
 
Complex End-to-End Testing
Complex End-to-End TestingComplex End-to-End Testing
Complex End-to-End Testing
 
Mobile Web Network
Mobile Web NetworkMobile Web Network
Mobile Web Network
 
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
 
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
 
Asynchronous Mobile Web Services:
Asynchronous Mobile Web Services: Asynchronous Mobile Web Services:
Asynchronous Mobile Web Services:
 
Component based User Interface Rendering with State Caching Between Routes
Component based User Interface Rendering with State Caching Between RoutesComponent based User Interface Rendering with State Caching Between Routes
Component based User Interface Rendering with State Caching Between Routes
 
Net Services
Net ServicesNet Services
Net Services
 
SOA patterns
SOA patterns SOA patterns
SOA patterns
 
Web servers
Web serversWeb servers
Web servers
 
Use of SOA and Web Services Technologies for EA Migration - Lessons Learned o...
Use of SOA and Web Services Technologies for EA Migration - Lessons Learned o...Use of SOA and Web Services Technologies for EA Migration - Lessons Learned o...
Use of SOA and Web Services Technologies for EA Migration - Lessons Learned o...
 
ESWC SS 2012 - Tuesday Keynote John Domingue: Services, Semantics and Linked ...
ESWC SS 2012 - Tuesday Keynote John Domingue: Services, Semantics and Linked ...ESWC SS 2012 - Tuesday Keynote John Domingue: Services, Semantics and Linked ...
ESWC SS 2012 - Tuesday Keynote John Domingue: Services, Semantics and Linked ...
 
Unit 3-SOA Technologies
Unit 3-SOA TechnologiesUnit 3-SOA Technologies
Unit 3-SOA Technologies
 
UNIT 3 web iiiBCA.pptx
UNIT 3 web iiiBCA.pptxUNIT 3 web iiiBCA.pptx
UNIT 3 web iiiBCA.pptx
 
Working with Data and Web Services in Microsoft Silverlight 2
Working with Data and Web Services in Microsoft Silverlight 2Working with Data and Web Services in Microsoft Silverlight 2
Working with Data and Web Services in Microsoft Silverlight 2
 
Web 2.0 and the Geoweb Part 1: Web 2.0 Examples
Web 2.0 and the Geoweb Part 1: Web 2.0 ExamplesWeb 2.0 and the Geoweb Part 1: Web 2.0 Examples
Web 2.0 and the Geoweb Part 1: Web 2.0 Examples
 
MeasureWorks eFinancials - Best practices for a successfull mobile experienc...
MeasureWorks eFinancials  - Best practices for a successfull mobile experienc...MeasureWorks eFinancials  - Best practices for a successfull mobile experienc...
MeasureWorks eFinancials - Best practices for a successfull mobile experienc...
 

More from Porfirio Tramontana

Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...
Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...
Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...
Porfirio Tramontana
 
Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...
Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...
Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...
Porfirio Tramontana
 

More from Porfirio Tramontana (20)

An Approach for Model Based Testing of Augmented Reality Applications.pdf
An Approach for Model Based Testing of Augmented Reality Applications.pdfAn Approach for Model Based Testing of Augmented Reality Applications.pdf
An Approach for Model Based Testing of Augmented Reality Applications.pdf
 
Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...
Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...
Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...
 
Techniques and Tools for Mobile Testing Automation
Techniques and Tools for Mobile Testing AutomationTechniques and Tools for Mobile Testing Automation
Techniques and Tools for Mobile Testing Automation
 
A technique for parallel gui testing of android applications
A technique for parallel gui testing of android applicationsA technique for parallel gui testing of android applications
A technique for parallel gui testing of android applications
 
Reverse Engineering of Data Models from Legacy Spreadsheets-Based Systems: An...
Reverse Engineering of Data Models from Legacy Spreadsheets-Based Systems: An...Reverse Engineering of Data Models from Legacy Spreadsheets-Based Systems: An...
Reverse Engineering of Data Models from Legacy Spreadsheets-Based Systems: An...
 
Reverse Engineering Techniques: from Web Applications to Rich Internet Applic...
Reverse Engineering Techniques: from Web Applications to Rich Internet Applic...Reverse Engineering Techniques: from Web Applications to Rich Internet Applic...
Reverse Engineering Techniques: from Web Applications to Rich Internet Applic...
 
Web Application Testing in Fifteen Years of WSE
Web Application Testing in Fifteen Years of WSEWeb Application Testing in Fifteen Years of WSE
Web Application Testing in Fifteen Years of WSE
 
Towards a Better Comprehensibility of Web Applications: Lessons Learned from ...
Towards a Better Comprehensibility of Web Applications: Lessons Learned from ...Towards a Better Comprehensibility of Web Applications: Lessons Learned from ...
Towards a Better Comprehensibility of Web Applications: Lessons Learned from ...
 
Comprehending Web Applications by a Clustering Based Approach
Comprehending Web Applications by a Clustering Based Approach Comprehending Web Applications by a Clustering Based Approach
Comprehending Web Applications by a Clustering Based Approach
 
Reverse Engineering Web Applications
Reverse Engineering Web ApplicationsReverse Engineering Web Applications
Reverse Engineering Web Applications
 
Recovering Interaction Design Patterns in Web Applications
Recovering Interaction Design Patterns in Web Applications Recovering Interaction Design Patterns in Web Applications
Recovering Interaction Design Patterns in Web Applications
 
Improving Usability of Web Pages for Blind
Improving Usability of Web Pages for BlindImproving Usability of Web Pages for Blind
Improving Usability of Web Pages for Blind
 
Techniques and Tools for Rich Internet Applications Testing
Techniques and Tools for Rich Internet Applications TestingTechniques and Tools for Rich Internet Applications Testing
Techniques and Tools for Rich Internet Applications Testing
 
Comprehending Ajax Web Applications by the DynaRIA Tool
Comprehending Ajax Web Applications by the DynaRIA ToolComprehending Ajax Web Applications by the DynaRIA Tool
Comprehending Ajax Web Applications by the DynaRIA Tool
 
A GUI Crawling-based Technique for Android Mobile Application Testing
A GUI Crawling-based Technique for Android Mobile Application TestingA GUI Crawling-based Technique for Android Mobile Application Testing
A GUI Crawling-based Technique for Android Mobile Application Testing
 
Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...
Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...
Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...
 
Considering Context Events in Event-Based Testing of Mobile Applications
Considering Context Events in Event-Based Testing of Mobile Applications Considering Context Events in Event-Based Testing of Mobile Applications
Considering Context Events in Event-Based Testing of Mobile Applications
 
Using GUI Ripping for Automated Testing of Android Apps
Using GUI Ripping for Automated Testing of Android AppsUsing GUI Ripping for Automated Testing of Android Apps
Using GUI Ripping for Automated Testing of Android Apps
 
A Toolset for GUI Testing of Android Applications
A Toolset for GUI Testing of Android ApplicationsA Toolset for GUI Testing of Android Applications
A Toolset for GUI Testing of Android Applications
 
DynaRIA: a Tool for Ajax Web Application Comprehension
DynaRIA: a Tool for Ajax Web Application ComprehensionDynaRIA: a Tool for Ajax Web Application Comprehension
DynaRIA: a Tool for Ajax Web Application Comprehension
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Recently uploaded (20)

Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 

Turning Web Applications into Web Services by Wrapping Techniques

  • 1. Turning Web Applications into Web Services by Wrapping Techniques Giusy Di Lorenzo Anna Rita Fasolino Lorenzo Melcarne Porfirio Tramontana Valeria Vittorini Dipartimento di Informatica e Sistemistica University of Naples Federico II, Italy
  • 2. Motivation  With the diffusion of new paradigms and technological solutions for the Web (RIA and Ajax, SOA, …), existing Web Applications are rapidly becoming legacy  A strategic objective: to integrate existing Web applications with the new platforms  An Open Issue:  Turning Web applications functionalities into Web Services using systematic migration approaches based on Wrapping techniques Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007 2
  • 3. Comparing Interaction paradigms… Web Applications Web Services Users seeing an HTML page, fill A Client party invokes a input fields in a form and submit service implemented by a them, or click on a link in the page. provider party, using a request Web Server answers by producing a message. HTML page containing output values The provider processes the and new input fields and command request and sends a response buttons that is rendered by the message with the obtained browser results. Req Resp Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007 3
  • 4. Turning WA to WS  Turning Web applications functionalities into Web services  Transforming the original (non programmatic) user-oriented interface of the Web application into a programmatic interface that exposes the full functionality and data of the application and that can be suitable for:  Web Services  APIs (e.g. accessible via Ajax requests) Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007 4
  • 5. Migration solutions  White Box  Invasive; they depend on the specific languages and technologies adopted on the server side of the Web Application  Black Box  Web Wrappers solutions  Baumgartner et al., 2004  Web Services returning output data of Web pages obtained via visual selection  Jiang and Stroulia 2004  Web Services returning output data of Web pages obtained via http request/response analysis  Canfora et al. 2006  Web Services executing functionalities of form based legacy system via wrappers Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007 5
  • 6. Our Wrapper solution  The goal of our wrapper is to drive the Web Application during the execution of each possible interaction scenario associated with the use case to migrate, by providing it with the needed flow of http requests  The Wrapper behaviour must replicate all the possible behaviour of the user of the Web application in the execution of the functionality to migrate Application Server Web Wrapper Service Request Web Application Web Service Response Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007 6
  • 7. Wrapper Architecture Application Server Wrapper State Discriminating Expression Identifier Automaton Web Browser Identified , Description Application Emulator Interaction State Current State Document Click or Submit Automaton HTML Page Engine Web Service Web Service Request Response • Http Unit acts as a Browser Emulator • A XPath Library (such as Jaxp) supports the Class Identifier • The behaviour of the wrapper for a given functionality to migrate is completely described in the corresponding Automaton Description Document Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007 7
  • 8. The Model of the Interaction  A Finite State Automaton FSA= (S, T, A, Sin, Sfin) where:  S is the set of Interaction States; they may be:  Input States  Output States  I/O States  Exception States  A is the set of Actions performed by the user when an Interaction State occurs,  T is the set of Transitions between states,  Sin and Sfin are the Initial and Final states of the interaction. Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007 8
  • 9. Non Deterministic finite State Automata Login and Access Login and Password Permitted Home Click ‘Login’ Login and Page Password Request Password ? Login and Access Password Denied What is the next State?  The next state depends on the internal logic or on the internal state of the legacy system.  Non Deterministic Finite State Automaton (NFA) is a finite state machine where for each pair of state and input symbol there may be several possible next states  The wrapper must know the list of the possible Next States of a given State • Possible successors of Password Request State are Access Permitted and Access Denied states  The wrapper must be able to identify the current state on the basis of the returned screen • Wrapper must discriminate among Access Permitted screen and Access Denied screen Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007 9
  • 10. The proposed Migration process 1. Selection of the Web application functionality to be turned into a Web service, based on:  Business Value  Potential reusability  Cohesion and State Independence 2. Reverse Engineering of the Web application User Interface 1. Identification of execution scenarios 2. Characterisation of execution scenario steps 3. Interaction Model design 1. Evaluation of alternative modelling solutions 2. XML-based design of the model 4. Wrapper Deploy and Validation Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007 10
  • 11. The Migration Toolkit Web Pages Candidate Features Interaction states and discriminating This toolkit Classified Discriminating expressions Interaction supports the Page pages Expression State migration Collector Generator Repository process Page steps Classification Interaction model knowledge Discriminating needed to Expressions produce the Automaton Classified pages Page Automaton XML Automaton description description Designer Classifier needed by the Wrapper Web Pages Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007 11
  • 12. Case studies  Based on a real italian Web Application for train journeys planning and booking  3 case studies have been carried out n order to:  Explore the feasibility of the wrapping approach  Explore the different migration alternatives  Service BS1 realise a simple train booking service  Services BS2 and BS2* realise a more complex service in two different manners Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007 12
  • 13. Booking Service #1  Input:  Departure Station – Arrive Station – Date and Starting Time – Login – Password  Behaviour:  The system books one seat on the first available train solution listed in the timetable iff it can be purchased on-line and the Standard fare can be applied  Output:  Train number – Departure Time – Coach number – seat number – Exception description Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007 13
  • 14. BS1 Automaton State 3 Available State 5 Train Details State 6 • No preconditions Standard Fare shown Authentication • 19 Interaction States • 14 scenarios State 2 State 4 State 7 Failed States 11 • 1 successful Not Available Booking Available Trains Standard Fare Authentication • 13 exceptions State 1 States 8 Home Other Exception Scenarios State 9 Not Available Trains States 10 Incorrect Input data Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007 14
  • 15. Booking Service #2  Input:  Departure Station – Arrive Station – Date and Starting Time – Login – Password - NMax  Behaviour:  The system books one seat on the first available train solution listed in the timetable iff it can be purchased on-line, the Standard fare can be applied and it is in the first NMax listed solutions  Output:  Train number – Departure Time – Coach number – seat number – Exception description Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007 15
  • 16. BS2 realisation  Problem:  The interaction model need to maintain some information about the current state of the interaction  Number of done searching attempts  Some pieces of logic must be added to the automaton  If the number of attempts N is equal to the number of maximum allowed attempts NMax then go to an exception state else decrease the departure time and retry  2 possible solution:  Put the logic in the automaton  Put the logic in a Workflow Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007 16
  • 17. BS2 – Automaton solution State 3 State 5 • An Automaton Variable N is managed, representing the State 6 Available Train Details Authentication Standard Fare Showed actual attempt number. (1) State 4 Not Available State 7 States 11 Failed • The value of Departure Time is decreased in State 4 State 2 Standard Fare Booking Authentication Available Trains N++ (2) State 1 State 12 Home Too Much Attempts N=0 • States 4 and 12 hthe State Identifier has the same interface: the State Identifier can discriminate between them by evaluating the value of the Automaton Variable N: • N=NMax  State 12 • N<NMax  State 4 Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007 17
  • 18. BS2* – Workflow Solution (1) Receive  Implemented with BPEL Reuses the basic service Request Train Booking  N=0 (2) BS1 Invoke Booking Service BS1  The other activities model the business logic of BS2 [ReplayBS =" NA Fare Exc" [ReplayBS ! = "NA Fare Exc" & Or N < =Nmax ] N >Nmax] Realised as BPEL directives (3)  or other Web Services (4) (5) Modify (DepartHour ) Reply & N++ Train Booking Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007 18
  • 19. Discussion  BS2, Automaton Solution Better performances Can reuse transition isolation mechanisms that could be implemented in the existing WA Larger Automaton Much effort in Automaton design and testing  BS2*, Workflow Solution Easier to implement and test (for peoples that are skilled in workflow design!) Possibility to reuse existing services Transition isolation mechanisms should be implemented in the workflow Worst performances Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007 19
  • 20. Conclusions  A tool supported process for wrapping based migration of functionalities of Web Application to Web Services has been proposed  Reported case studies show the feasibility of the wrapper solution in real problems  Comparisons between different possible solutions have been proposed  Future Works:  Support to existing RIAs  Improvements of process steps in order to reduce effort  Training of peoples in order to realise empirical studies for evaluation and comparison of the needed effort Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007 20
  • 21. Porfirio Tramontana – WCRE 2007 – Vancouver, BC – 10/30/2007 21