SlideShare a Scribd company logo
1 of 34
Download to read offline
ChoreUnit: Testing framework for
        Web Services

   Felipe Besson, Guilherme Nogueira, Leonardo Leite
           {besson, gmaio, leofl}@ime.usp.br



             Porto Alegre, July 2nd, 2011
Services




 ?
Product Vs Service
Product Vs Service
Web Services



 Message exchange standards (xml)
among systems through Internet (http)
Web Services - Applications
●   Machine-machine communication


            00111100
            10111010

                       10111101
                       11110000
Web Services - Applications
●   Machine-machine communication
●   Integrate heterogeneous systems
Web Services - Applications
●   Machine-machine communication
●   Integrate heterogeneous systems
●   Business automation

Z           z                             z   z
        z                             z
    z                                             Z
                                                      Z

                       Comprar
Web Services - Applications
●   Machine-machine communication
●   Integrate heterogeneous systems
●   Business automation

Z           z   Service provider                      z   z
        z                                         z
    z                                    Client               Z
                                                                  Z

                                   Buy
Web Services - Applications
●   Machine-machine communication
●   Integrate heterogeneous systems
●   Business automation
●   Data access
                  WS
Web Services - Applications
●   Machine-machine communication
●   Integrate heterogeneous systems
●   Business automation
●   Data access and creation (colaborative)

                        WS
Now: billions of web pages

Future: billions of web services
SOAP
WSDL
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://hello/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://hello/"
name="HelloWorldService">
<types>
 <xsd:schema>
   <xsd:import namespace="http://hello/"
   schemaLocation="http://localhost:8080/hello?xsd=1"></xsd:import>
 </xsd:schema>
</types>
<message name="sayHelloTo">
 <part name="parameter" element="tns:sayHelloTo"></part>
</message>
<message name="sayHelloToResponse">
 <part name="parameter" element="tns:sayHelloToResponse"></part>
</message>
<portType name="HelloWorld">
 <operation name="sayHelloTo">
   <input message="tns:sayHelloTo"></input>
   <output message="tns:sayHelloToResponse"></output>
 </operation>
</portType>
Web Services Clients in Java

●   Apache Axis2
●   Jax-WS (Java EE API)
WS Client with Jax-WS
...
<portType name="StoreWS">
    <operation name="searchByArtist">
        <input message="tns:searchByArtist"/>
        <output message="tns:searchByArtistResponse"/>
    </operation>
    <operation name="searchByGenre">
    <input message="tns:searchByGenre"/>
        <output message="tns:searchByGenreResponse"/>
        </operation>
    <operation name="searchByTitle">
        <input message="tns:searchByTitle"/>
        <output message="tns:searchByTitleResponse"/>
    </operation>
    <operation name="purchase">
        <input message="tns:purchase"/>
        <output message="tns:purchaseResponse"/>
    </operation>
</portType>
...
WS Client with Jax-WS

public interface Store {

    List<CD> searchByArtist(String artist);

    List<CD> searchByGenre(String genre);

    List<CD> searchByTitle(String title);

    Boolean purchase(CD cd, Customer customer);

}
WS Client with Jax-WS
$wsimport -s src http://choreos.ime.usp.br/store?wsdl
WS Client with Jax-WS
$wsimport -s src http://choreos.ime.usp.br/store?wsdl

                        ObjectFactory
                        package-info
                        StoreWS
                        StoreWSService
                        CD
                        Customer
                        SearchByGenre
                        SearchByGenreResponse
                        SearchByTitle
                        SearchByTitleResponse
                        SearchByArtist
                        SearchByArtistResponse
                        Purchase
WS Client with Jax-WS



StoreWSService service = new StoreWSService();
StoreWS store = service.getStoreWSPort();

List<CD> cds = store.searchByGenre("Rock");
TDD



Test-driven development
TDD


                           Make test pass

Write test




             Refactoring
Our Framework
Stub creation can be a problem

