Information Technology Reference
In-Depth Information
webService ”http://example.org/bookService”
nonFunctionalProperties
dc#title hasValue ”Example Book Buying Service”
dc#description hasValue ”A simple example Web service for adding items to a shopping cart”
endNonFunctionalProperties
importsOntology ”http://example.org/bookOntology”
capability
sharedVariables { ?cartId , ?item }
precondition
definedBy
?cartId memberOf string and ?item memberOf book.
postcondition
definedBy
forall ?cart ( ?cart [ id hasValue ?cartId ] memberOf cart implies
?cart [items hasValue ?item]) .
Listing 7.2. A WSML Web service description
its prestates and poststates 3 using logical expressions; the interfaces describe
how to interact with the service. Additionally, WSML allows one to specify
nonfunctional properties of a Web service. Listing 7.2 describes a simple Web
service for adding items to a shopping cart.
Capabilities
Preconditions and assumptions describe the state before the execution of
a Web service. While preconditions describe conditions on the information
space, i.e. conditions on the input, assumptions describe conditions on the
current state of the world which, cannot necessarily be directly checked. Post-
conditions describe the relation between the input and the output, for example
a credit card limit with respect to its value before the execution of the service.
In this sense, postconditions describe the information state after execution of
the service. Effects describe changes in the real world caused by the service,
for example the physical shipment of goods. The sharedVariables construct is
used to identify variables which are shared between the preconditions and
postconditions and between the assumptions and effects. Shared variables can
be used to refer to the same input and output values in the conditions of
the capability. In the service described in Listing 7.2, given a shopping cart
identifier and a number of items, the items are added to the shopping cart
with this identifier.
Interfaces
Interfaces describe how to interact with a service from the requester's point of
view ( choreography ) and how the service interacts with the other services and
goals that it needs to fulfill in order to fulfill its function from the provider's
point of view ( orchestration ). Choreography and orchestration descriptions are
3 “Prestate” and “poststate” refer to the state before and after, respectively, the
execution of the Web service.
Search WWH ::




Custom Search