8 - Web Services Foundations Flashcards
What are Web Services and how to they differ from Middleware Technology?
Many definitions, but common aspects are: standardization, interface, components, interoperatibility, machine-to-machine interaction, internet protocols, discoverabiliy, XML
More suitable for B2B integration: middleware is logically centralized: interacting with systems of other companies require exposure of internal process (trust, autonomy, confidentiality, … )
- MIDW is focused on local network scenario, no global standards or interoperability
An implementation of SOA using XML, HTTP, and Web technology
Allow wrapper mechanism to incorporate legacy systems and middleware
Give an overview of the main ideas behind SOA
Provided distributed computing capabilities as services that work together in a standardized manner
- potentially residing under different ownership demands : B2B!
General goals of Web Services
Roles: service provider, requestor, and registry
Simple services are simple wrappers or servlets (etc.)
Complex services are built through choreography of smaller services (process/work flows)
What are the main services technologies on the Web and their purposes?
Description: WSDL for interfaces, DPEL for busines processes, UDDI/WS-Policy for properties and semantics
Discovery: repository of WS descriptions + API for interactions
Interaction: transport (HTTP), messaging (SOAP/WS-Security)
Composition: choreography, workflows
Give an overview of Web Service Architecture
WS wraps conventional middleware with internal web service middleware (mapping of operations) which can be accessed via a WS interface
External architecture is built by connecting internal architecture above with an external middleware
What are the main goals of SOAP?
XML message format for stateless communication (one-way): loosely coupled
- can also be used for RPC interactions (on top of basic one-way)
- protocol-independence: behind step to determine which protocol to use
What are the components of a SOAP envelope and their functionality
Header (optional): mechanism of extension, independent from message contents
- additional control information that can be attached to message
- used for application-specific info, as well as for generic (transaction, security, tracing)
- arbitrary XML defined in schema of header element
Body: actual message content encoded as XML elements: app-specific
Give an overview of the message processing model in SOAP
Nodes must follow specific action when they receive a message:
1) Check syntax and analyze SOAP-related parts (Attributes of envelop, header, and body)
- - Role: depending on roles attributed to node, specific header are processed (next, ultimate receiver)
- - Must Understand: node must be able to process its headers, fault generated if not possible
- - Relay: headers that must be forwarded if not processed by current node
2) Intermediaries: process, remove, and modify headers on the way from sender to receiver (standard SOAP encoding is usually used)
* Error handling: SOAP fault element placed in body of response message
Give an overview of SOAP data encoding
Simple types use atomic XML Schema values (Attribute XSI: type can be set in body’s elements)
For complex types, attribute encoding style is used: defines serialization rules
- Encoding rules based on XML schema for arrays, structures, …
How can SOAP be used to realize RPC?
Stateless, one-way model of SOAP can be combined to form request/response types of interaction
Parameters and return value are structured in XML elements (element-name = name of procedure / “Response” suffix on reply)
- Protocol binding specifies end point of request (HTTP is more natural for RPC: synchronous protocol).
What are the goals of WS-Addressing and how does it enhance SOAP?
Addressing and endpoint aspects are protocol-specific in SOAP
WS-Addressing places such information in message headers (standard, protocol independent)
- Provides additional capabilities: loss prevention, message identity, replyTo, EPR, Action
What are the goals of WSDL and its components?
Specify the interface / formal contract of services: allows documentation and automation
- operation, parameters, (similar to CORBA (DL)), access mechanism (SOAP), service location
- Allows different protocols and locations in the same interface
- Defines MEP for service
Abstract part: types, MEP, operations, interface (Set of operations)
Concrete part: binding (specific protocol and format implementing an interface), endpoint associated to bindings, service (collection of endpoints)
What is the functionality of import/include elements?
Modularize service definitions: parts of description can be split into documents (include) or shared between multiple descriptors (import)
Include required same target Namespace attribute of root element (description)
What are MEPs and how are they specified in WSDL?
Defines interaction process in terms of a sequence of one or more messages in a single operation: minimal, abstract contract (no types or binding specifics)
MEPs defined in WSDL
- in-bound: in-only, robust in-only, in-out, in-optional-out
- out-bound: out-only, robust out-only, out-in, out-optional-in (where to send: out of WSDL scope)
- Robust, Optional = fault message may be sent as reply (normally not given)
- In-out, out-in = fault message may replace a reply (since one must be given)
- Only: no fault messages
- new MEPs can be defined
What are the components of an Interface element?
A set of abstract operations
Interface can inherit from other interface (no overloading)
Operation = set of abstract messages
- References a MEP which defines interaction
- Types of input, output, in fault, out fault (schema types)
- Style (e.g. RPC) expected faults (schema type)
- RPC style: facilitates prog. language binding to WSDL: MEPs in-only and in-out
- rules for message schema: input and output are complex type with sequence
- input message name = op. name, output = op name + response
What are bindings in a WSDL description?
Non-abstracted part: (concrete) ways to format message in a specific protocol (message grammar)
Supports SOAP, HTTP, MIME (protocol of SOAP also defined)
Actual MEP can be specified (e.g. soap-response to implement in-out)