Process:

         %$#@         1. create
                      stubs
                     2. add classes to
                     project


                     3. understand classes
 Developer

                       Service interface
                          changed!
Problems when testing
 ●   Tests must be almost completely
     rewritten
 ●   Problem to integrate different services
 ●   How to do TDD without stubs?
                       %$#@
Our Goals
 Make testing web services easy

 ●   Interact with web services without stubs
 ●   Easily validate the operation's responses
 ●   Writing tests before the actual implementation
 ●   Integrate tests and framework to the development
     environment
Overview
Usage (1)
WSClient – dinamic client

// criation
WSClient service = new WSClient (String wsdl);


// Invoking an operation
Item resposta = service.request (String operation,
                                 Item parameters);
Usage (2)
Item – recursive structure representing complex
types

<n s: g etP r od u ctB y N am eR esp on se>
  <n s:r Ietu rrn xsi:ty p e=”ax26:I tem od u ctB y N am e”, “S occer
            tem esp on se = w s.r equ est( “g etP r
                                                        ”>
     <bar cod e>153</ bar cod e>
          cleat”);
     <br an d >ad id as</ br an d >
     <d escr ip tionr>A on se.g etC h ild ( “r etution;>
          I tem item = esp cleat</ d escr ip r n ”)
          I tem .g etN am e( ) ; => “r etu r n ”
     <n am e>S occer cleat</ n ame”) ; => “ax26:I tem ”
          I tem .g ettag A ttr ibu te( “xsi:ty p e>
     <p r ice>90.0</ p r ice>
     <spitem .g etC h ild( </ sp or t>.g etC on ten t( ) ; => “153”
           or t>soccer “bar code”)
          I tem .g etC h ild( “br an d ”) .g etC on ten t( ) ; => “adid as”
  </ n s:rtem .gretC h ild( “descr ip tion ”) .g etC on ten t( ) ; => “A cleat”
          I etu n >
</ n s:g etP r od u ctB y N am eR esp on se>
          …
Comparison
Conclusion


 WSClient code is bigger!
 ●   Is it really??
 ●   No, Jax-WS code uses stubs that were
     previously generated =P
Demo
Next steps
●   Implement new features
    ● REST services support
    ● Integration test


       – Validate messages exchanged
         between services
●   Experimentation
Questions?
 This research has received finding from:




  More Information: http://ccsl.ime.usp.br/baile/VandV
  Repository: https://github.com/choreos/choreos_v-v/

More Related Content

What's hot

MongoDB World 2018: Building Intelligent Apps with MongoDB & Google Cloud
MongoDB World 2018: Building Intelligent Apps with MongoDB & Google CloudMongoDB World 2018: Building Intelligent Apps with MongoDB & Google Cloud
MongoDB World 2018: Building Intelligent Apps with MongoDB & Google CloudMongoDB
 
The Ring programming language version 1.8 book - Part 47 of 202
The Ring programming language version 1.8 book - Part 47 of 202The Ring programming language version 1.8 book - Part 47 of 202
The Ring programming language version 1.8 book - Part 47 of 202Mahmoud Samir Fayed
 
IndexedDB and Push Notifications in Progressive Web Apps
IndexedDB and Push Notifications in Progressive Web AppsIndexedDB and Push Notifications in Progressive Web Apps
IndexedDB and Push Notifications in Progressive Web AppsAdégòkè Obasá
 
Exchange 2010/2013 Exchange Management Shell Command
Exchange 2010/2013 Exchange Management Shell CommandExchange 2010/2013 Exchange Management Shell Command
Exchange 2010/2013 Exchange Management Shell CommandNaseem Khoodoruth
 
NoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love StoryNoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love StoryAlexandre Morgaut
 
Javascript first-class citizenery
Javascript first-class citizeneryJavascript first-class citizenery
Javascript first-class citizenerytoddbr
 
Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015
Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015
Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015NoSQLmatters
 

What's hot (8)

MongoDB World 2018: Building Intelligent Apps with MongoDB & Google Cloud
MongoDB World 2018: Building Intelligent Apps with MongoDB & Google CloudMongoDB World 2018: Building Intelligent Apps with MongoDB & Google Cloud
MongoDB World 2018: Building Intelligent Apps with MongoDB & Google Cloud
 
The Ring programming language version 1.8 book - Part 47 of 202
The Ring programming language version 1.8 book - Part 47 of 202The Ring programming language version 1.8 book - Part 47 of 202
The Ring programming language version 1.8 book - Part 47 of 202
 
Cassandra 2.2 & 3.0
Cassandra 2.2 & 3.0Cassandra 2.2 & 3.0
Cassandra 2.2 & 3.0
 
IndexedDB and Push Notifications in Progressive Web Apps
IndexedDB and Push Notifications in Progressive Web AppsIndexedDB and Push Notifications in Progressive Web Apps
IndexedDB and Push Notifications in Progressive Web Apps
 
Exchange 2010/2013 Exchange Management Shell Command
Exchange 2010/2013 Exchange Management Shell CommandExchange 2010/2013 Exchange Management Shell Command
Exchange 2010/2013 Exchange Management Shell Command
 
NoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love StoryNoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love Story
 
Javascript first-class citizenery
Javascript first-class citizeneryJavascript first-class citizenery
Javascript first-class citizenery
 
Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015
Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015
Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015
 

Viewers also liked

μία δεκαετία σε εικόνες
μία δεκαετία σε εικόνεςμία δεκαετία σε εικόνες
μία δεκαετία σε εικόνεςGIA VER
 
Course syllabus from ingenious
Course syllabus from ingeniousCourse syllabus from ingenious
Course syllabus from ingeniousColege Buz
 
West Hollywood Residence Phase I
West Hollywood Residence   Phase IWest Hollywood Residence   Phase I
West Hollywood Residence Phase Iguest4f02fc0
 
Zw3500 ab zw3510ab-3500c-3510c-zw3520b-3520c-zw3530-light-tower
Zw3500 ab zw3510ab-3500c-3510c-zw3520b-3520c-zw3530-light-towerZw3500 ab zw3510ab-3500c-3510c-zw3520b-3520c-zw3530-light-tower
Zw3500 ab zw3510ab-3500c-3510c-zw3520b-3520c-zw3530-light-towerJiandong Wu
 
Erac presentation jan 10th 2011
Erac presentation jan 10th 2011Erac presentation jan 10th 2011
Erac presentation jan 10th 2011Cyri Jones
 
Eco profile at youth for cause dialogue session 10 june 2011
Eco profile at youth for cause dialogue session 10 june 2011Eco profile at youth for cause dialogue session 10 june 2011
Eco profile at youth for cause dialogue session 10 june 2011Hiep Luong
 
Indian River Whole Child
Indian River Whole ChildIndian River Whole Child
Indian River Whole ChildSFB320
 
Lisboa
LisboaLisboa
Lisboacris
 
FALCK “Zonevorming, een uitdagende ontwikkeling
FALCK “Zonevorming, een uitdagende ontwikkelingFALCK “Zonevorming, een uitdagende ontwikkeling
FALCK “Zonevorming, een uitdagende ontwikkelingHans Van Poucke
 
BordBia
BordBiaBordBia
BordBiaAMAS
 
I E E E 2009 Java Projects
I E E E 2009  Java  ProjectsI E E E 2009  Java  Projects
I E E E 2009 Java Projectsncct
 
Building Primes
Building PrimesBuilding Primes
Building Primesjwalts
 

Viewers also liked (20)

Conexao Sebrae - Fevereiro 2010
Conexao Sebrae - Fevereiro 2010Conexao Sebrae - Fevereiro 2010
Conexao Sebrae - Fevereiro 2010
 
μία δεκαετία σε εικόνες
μία δεκαετία σε εικόνεςμία δεκαετία σε εικόνες
μία δεκαετία σε εικόνες
 
Course syllabus from ingenious
Course syllabus from ingeniousCourse syllabus from ingenious
Course syllabus from ingenious
 
Ying Thao
Ying ThaoYing Thao
Ying Thao
 
Wagner chapter 1
Wagner chapter 1Wagner chapter 1
Wagner chapter 1
 
West Hollywood Residence Phase I
West Hollywood Residence   Phase IWest Hollywood Residence   Phase I
West Hollywood Residence Phase I
 
Les-Luthiers
Les-LuthiersLes-Luthiers
Les-Luthiers
 
Partb1 2
Partb1 2Partb1 2
Partb1 2
 
Zw3500 ab zw3510ab-3500c-3510c-zw3520b-3520c-zw3530-light-tower
Zw3500 ab zw3510ab-3500c-3510c-zw3520b-3520c-zw3530-light-towerZw3500 ab zw3510ab-3500c-3510c-zw3520b-3520c-zw3530-light-tower
Zw3500 ab zw3510ab-3500c-3510c-zw3520b-3520c-zw3530-light-tower
 
Erac presentation jan 10th 2011
Erac presentation jan 10th 2011Erac presentation jan 10th 2011
Erac presentation jan 10th 2011
 
Eco profile at youth for cause dialogue session 10 june 2011
Eco profile at youth for cause dialogue session 10 june 2011Eco profile at youth for cause dialogue session 10 june 2011
Eco profile at youth for cause dialogue session 10 june 2011
 
Russian
RussianRussian
Russian
 
Indian River Whole Child
Indian River Whole ChildIndian River Whole Child
Indian River Whole Child
 
Lisboa
LisboaLisboa
Lisboa
 
Prueba
PruebaPrueba
Prueba
 
Tsunami!
Tsunami!Tsunami!
Tsunami!
 
FALCK “Zonevorming, een uitdagende ontwikkeling
FALCK “Zonevorming, een uitdagende ontwikkelingFALCK “Zonevorming, een uitdagende ontwikkeling
FALCK “Zonevorming, een uitdagende ontwikkeling
 
BordBia
BordBiaBordBia
BordBia
 
I E E E 2009 Java Projects
I E E E 2009  Java  ProjectsI E E E 2009  Java  Projects
I E E E 2009 Java Projects
 
Building Primes
Building PrimesBuilding Primes
Building Primes
 

Similar to CHOReOS Web Services FISL Conference Brazil 2012

Everything you want to know about microservices
Everything you want to know about microservicesEverything you want to know about microservices
Everything you want to know about microservicesYouness Lasmak
 
Modular Web Applications With Netzke
Modular Web Applications With NetzkeModular Web Applications With Netzke
Modular Web Applications With Netzkenetzke
 
MongoDB.local Atlanta: Introduction to Serverless MongoDB
MongoDB.local Atlanta: Introduction to Serverless MongoDBMongoDB.local Atlanta: Introduction to Serverless MongoDB
MongoDB.local Atlanta: Introduction to Serverless MongoDBMongoDB
 
Day 4 - Cloud Migration - But How?
Day 4 - Cloud Migration - But How?Day 4 - Cloud Migration - But How?
Day 4 - Cloud Migration - But How?Amazon Web Services
 
James Turner (Caplin) - Enterprise HTML5 Patterns
James Turner (Caplin) - Enterprise HTML5 PatternsJames Turner (Caplin) - Enterprise HTML5 Patterns
James Turner (Caplin) - Enterprise HTML5 Patternsakqaanoraks
 
Node.js for enterprise - JS Conference
Node.js for enterprise - JS ConferenceNode.js for enterprise - JS Conference
Node.js for enterprise - JS ConferenceTimur Shemsedinov
 
MongoDB Stitch Introduction
MongoDB Stitch IntroductionMongoDB Stitch Introduction
MongoDB Stitch IntroductionMongoDB
 
HashiStack. To the cloud and beyond...
HashiStack. To the cloud and beyond...HashiStack. To the cloud and beyond...
HashiStack. To the cloud and beyond...Oleg Lobanov
 
Apache Samza 1.0 - What's New, What's Next
Apache Samza 1.0 - What's New, What's NextApache Samza 1.0 - What's New, What's Next
Apache Samza 1.0 - What's New, What's NextPrateek Maheshwari
 
Divide and Conquer – Microservices with Node.js
Divide and Conquer – Microservices with Node.jsDivide and Conquer – Microservices with Node.js
Divide and Conquer – Microservices with Node.jsSebastian Springer
 
Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...
Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...
Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...Codemotion
 
점진적인 레거시 웹 애플리케이션 개선 과정
점진적인 레거시 웹 애플리케이션 개선 과정점진적인 레거시 웹 애플리케이션 개선 과정
점진적인 레거시 웹 애플리케이션 개선 과정Arawn Park
 
Event Sourcing - what could possibly go wrong?
Event Sourcing - what could possibly go wrong?Event Sourcing - what could possibly go wrong?
Event Sourcing - what could possibly go wrong?Andrzej Ludwikowski
 
MongoDB.local Sydney: Evolving your Data Access with MongoDB Stitch
MongoDB.local Sydney: Evolving your Data Access with MongoDB StitchMongoDB.local Sydney: Evolving your Data Access with MongoDB Stitch
MongoDB.local Sydney: Evolving your Data Access with MongoDB StitchMongoDB
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJSYoann Gotthilf
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWAREFIWARE
 
MongoDB.local Paris Keynote
MongoDB.local Paris KeynoteMongoDB.local Paris Keynote
MongoDB.local Paris KeynoteMongoDB
 
Complex Event Processor 3.0.0 - An overview of upcoming features
Complex Event Processor 3.0.0 - An overview of upcoming features Complex Event Processor 3.0.0 - An overview of upcoming features
Complex Event Processor 3.0.0 - An overview of upcoming features WSO2
 

Similar to CHOReOS Web Services FISL Conference Brazil 2012 (20)

ChorUnit Fisl 12
ChorUnit Fisl 12ChorUnit Fisl 12
ChorUnit Fisl 12
 
Everything you want to know about microservices
Everything you want to know about microservicesEverything you want to know about microservices
Everything you want to know about microservices
 
Modular Web Applications With Netzke
Modular Web Applications With NetzkeModular Web Applications With Netzke
Modular Web Applications With Netzke
 
MongoDB.local Atlanta: Introduction to Serverless MongoDB
MongoDB.local Atlanta: Introduction to Serverless MongoDBMongoDB.local Atlanta: Introduction to Serverless MongoDB
MongoDB.local Atlanta: Introduction to Serverless MongoDB
 
Day 4 - Cloud Migration - But How?
Day 4 - Cloud Migration - But How?Day 4 - Cloud Migration - But How?
Day 4 - Cloud Migration - But How?
 
James Turner (Caplin) - Enterprise HTML5 Patterns
James Turner (Caplin) - Enterprise HTML5 PatternsJames Turner (Caplin) - Enterprise HTML5 Patterns
James Turner (Caplin) - Enterprise HTML5 Patterns
 
Node.js for enterprise - JS Conference
Node.js for enterprise - JS ConferenceNode.js for enterprise - JS Conference
Node.js for enterprise - JS Conference
 
Switch to Backend 2023
Switch to Backend 2023Switch to Backend 2023
Switch to Backend 2023
 
MongoDB Stitch Introduction
MongoDB Stitch IntroductionMongoDB Stitch Introduction
MongoDB Stitch Introduction
 
HashiStack. To the cloud and beyond...
HashiStack. To the cloud and beyond...HashiStack. To the cloud and beyond...
HashiStack. To the cloud and beyond...
 
Apache Samza 1.0 - What's New, What's Next
Apache Samza 1.0 - What's New, What's NextApache Samza 1.0 - What's New, What's Next
Apache Samza 1.0 - What's New, What's Next
 
Divide and Conquer – Microservices with Node.js
Divide and Conquer – Microservices with Node.jsDivide and Conquer – Microservices with Node.js
Divide and Conquer – Microservices with Node.js
 
Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...
Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...
Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...
 
점진적인 레거시 웹 애플리케이션 개선 과정
점진적인 레거시 웹 애플리케이션 개선 과정점진적인 레거시 웹 애플리케이션 개선 과정
점진적인 레거시 웹 애플리케이션 개선 과정
 
Event Sourcing - what could possibly go wrong?
Event Sourcing - what could possibly go wrong?Event Sourcing - what could possibly go wrong?
Event Sourcing - what could possibly go wrong?
 
MongoDB.local Sydney: Evolving your Data Access with MongoDB Stitch
MongoDB.local Sydney: Evolving your Data Access with MongoDB StitchMongoDB.local Sydney: Evolving your Data Access with MongoDB Stitch
MongoDB.local Sydney: Evolving your Data Access with MongoDB Stitch
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWARE
 
MongoDB.local Paris Keynote
MongoDB.local Paris KeynoteMongoDB.local Paris Keynote
MongoDB.local Paris Keynote
 
Complex Event Processor 3.0.0 - An overview of upcoming features
Complex Event Processor 3.0.0 - An overview of upcoming features Complex Event Processor 3.0.0 - An overview of upcoming features
Complex Event Processor 3.0.0 - An overview of upcoming features
 

More from choreos

CHOReOS Project Presentation at Solutions linux 2013
 CHOReOS Project Presentation at Solutions linux 2013 CHOReOS Project Presentation at Solutions linux 2013
CHOReOS Project Presentation at Solutions linux 2013choreos
 
CHOReOS presented @CeBIT 2013, Hannover, Germany
CHOReOS presented @CeBIT 2013, Hannover, GermanyCHOReOS presented @CeBIT 2013, Hannover, Germany
CHOReOS presented @CeBIT 2013, Hannover, Germanychoreos
 
@ OW2con' 12
 @ OW2con' 12 @ OW2con' 12
@ OW2con' 12choreos
 
Service deployer FISL 2013
Service deployer FISL 2013Service deployer FISL 2013
Service deployer FISL 2013choreos
 
CHOReOS presented at WiNNOVATE Conference April 2012
CHOReOS presented at WiNNOVATE Conference April 2012CHOReOS presented at WiNNOVATE Conference April 2012
CHOReOS presented at WiNNOVATE Conference April 2012choreos
 
CHOReOS European Project presented at OW2Con2011 in Paris
CHOReOS European Project presented at OW2Con2011 in ParisCHOReOS European Project presented at OW2Con2011 in Paris
CHOReOS European Project presented at OW2Con2011 in Parischoreos
 
CHOReOS European project presented to ANIKETOS project (part 2)
CHOReOS European project presented to ANIKETOS project (part 2)CHOReOS European project presented to ANIKETOS project (part 2)
CHOReOS European project presented to ANIKETOS project (part 2)choreos
 
CHOReOS European project presented to ANIKETOS project
CHOReOS European project presented to ANIKETOS projectCHOReOS European project presented to ANIKETOS project
CHOReOS European project presented to ANIKETOS projectchoreos
 
USP presentation of CHOReOS @ FISL Conference
USP presentation of CHOReOS @ FISL ConferenceUSP presentation of CHOReOS @ FISL Conference
USP presentation of CHOReOS @ FISL Conferencechoreos
 
Scaling choreographies for the internet of the future
Scaling choreographies for the internet of the futureScaling choreographies for the internet of the future
Scaling choreographies for the internet of the futurechoreos
 
OW2 A presentation pierre_chatel
OW2 A presentation pierre_chatelOW2 A presentation pierre_chatel
OW2 A presentation pierre_chatelchoreos
 

More from choreos (12)

CHOReOS Project Presentation at Solutions linux 2013
 CHOReOS Project Presentation at Solutions linux 2013 CHOReOS Project Presentation at Solutions linux 2013
CHOReOS Project Presentation at Solutions linux 2013
 
CHOReOS presented @CeBIT 2013, Hannover, Germany
CHOReOS presented @CeBIT 2013, Hannover, GermanyCHOReOS presented @CeBIT 2013, Hannover, Germany
CHOReOS presented @CeBIT 2013, Hannover, Germany
 
@ OW2con' 12
 @ OW2con' 12 @ OW2con' 12
@ OW2con' 12
 
Service deployer FISL 2013
Service deployer FISL 2013Service deployer FISL 2013
Service deployer FISL 2013
 
CHOReOS presented at WiNNOVATE Conference April 2012
CHOReOS presented at WiNNOVATE Conference April 2012CHOReOS presented at WiNNOVATE Conference April 2012
CHOReOS presented at WiNNOVATE Conference April 2012
 
CHOReOS European Project presented at OW2Con2011 in Paris
CHOReOS European Project presented at OW2Con2011 in ParisCHOReOS European Project presented at OW2Con2011 in Paris
CHOReOS European Project presented at OW2Con2011 in Paris
 
CHOReOS European project presented to ANIKETOS project (part 2)
CHOReOS European project presented to ANIKETOS project (part 2)CHOReOS European project presented to ANIKETOS project (part 2)
CHOReOS European project presented to ANIKETOS project (part 2)
 
CHOReOS European project presented to ANIKETOS project
CHOReOS European project presented to ANIKETOS projectCHOReOS European project presented to ANIKETOS project
CHOReOS European project presented to ANIKETOS project
 
USP presentation of CHOReOS @ FISL Conference
USP presentation of CHOReOS @ FISL ConferenceUSP presentation of CHOReOS @ FISL Conference
USP presentation of CHOReOS @ FISL Conference
 
Scaling choreographies for the internet of the future
Scaling choreographies for the internet of the futureScaling choreographies for the internet of the future
Scaling choreographies for the internet of the future
 
CHOReOS
CHOReOSCHOReOS
CHOReOS
 
OW2 A presentation pierre_chatel
OW2 A presentation pierre_chatelOW2 A presentation pierre_chatel
OW2 A presentation pierre_chatel
 

Recently uploaded

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Recently uploaded (20)

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

CHOReOS Web Services FISL Conference Brazil 2012

  • 1. ChoreUnit: Testing framework for Web Services Felipe Besson, Guilherme Nogueira, Leonardo Leite {besson, gmaio, leofl}@ime.usp.br Porto Alegre, July 2nd, 2011
  • 5. Web Services Message exchange standards (xml) among systems through Internet (http)
  • 6. Web Services - Applications ● Machine-machine communication 00111100 10111010 10111101 11110000
  • 7. Web Services - Applications ● Machine-machine communication ● Integrate heterogeneous systems
  • 8. Web Services - Applications ● Machine-machine communication ● Integrate heterogeneous systems ● Business automation Z z z z z z z Z Z Comprar
  • 9. Web Services - Applications ● Machine-machine communication ● Integrate heterogeneous systems ● Business automation Z z Service provider z z z z z Client Z Z Buy
  • 10. Web Services - Applications ● Machine-machine communication ● Integrate heterogeneous systems ● Business automation ● Data access WS
  • 11. Web Services - Applications ● Machine-machine communication ● Integrate heterogeneous systems ● Business automation ● Data access and creation (colaborative) WS
  • 12. Now: billions of web pages Future: billions of web services
  • 13. SOAP
  • 14. WSDL <?xml version="1.0" encoding="UTF-8"?> <definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://hello/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://hello/" name="HelloWorldService"> <types> <xsd:schema> <xsd:import namespace="http://hello/" schemaLocation="http://localhost:8080/hello?xsd=1"></xsd:import> </xsd:schema> </types> <message name="sayHelloTo"> <part name="parameter" element="tns:sayHelloTo"></part> </message> <message name="sayHelloToResponse"> <part name="parameter" element="tns:sayHelloToResponse"></part> </message> <portType name="HelloWorld"> <operation name="sayHelloTo"> <input message="tns:sayHelloTo"></input> <output message="tns:sayHelloToResponse"></output> </operation> </portType>
  • 15. Web Services Clients in Java ● Apache Axis2 ● Jax-WS (Java EE API)
  • 16. WS Client with Jax-WS ... <portType name="StoreWS"> <operation name="searchByArtist"> <input message="tns:searchByArtist"/> <output message="tns:searchByArtistResponse"/> </operation> <operation name="searchByGenre"> <input message="tns:searchByGenre"/> <output message="tns:searchByGenreResponse"/> </operation> <operation name="searchByTitle"> <input message="tns:searchByTitle"/> <output message="tns:searchByTitleResponse"/> </operation> <operation name="purchase"> <input message="tns:purchase"/> <output message="tns:purchaseResponse"/> </operation> </portType> ...
  • 17. WS Client with Jax-WS public interface Store { List<CD> searchByArtist(String artist); List<CD> searchByGenre(String genre); List<CD> searchByTitle(String title); Boolean purchase(CD cd, Customer customer); }
  • 18. WS Client with Jax-WS $wsimport -s src http://choreos.ime.usp.br/store?wsdl
  • 19. WS Client with Jax-WS $wsimport -s src http://choreos.ime.usp.br/store?wsdl ObjectFactory package-info StoreWS StoreWSService CD Customer SearchByGenre SearchByGenreResponse SearchByTitle SearchByTitleResponse SearchByArtist SearchByArtistResponse Purchase
  • 20. WS Client with Jax-WS StoreWSService service = new StoreWSService(); StoreWS store = service.getStoreWSPort(); List<CD> cds = store.searchByGenre("Rock");
  • 22. TDD Make test pass Write test Refactoring
  • 24. Stub creation can be a problem Process: %$#@ 1. create stubs 2. add classes to project 3. understand classes Developer Service interface changed!
  • 25. Problems when testing ● Tests must be almost completely rewritten ● Problem to integrate different services ● How to do TDD without stubs? %$#@
  • 26. Our Goals Make testing web services easy ● Interact with web services without stubs ● Easily validate the operation's responses ● Writing tests before the actual implementation ● Integrate tests and framework to the development environment
  • 28. Usage (1) WSClient – dinamic client // criation WSClient service = new WSClient (String wsdl); // Invoking an operation Item resposta = service.request (String operation, Item parameters);
  • 29. Usage (2) Item – recursive structure representing complex types <n s: g etP r od u ctB y N am eR esp on se> <n s:r Ietu rrn xsi:ty p e=”ax26:I tem od u ctB y N am e”, “S occer tem esp on se = w s.r equ est( “g etP r ”> <bar cod e>153</ bar cod e> cleat”); <br an d >ad id as</ br an d > <d escr ip tionr>A on se.g etC h ild ( “r etution;> I tem item = esp cleat</ d escr ip r n ”) I tem .g etN am e( ) ; => “r etu r n ” <n am e>S occer cleat</ n ame”) ; => “ax26:I tem ” I tem .g ettag A ttr ibu te( “xsi:ty p e> <p r ice>90.0</ p r ice> <spitem .g etC h ild( </ sp or t>.g etC on ten t( ) ; => “153” or t>soccer “bar code”) I tem .g etC h ild( “br an d ”) .g etC on ten t( ) ; => “adid as” </ n s:rtem .gretC h ild( “descr ip tion ”) .g etC on ten t( ) ; => “A cleat” I etu n > </ n s:g etP r od u ctB y N am eR esp on se> …
  • 31. Conclusion WSClient code is bigger! ● Is it really?? ● No, Jax-WS code uses stubs that were previously generated =P
  • 32. Demo
  • 33. Next steps ● Implement new features ● REST services support ● Integration test – Validate messages exchanged between services ● Experimentation
  • 34. Questions? This research has received finding from: More Information: http://ccsl.ime.usp.br/baile/VandV Repository: https://github.com/choreos/choreos_v-v/