generating interface grammars from wsdl for automated verification of web services (talk @ icsoc...

139
Hallé, Hughes, Bultan, Alkhalaf Sylvain Hallé, Graham Hughes, Tevfik Bultan, Muath Alkhalaf Generating Interface Grammars from WSDL for Automated Verification of Web Services University of California Santa Barbara, USA

Upload: sylvain-halle

Post on 02-Jul-2015

404 views

Category:

Documents


0 download

DESCRIPTION

Using interface grammars to model the interface contract of a web service, we can automatically generate stubs and drivers to test and verify a web service client.

TRANSCRIPT

Page 1: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Sylvain Hallé, Graham Hughes,Tevfik Bultan, Muath Alkhalaf

Generating Interface Grammarsfrom WSDL for AutomatedVerification of Web Services

University of CaliforniaSanta Barbara, USA

Page 2: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

A motivating scenario

Page 3: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

A motivating scenario

Page 4: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

A motivating scenario

$

Page 5: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

A motivating scenario

?

Page 6: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

A motivating scenario

express checkoutexpress checkout

?

Page 7: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

A motivating scenario

express checkoutexpress checkout

!

Page 8: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

A motivating scenario

express checkoutexpress checkout

!

?

Page 9: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

A motivating scenario

express checkoutexpress checkout

Page 10: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

A motivating scenario

express checkoutexpress checkout

Page 11: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

A motivating scenario

express checkoutexpress checkout

Page 12: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

Page 13: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

PPPP

Page 14: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<SetExpressCheckoutRequest>

</SetExpressCheckoutRequest>

<PaymentDetails

</PaymentDetailsItem><PaymentAction> </PaymentAction>

</PaymentDetails>

> 1234 50 456 1 Sale

<Token> </Token><OrderTotal> </OrderTotal><PaymentDetailsItem><Number> </Number><Quantity> </Quantity>

PPPP

Page 15: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<SetExpressCheckoutRequest>

</SetExpressCheckoutRequest>

<PaymentDetails

</PaymentDetailsItem><PaymentAction> </PaymentAction>

</PaymentDetails>

> 1234 50 456 1 Sale

<Token> </Token><OrderTotal> </OrderTotal><PaymentDetailsItem><Number> </Number><Quantity> </Quantity>

<SetExpressCheckoutResponse>

</SetExpressCheckoutResponse> 1234<Token> </Token>

PPPP

Page 16: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<SetExpressCheckoutRequest>

</SetExpressCheckoutRequest>

<PaymentDetails

</PaymentDetailsItem><PaymentAction> </PaymentAction>

</PaymentDetails>

> 1234 50 456 1 Sale

<Token> </Token><OrderTotal> </OrderTotal><PaymentDetailsItem><Number> </Number><Quantity> </Quantity>

<SetExpressCheckoutResponse>

</SetExpressCheckoutResponse> 1234<Token> </Token>

<GetExpressCheckoutDetails>

</GetExpressCheckoutDetails>

1234 abcd<Token> </Token><PayerID> </PayerId>

PPPP

Page 17: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<SetExpressCheckoutRequest>

</SetExpressCheckoutRequest>

<PaymentDetails

</PaymentDetailsItem><PaymentAction> </PaymentAction>

</PaymentDetails>

> 1234 50 456 1 Sale

<Token> </Token><OrderTotal> </OrderTotal><PaymentDetailsItem><Number> </Number><Quantity> </Quantity>

<SetExpressCheckoutResponse>

</SetExpressCheckoutResponse> 1234<Token> </Token>

<GetExpressCheckoutDetails>

</GetExpressCheckoutDetails>

1234 abcd<Token> </Token><PayerID> </PayerId>

<GetExpressCheckoutDetailsResponse>

</GetExpressCheckoutDetailsResponse>

1234 abcd ...

<Token> </Token><PayerID> </PayerId><PaymentDetails> </PaymentDetails>

PPPP

Page 18: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<SetExpressCheckoutRequest>

</SetExpressCheckoutRequest>

<PaymentDetails

</PaymentDetailsItem><PaymentAction> </PaymentAction>

</PaymentDetails>

> 1234 50 456 1 Sale

<Token> </Token><OrderTotal> </OrderTotal><PaymentDetailsItem><Number> </Number><Quantity> </Quantity>

<SetExpressCheckoutResponse>

</SetExpressCheckoutResponse> 1234<Token> </Token>

<GetExpressCheckoutDetails>

</GetExpressCheckoutDetails>

1234 abcd<Token> </Token><PayerID> </PayerId>

<GetExpressCheckoutDetailsResponse>

</GetExpressCheckoutDetailsResponse>

1234 abcd ...

<Token> </Token><PayerID> </PayerId><PaymentDetails> </PaymentDetails>

<DoExpressCheckoutPaymentRequest>

</DoExpressCheckoutPaymentRequest>

1234 abcd Sale

<Token> </Token><PayerID> </PayerId><PaymentAction> </PaymentAction>

PPPP

Page 19: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<SetExpressCheckoutRequest>

</SetExpressCheckoutRequest>

<PaymentDetails

</PaymentDetailsItem><PaymentAction> </PaymentAction>

</PaymentDetails>

> 1234 50 456 1 Sale

<Token> </Token><OrderTotal> </OrderTotal><PaymentDetailsItem><Number> </Number><Quantity> </Quantity>

<SetExpressCheckoutResponse>

</SetExpressCheckoutResponse> 1234<Token> </Token>

<GetExpressCheckoutDetails>

</GetExpressCheckoutDetails>

1234 abcd<Token> </Token><PayerID> </PayerId>

<GetExpressCheckoutDetailsResponse>

</GetExpressCheckoutDetailsResponse>

1234 abcd ...

<Token> </Token><PayerID> </PayerId><PaymentDetails> </PaymentDetails>

<DoExpressCheckoutPaymentRequest>

</DoExpressCheckoutPaymentRequest>

1234 abcd Sale

<Token> </Token><PayerID> </PayerId><PaymentAction> </PaymentAction>

<DoExpressCheckoutPaymentResponse>

</DoExpressCheckoutPaymentResponse>

1234 7890

<Token> </Token><PaymentInfo>

</PaymentInfo><TransactionID> </TransactionId>

PPPP

Page 20: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<SetExpressCheckoutRequest>

</SetExpressCheckoutRequest>

<PaymentDetails

</PaymentDetailsItem><PaymentAction> </PaymentAction>

</PaymentDetails>

> 1234 50 456 1 Sale

<Token> </Token><OrderTotal> </OrderTotal><PaymentDetailsItem><Number> </Number><Quantity> </Quantity>

<SetExpressCheckoutResponse>

</SetExpressCheckoutResponse> 1234<Token> </Token>

<GetExpressCheckoutDetails>

</GetExpressCheckoutDetails>

1234 abcd<Token> </Token><PayerID> </PayerId>

<GetExpressCheckoutDetailsResponse>

</GetExpressCheckoutDetailsResponse>

1234 abcd ...

<Token> </Token><PayerID> </PayerId><PaymentDetails> </PaymentDetails>

<DoExpressCheckoutPaymentRequest>

</DoExpressCheckoutPaymentRequest>

1234 abcd Sale

<Token> </Token><PayerID> </PayerId><PaymentAction> </PaymentAction>

<DoExpressCheckoutPaymentResponse>

</DoExpressCheckoutPaymentResponse>

1234 7890

<Token> </Token><PaymentInfo>

</PaymentInfo><TransactionID> </TransactionId>

PPPPMany ways to make the exchange fail

Page 21: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

PPPPMany ways to make the exchange fail

Page 22: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<SetExpressCheckoutRequest>

<Name> </Name>

</SetExpressCheckoutRequest>

<PaymentDetails>

<FooBar> </FooBar> </PaymentDetails>

1234 50 John Doe ...

bazbaz

<Token> </Token><OrderTotal> </OrderTotal><CustomerAddress>

</CustomerAddress>

PPPPMany ways to make the exchange fail

Page 23: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<SetExpressCheckoutRequest>

<Name> </Name>

</SetExpressCheckoutRequest>

<PaymentDetails>

<FooBar> </FooBar> </PaymentDetails>

1234 50 John Doe ...

bazbaz

<Token> </Token><OrderTotal> </OrderTotal><CustomerAddress>

</CustomerAddress>

PPPPMany ways to make the exchange fail

Page 24: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<SetExpressCheckoutRequest>

<Name> </Name>

</SetExpressCheckoutRequest>

<PaymentDetails>

<FooBar> </FooBar> </PaymentDetails>

1234 50 John Doe ...

bazbaz

<Token> </Token><OrderTotal> </OrderTotal><CustomerAddress>

</CustomerAddress>

PPPPMany ways to make the exchange fail

Page 25: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<SetExpressCheckoutRequest>

<Name> </Name>

</SetExpressCheckoutRequest>

<PaymentDetails>

<FooBar> </FooBar> </PaymentDetails>

1234 50 John Doe ...

bazbaz

<Token> </Token><OrderTotal> </OrderTotal><CustomerAddress>

</CustomerAddress>

PPPP

unexpectedelement

Many ways to make the exchange fail

Page 26: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<SetExpressCheckoutRequest>

<Name> </Name>

</SetExpressCheckoutRequest>

<PaymentDetails>

<FooBar> </FooBar> </PaymentDetails>

1234 50 John Doe ...

bazbaz

<Token> </Token><OrderTotal> </OrderTotal><CustomerAddress>

</CustomerAddress>

PPPP

PaymentActionmissing

Many ways to make the exchange fail

Page 27: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<SetExpressCheckoutRequest>

<Name> </Name>

</SetExpressCheckoutRequest>

<PaymentDetails>

<FooBar> </FooBar> </PaymentDetails>

1234 50 John Doe ...

bazbaz

<Token> </Token><OrderTotal> </OrderTotal><CustomerAddress>

</CustomerAddress>

PPPPMany ways to make the exchange

1. Messagewith wrong

fail

structure

PaymentActionmissing

Page 28: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

PPPPMany ways to make the exchange fail

Page 29: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<SetExpressCheckoutRequest>

<Number> </Number><Quantity> </Quantity>

</SetExpressCheckoutRequest>

<PaymentDetails>

</PaymentDetailsItem> <PaymentAction> </PaymentAction> </PaymentDetails>

<Token> </Token> <OrderTotal> </OrderTotal> <PaymentDetailsItem> 5

123450

4 61

Sale

PPPPMany ways to make the exchange fail

Page 30: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<SetExpressCheckoutRequest>

<Number> </Number><Quantity> </Quantity>

</SetExpressCheckoutRequest>

<PaymentDetails>

</PaymentDetailsItem> <PaymentAction> </PaymentAction> </PaymentDetails>

<Token> </Token> <OrderTotal> </OrderTotal> <PaymentDetailsItem> 5

123450

4 61

Sale

<SetExpressCheckoutResponse>

</SetExpressCheckoutResponse> 5678<Token> </Token>

PPPPMany ways to make the exchange fail

Page 31: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<SetExpressCheckoutRequest>

<Number> </Number><Quantity> </Quantity>

</SetExpressCheckoutRequest>

<PaymentDetails>

</PaymentDetailsItem> <PaymentAction> </PaymentAction> </PaymentDetails>

<Token> </Token> <OrderTotal> </OrderTotal> <PaymentDetailsItem> 5

123450

4 61

Sale

<SetExpressCheckoutResponse>

</SetExpressCheckoutResponse> 5678<Token> </Token>

PPPPMany ways to make the exchange fail

Page 32: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<SetExpressCheckoutRequest>

<Number> </Number><Quantity> </Quantity>

</SetExpressCheckoutRequest>

<PaymentDetails>

</PaymentDetailsItem> <PaymentAction> </PaymentAction> </PaymentDetails>

<Token> </Token> <OrderTotal> </OrderTotal> <PaymentDetailsItem> 5

123450

4 61

Sale

<SetExpressCheckoutResponse>

</SetExpressCheckoutResponse> 5678<Token> </Token>

PPPPMany ways to make the exchange fail

Page 33: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<SetExpressCheckoutRequest>

<Number> </Number><Quantity> </Quantity>

</SetExpressCheckoutRequest>

<PaymentDetails>

</PaymentDetailsItem> <PaymentAction> </PaymentAction> </PaymentDetails>

<Token> </Token> <OrderTotal> </OrderTotal> <PaymentDetailsItem> 5

123450

4 61

Sale

<SetExpressCheckoutResponse>

</SetExpressCheckoutResponse> 5678<Token> </Token>

PPPP

should beequal

Many ways to make the exchange fail

Page 34: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<SetExpressCheckoutRequest>

<Number> </Number><Quantity> </Quantity>

</SetExpressCheckoutRequest>

<PaymentDetails>

</PaymentDetailsItem> <PaymentAction> </PaymentAction> </PaymentDetails>

<Token> </Token> <OrderTotal> </OrderTotal> <PaymentDetailsItem> 5

123450

4 61

Sale

<SetExpressCheckoutResponse>

</SetExpressCheckoutResponse> 5678<Token> </Token>

PPPP

should beequal

Many ways to make the exchange

2. Messagewith goodstructure

fail

Page 35: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<SetExpressCheckoutRequest>

<Number> </Number><Quantity> </Quantity>

</SetExpressCheckoutRequest>

<PaymentDetails>

</PaymentDetailsItem> <PaymentAction> </PaymentAction> </PaymentDetails>

<Token> </Token> <OrderTotal> </OrderTotal> <PaymentDetailsItem> 5

123450

4 61

Sale

<SetExpressCheckoutResponse>

</SetExpressCheckoutResponse> 5678<Token> </Token>

PPPP

should beequal

Many ways to make the exchange

2. Messagewith goodstructure but

values

fail

wrong

Page 36: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

PPPPMany ways to make the exchange fail

Page 37: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<DoExpressCheckoutPaymentRequest>

</DoExpressCheckoutPaymentRequest>

1234 abcd Sale

<Token> </Token><PayerID> </PayerId><PaymentAction> </PaymentAction>

PPPPMany ways to make the exchange fail

Page 38: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<DoExpressCheckoutPaymentRequest>

</DoExpressCheckoutPaymentRequest>

1234 abcd Sale

<Token> </Token><PayerID> </PayerId><PaymentAction> </PaymentAction>

PPPPMany ways to make the exchange fail

Page 39: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<DoExpressCheckoutPaymentRequest>

</DoExpressCheckoutPaymentRequest>

1234 abcd Sale

<Token> </Token><PayerID> </PayerId><PaymentAction> </PaymentAction>

PPPPMany ways to make the exchange fail

Page 40: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<DoExpressCheckoutPaymentRequest>

</DoExpressCheckoutPaymentRequest>

1234 abcd Sale

<Token> </Token><PayerID> </PayerId><PaymentAction> </PaymentAction>

PPPP

the first occurrenceof a token must be ina SetExpressCheckoutrequest

Many ways to make the exchange fail

Page 41: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<DoExpressCheckoutPaymentRequest>

</DoExpressCheckoutPaymentRequest>

1234 abcd Sale

<Token> </Token><PayerID> </PayerId><PaymentAction> </PaymentAction>

PPPP

the first occurrenceof a token must be ina SetExpressCheckoutrequest

Many ways to make the exchange

3. Messagewith goodstructure andgood values

fail

Page 42: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<DoExpressCheckoutPaymentRequest>

</DoExpressCheckoutPaymentRequest>

1234 abcd Sale

<Token> </Token><PayerID> </PayerId><PaymentAction> </PaymentAction>

PPPP

the first occurrenceof a token must be ina SetExpressCheckoutrequest

Many ways to make the exchange

3. Messagewith goodstructure andgood valuesin the wrong

fail

sequence

Page 43: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

<DoExpressCheckoutPaymentRequest>

</DoExpressCheckoutPaymentRequest>

1234 abcd Sale

<Token> </Token><PayerID> </PayerId><PaymentAction> </PaymentAction>

PPPP

the first occurrenceof a token must be ina SetExpressCheckoutrequest

Many ways to make the exchange

3. Messagewith goodstructure andgood valuesin the wrong

fail

sequence

???

Page 44: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

???

Page 45: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

More concretely

???

Page 46: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

We want to do, ...as automatically as possible

Proposed solution

Page 47: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

We want to do, ...as automatically as possible

Proposed solution

Page 48: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

We want to do, ...as automatically as possible

...impersonate the client, send test sequences to the service

Proposed solution

Page 49: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

We want to do, ...as automatically as possible

...impersonate the client, send test sequences to the service

DRIVER

Proposed solution

Page 50: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

We want to do, ...as automatically as possible

...impersonate the client, send test sequences to the service

! Check if service does what we expect/understand

DRIVER

Proposed solution

Page 51: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

We want to do, ...as automatically as possible

...impersonate the client, send test sequences to the service

! Check if service does what we expect/understand

DRIVER

� �

Proposed solution

Page 52: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

We want to do, ...as automatically as possible

...impersonate the client, send test sequences to the service

! Check if service does what we expect/understand

...impersonate the service, generate responses to the client

DRIVER

� �

Proposed solution

Page 53: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

We want to do, ...as automatically as possible

...impersonate the client, send test sequences to the service

! Check if service does what we expect/understand

...impersonate the service, generate responses to the client

DRIVER STUB

� �

Proposed solution

Page 54: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

We want to do, ...as automatically as possible

...impersonate the client, send test sequences to the service

! Check if service does what we expect/understand

...impersonate the service, generate responses to the client

! Environment closedmodel checking possibleÞ

DRIVER STUB

� �

Proposed solution

Page 55: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Related work

Page 56: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Related work

Stub/driver

Page 57: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Related work

Structure

Stub/driver

Constraints

Values

Sequence

Page 58: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Related work

Structure

Stub/driver

Constraints

Values

Sequence

Page 59: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Related work

Structure

Stub/driver

Constraints

Values

Sequence

soapUI with "mock web services"

Page 60: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Related work

Structure

Stub/driver

Constraints

Values

Sequence

Java API for XML Web Services; IBM Web Service Validation Tool (validation only)

Page 61: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Related work

Structure

Stub/driver

Constraints

Values

Sequence

Cacciagrano et al., WS-FM 2006(validation only)

Page 62: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Related work

Structure

Stub/driver

Constraints

Values

Sequence

Bai et al., SOSE 2005Bartolini et al., ICSOC 2008

Page 63: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Related work

Structure

Stub/driver

Constraints

Values

Sequence

Hallé & Villemaire, CAV 2009(validation only)

Page 64: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Related work

Structure

Stub/driver

Constraints

Values

Sequence

Hughes & Bultan, ISSTA 2007

Page 65: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Related work

Structure

Stub/driver

Constraints

Values

Sequence

Hughes & Bultan, AFM 2007

Page 66: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Related work

Structure

Stub/driver

Constraints

Values

Sequence

Hughes & Bultan, TAV-WEB 2008

Page 67: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Related work

Structure

Stub/driver

Constraints

Values

Sequence

The present paper

Page 68: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Tool architecture

Page 69: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Tool architecture

Control-flowconstraints

Page 70: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Tool architecture

Interfacegrammar

Control-flowconstraintsG

Page 71: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Tool architecture

WSDL

Interfacegrammar

Control-flowconstraintsG

Page 72: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Tool architecture

WSDL

Interfacegrammar

Control-flowconstraintsTranslator G

Page 73: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Tool architecture

WSDL

Interfacegrammar

Control-flowconstraintsTranslator G

Page 74: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Tool architecture

WSDL

Interfacegrammar

Control-flowconstraintsTranslator

Interfacecompiler

G

Page 75: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Tool architecture

WSDL

Interfacegrammar

Control-flowconstraints

Servicedriver

Translator

Interfacecompiler

G

Page 76: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Tool architecture

WSDL

Interfacegrammar

Control-flowconstraints

Servicedriver

Translator

Interfacecompiler

G

Page 77: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Tool architecture

WSDL

Interfacegrammar

Control-flowconstraints

Servicedriver

Serverstub

Translator

Interfacecompiler

G

Page 78: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Tool architecture

WSDL

Interfacegrammar

Control-flowconstraints

Servicedriver

Serverstub

Translator

Interfacecompiler

G

Page 79: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Tool architecture

WSDL

Interfacegrammar

Control-flowconstraints

Servicedriver

Serverstub

Translator

Interfacecompiler

automated

G

Page 80: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Tool architecture

WSDL

Interfacegrammar

Control-flowconstraints

Servicedriver

Serverstub

Translator

Interfacecompiler

automated

G

Page 81: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Recall: grammar

Interface grammar

Page 82: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Recall: grammar

Interface grammar

A login S | S login®B logout S | S logout®

S A B | e®

Page 83: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Recall: grammar

Interface grammar

production rule

A login S | S login®B logout S | S logout®

S A B | e®

Page 84: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Recall: grammar

Interface grammar

production rule

start symbol

A login S | S login®B logout S | S logout®

S A B | e®

Page 85: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Recall: grammar

Interface grammar

production rule

start symbolnonterminal

A login S | S login®B logout S | S logout®

S A B | e®

Page 86: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Recall: grammar

Interface grammar

production rule

start symbolnonterminal

terminal

A login S | S login®B logout S | S logout®

S A B | e®

Page 87: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Recall: grammar

Interface grammar

production rule

start symbolnonterminal

terminal

empty symbol

S A B | e®A login S | S login®B logout S | S logout®

Page 88: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Recall:

Sufficient to express : "every login can be matched

to exactly one logout in the future"

grammar

control-flowconstraints

Interface grammar

production rule

start symbolnonterminal

terminal

empty symbol

S A B | e®A login S | S login®B logout S | S logout®

Page 89: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Two uses for the grammar:

1. that a given sequence belongs to that grammarCheck

Interface grammar

What about login login logout logout ?

SA B

login S Blogin A B B

...login login logout logout

S A B | e®A login S | S login®B logout S | S logout®

Page 90: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Two uses for the grammar:

2. sequences belonging to that grammarGenerate

Interface grammar

S A B | e®A login S | S login®B logout S | S logout®

SA B

login S Blogin B

...login logout

Page 91: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Interface grammar

DRIVER

Page 92: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Interface grammar

G

DRIVER

Page 93: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Interface grammar

G

DRIVER

?

Page 94: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Interface grammar

G

DRIVER

1

Page 95: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Interface grammar

G

DRIVER

1

Page 96: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Interface grammar

G

DRIVER

2

Page 97: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Interface grammar

G

DRIVER

2

?2 ÎG

Page 98: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Interface grammar

G

DRIVER

2

üû/

Page 99: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Interface grammar

G

STUB

Page 100: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Interface grammar

G

STUB

1

Page 101: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Interface grammar

G

STUB

1

?1 ÎG

Page 102: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Interface grammar

G

STUB

1

üû/

Page 103: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Interface grammar

G

STUB

?

1

Page 104: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Interface grammar

G

STUB

1

2

Page 105: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Interface grammar

G

STUB

2

2

Page 106: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Interesting consequence:

We use the same grammar for:

! Checking messages! Generating messages

Both to produce:

! A stub! A driver

G

Interface grammar

G

Page 107: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Sufficient to express : "every login can be matched

to exactly one logout in the future"

control-flowconstraints

Interface grammar

S A B | e®A login S | S login®B logout S | S logout®

Page 108: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Sufficient to express : "every login can be matched

to exactly one logout in the future"

control-flowconstraints

Interface grammar

S A B | e®A login S | S login®B logout S | S logout®

Page 109: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Extensions to classical grammar

Interface grammar

S A B | e®A login S | S login®B logout S | S logout®

Page 110: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Extensions to classical grammar

Interface grammar

®A(x) !login(x) S | S !login(x)®B(x) !logout(x) S | S !logout(x)®

int(x) A(x) B(x) | eS

int(x) ááx=0ññ | ááx=1ññ | ...®

Page 111: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Extensions to classical grammar

Interface grammar

®A(x) !login(x) S | S !login(x)®B(x) !logout(x) S | S !logout(x)®

argument

int(x) A(x) B(x) | eS

int(x) ááx=0ññ | ááx=1ññ | ...®

Page 112: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Extensions to classical grammar

Interface grammar

®A(x) !login(x) S | S !login(x)®B(x) !logout(x) S | S !logout(x)®

argument

the same x

int(x) A(x) B(x) | eS

int(x) ááx=0ññ | ááx=1ññ | ...®

Page 113: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Extensions to classical grammar

Interface grammar

®A(x) !login(x) S | S !login(x)®B(x) !logout(x) S | S !logout(x)®

argument

the same x

®

checks that x is an intgenerates an int x

int(x) A(x) B(x) | eS

int(x) ááx=0ññ | ááx=1ññ | ...®

Page 114: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Extensions to classical grammar

Interface grammar

®A(x) !login(x) S | S !login(x)®B(x) !logout(x) S | S !logout(x)®

argumentsemantic predicate

semantic action

the same x

®

checks that x is an intgenerates an int x

int(x) A(x) B(x) | eS

int(x) ááx=0ññ | ááx=1ññ | ...®

Page 115: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Extensions to classical grammar

Sufficient to express control-flow : "every login with argument x

can be matched to exactly one logout withargument x in the future"

and valueconstraints

Interface grammar

®A(x) !login(x) S | S !login(x)®B(x) !logout(x) S | S !logout(x)®

argumentsemantic predicate

semantic action

the same x

®

checks that x is an intgenerates an int x

int(x) A(x) B(x) | eS

int(x) ááx=0ññ | ááx=1ññ | ...®

Page 116: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Example: generate a sequence

Interface grammar

®A(x) !login(x) S | S !login(x)®B(x) !logout(x) S | S !logout(x)®

® int(x) A(x) B(x) | e

Sint(x) A(x) B(x)

A(1) B(1)!login(1) S B(1)

!login(1) S !logout(1)!login(1) int(x) A(x) B(x) !logout(1)

S

int(x) ááx=0ññ | ááx=1ññ | ...®

Page 117: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Example: generate a sequence

Sint(x) A(x) B(x)

A(1) B(1)!login(1) S B(1)

!login(1) S !logout(1)!login(1) int(x) A(x) B(x) !logout(1)

Interface grammar

®A(x) !login(x) S | S !login(x)®B(x) !logout(x) S | S !logout(x)®

® int(x) A(x) B(x) | eS

int(x) ááx=0ññ | ááx=1ññ | ...®

Page 118: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Interfacegrammar

Control-flowconstraints

Servicedriver

Serverstub

Interfacecompiler

Interface grammar

G

Page 119: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Interfacegrammar

Control-flowconstraints

Servicedriver

Serverstub

Interfacecompiler

Interface grammar

G

Page 120: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Interfacegrammar

Control-flowconstraints

Servicedriver

Serverstub

Interfacecompiler

Interface grammar

still missingmessage structure

G

Page 121: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

We have production rules to check/generate data types...

primitive

Interface grammar

®A(x) !login(x) S | S !login(x)®B(x) !logout(x) S | S !logout(x)®

® int(x) A(x) B(x) | eS

int(x) ááx=0ññ | ááx=1ññ | ...®

Page 122: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

We have production rules to check/generate data types...

How can we get similar rules for data types?

primitive

composite

Interface grammar

®A(x) !login(x) S | S !login(x)®B(x) !logout(x) S | S !logout(x)®

® int(x) A(x) B(x) | eS

int(x) ááx=0ññ | ááx=1ññ | ...®

!login(x) áá???ññ®

Page 123: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

We have production rules to check/generate data types...

How can we get similar rules for data types?

primitive

composite

Interface grammar

®A(x) !login(x) S | S !login(x)®B(x) !logout(x) S | S !logout(x)®

® int(x) A(x) B(x) | eS

int(x) ááx=0ññ | ááx=1ññ | ...®

!login(x) áá???ññ®WSDL

Page 124: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

From WSDL to interface grammar rules

WSDL provides a (machine-readable) definition of a message's structure

Page 125: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

From WSDL to interface grammar rules

WSDL provides a (machine-readable) definition of a message's structure

Short-hand notation: (MSL; Brown et al., WWW 2001)

Model Schema Language

SetExpressCheckoutRequest[ Token[ ] , PaymentDetails[ OrderTotal[ ], PaymentDetailsItem[ Number[ ], Quantity[ ] ] ]]

string

int

intint

{0,1}

{1,8}{0,8}

Page 126: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

From WSDL to interface grammar rules

WSDL provides a (machine-readable) definition of a message's structure

Short-hand notation: (MSL; Brown et al., WWW 2001)

Model Schema Language

<SetExpressCheckoutRequest>

</SetExpressCheckoutRequest>

<PaymentDetails

</PaymentDetailsItem><PaymentAction> </PaymentAction>

</PaymentDetails>

> 1234 50 456 1 Sale

<Token> </Token><OrderTotal> </OrderTotal><PaymentDetailsItem><Number> </Number><Quantity> </Quantity>

SetExpressCheckoutRequest[ Token[ ] , PaymentDetails[ OrderTotal[ ], PaymentDetailsItem[ Number[ ], Quantity[ ] ] ]]

string

int

intint

{0,1}

{1,8}{0,8}

Page 127: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

We build a (recursive) mapping p from MSL constructs to sets of production rules

Example:

Mapping for other MSL constructs: see the paper (straightforward)

From WSDL to interface grammar rules

p[[Element[e] ]] ={0,1}

® ááx=nullññ |ááx=new Element();ññ

Element(x)È p[[e(x)]]{ }

Page 128: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Interfacegrammar

Control-flowconstraintsG

®A(x) !login(x) S | S !login(x)®B(x) !logout(x) S | S !logout(x)®

® int(x) A(x) B(x) | eS

int(x) ááx=0ññ | ááx=1ññ | ...®

From WSDL to interface grammar rules

Page 129: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Interfacegrammar

Control-flowconstraintsG

WSDL

®A(x) !login(x) S | S !login(x)®B(x) !logout(x) S | S !logout(x)®

® int(x) A(x) B(x) | eS

int(x) ááx=0ññ | ááx=1ññ | ...®

From WSDL to interface grammar rules

Page 130: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Interfacegrammar

Control-flowconstraintsG

WSDL(MSL)

®A(x) !login(x) S | S !login(x)®B(x) !logout(x) S | S !logout(x)®

® int(x) A(x) B(x) | eS

int(x) ááx=0ññ | ááx=1ññ | ...®

From WSDL to interface grammar rules

Page 131: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Interfacegrammar

Control-flowconstraintsG

WSDL(MSL)

Translator

®A(x) !login(x) S | S !login(x)®B(x) !logout(x) S | S !logout(x)®

® int(x) A(x) B(x) | eS

int(x) ááx=0ññ | ááx=1ññ | ...®

From WSDL to interface grammar rules

Page 132: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Interfacegrammar

Control-flowconstraints

®A(x) !login(x) S | S !login(x)®B(x) !logout(x) S | S !logout(x)®

® int(x) A(x) B(x) | eS

int(x) ááx=0ññ | ááx=1ññ | ...®

WSDL(MSL)

Translator G

® ááx=new Login();ññ logininside(x,y)!login(x)

® ááy=new UserId(); x.userId=y;ññ...

logininside(x,y)

From WSDL to interface grammar rules

Page 133: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

Interfacegrammar

Control-flowconstraints

®A(x) !login(x) S | S !login(x)®B(x) !logout(x) S | S !logout(x)®

® int(x) A(x) B(x) | eS

int(x) ááx=0ññ | ááx=1ññ | ...®

WSDL(MSL)

Translator G

® ááx=new Login();ññ logininside(x,y)!login(x)

® ááy=new UserId(); x.userId=y;ññ...

logininside(x,y)

From WSDL to interface grammar rules

Page 134: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

® ááx=new Login();ññ logininside(x,y)!login(x)

From WSDL to interface grammar rules

Java code, classesprovided by Apache Axis

Page 135: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

We extracted interface grammars for two real-world web services:

Experimental results

E-Commerce ServiceExpress Checkout

Page 136: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

We extracted interface grammars for two real-world web services:

Java/Axis driver generated test sequences to the actual service

Experimental results

E-Commerce ServiceExpress Checkout

Page 137: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

We extracted interface grammars for two real-world web services:

Java/Axis driver generated test sequences to the actual service

Pair Java client/Java stub model checked with Java Pathfinder

Experimental results

E-Commerce ServiceExpress Checkout

Page 138: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

! Driver message generation time: 1 sec./message! Typical test sequence: ! Found between implementation and

documentation

! Multiple contract violations found in sample client using Java Pathfinder

! Maximum checking time: / memory! Found between impl. and doc. with driver

5 seconds2 mismatches

20 sec. 43 MB2 mismatches

Experimental results

Page 139: Generating Interface Grammars from WSDL for Automated Verification of Web Services (Talk @ ICSOC 2009)

Hallé, Hughes, Bultan, Alkhalaf

1. Long-running WS interactions involve constraints overmessage , and

2. We developed interface grammars to model these constraintsin a uniform notation

3. Using the same IG, we can generate a service and a client to perform model checking / test

generation

4. We tested the approach with two real-worldWS and found betweendocumentation and implementation

structure values sequence

automaticallystub driver

mismatches

Take-home points