6 - Web Services Flashcards

1
Q

Web Services

A

Web services are self-contained, modular, distributed, dynamic applications that can be described, published,
located, and invoked over the network to create products, processes, and supply chains. These applications can be local, distributed, or Web-based

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Benefits of using standardized Web technologies (XML, HTTP)

A
  • Interoperability and extensibility allow connectivity between software applications
  • Less dependency on networks, operating systems, and platforms
  • Ideal for connecting software applications
  • Coupling of Web services
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Hypertext Transfer Protocol (HTTP)

A

HTTP is a stateless application level protocol for distributed, collaborative, hypertext information systems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

HTTP Protocols are used for:

A
  • The communication and interaction with Web Services
  • For text based request responses
  • Data exchange over network based on rules
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Structure of HTTP Message (parts) (3)

A
  • The start line shows the requested method or response status
  • The optional message header consists out of name value pairs that describe additional arguments needed for data transmission
  • The optional message body carries the data payload

-> text-based request-response protocol for distributed information systems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

HTTPS

A

HTTP messages, that are encrypted for security

- Transport Layer Security (TLS) is used for encryption

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

HTTP - Process

A
  1. Client retrieves website with the address http://example.com/info from a Web server
  2. A HTTP request message is sent over a TCP/IP connection to the Web server associated with the domain example.com
  3. With info, the identified resource is accessed
  4. The Web site data is returned via a HTTP response message
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

HTTP - Request Message

A

Request Methods:

  • GET requests the resource’s representation
  • HEAD is identical to GET, but only returns the response message’s header
  • PUT stores payload data in a request body as a resource, specified by the given URI
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

HTTP - Response Message

A

The starting line of an HTTP Response contains:

  • The protocol version
  • A status code
  • A message indicating corresponding HTTP request status
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

HTTP status codes

A
  • Status code 200 with the message OK is the standard response if an operation was successful
  • Status code 301 with the message Moved Permanently states that the resource asked for, was moved to another URI
  • Status code 403 with the message Forbidden states that the client has no access rights
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

HTTP - Caching

A
  • One major advantage of HTTP is caching
  • Caching allows to satisfy large amounts of requests, that
    enables scalable Web services

Functionality:

  • Previous HTTP responses are stored
  • The stored responses answer future HTTP requests
  • This leads to a faster response
  • Caching works for common requests
  • It only works with methods, which do not modify the resource, like GET
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

XML

A

Extensible Markup Language, commonly abbreviated XML, describes a class of data objects called XML documents and partially describes the behavior of the computer programs which process them.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

XML Basic Document Structure

A

XML document forms a hierarchical tree structure consisting of XML nodes:

  • XML Element
  • XML Attribute
  • XML Comment
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

XML Element

A

Markup or content enclosed by a starting and ending tag (Only node that can have childnodes. They start with < and end with >)
Start- and Endtag: . . .

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

XML Attribute

A

Optional key-value pairs embedded in element tags

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

XML Comment

A

Text ignored by software processing XML documents

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Plain text file

A

Binary data must be additionally encoded.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

XML Document is well-formed if: (5)

A
  1. It contains only legal Unicode text
  2. It has a single root element
  3. Each tag is opened and closed
  4. Tags are correctly nested
  5. Elements have no duplicate attributes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

XML Tree: Parent, Child, and Sibling

A
  • Elements can have content, text or child elements
  • Example: The element has content. This content consists of six child elements
  • Vice versa, the element has the parent
  • Two child elements, with the same parent element, are siblings
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

XML Schema Definition (XSD)

A

XSD schema aims at defining and describing a class of XML documents via schema components to constrain and document the meaning, usage, and relationships of their constituent parts: datatypes, elements, as well as their content, attributes and values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Function of XSD

A
  • XML parse only accepts documents that comply with XML syntax rules
  • Besides correct syntax, there are additional rules documents have to fulfill
  • The XML schema definition specifies those additional rules
22
Q

Web Service Architecture - Example of a Service

A

Credit Card company’s service that checks a credit card number’s validity
-> repeatable business activity
The outcome is the assessment of the credit card
-> specific outcome, self contained
There is no information about which databases are accessed
-> black box

23
Q

Service Oriented Architecture (SOA)

A

Service Oriented Architecture (SOA) represents a set of principles and methodologies for designing and developing software in the form of interoperable
services. These services are well defined business functions that are built as software components i.e., discrete pieces of code and/or data structures that can
be reused for different.

24
Q

Service Provider

A

Hosts services, provides interfaces, allows service requester to access the service

25
Q

Service Broker

A

Registry which contains description of the service interface and other means necessary to access
the interface.

26
Q

Service Requester

A

Queries the broker’s repository to find a service offering with matching characteristics.

27
Q

Internal Web services architecture

A
  • uses conventional middleware concepts for accessing the underlying system’s internal operations and resources
  • operations and resource are performed through subsequent middleware layers
28
Q

External Web services architecture

A

middleware acting as a mediator between service providers and service consumers

29
Q

SOAP Web Services

A
messaging architecture and message formats based on the SOAP standard for web services
\+ High security
\+ Standardized approach
\+ Extensible functionality
- Requires more network bandwidth
- More complex interfaces
30
Q

Transport of SOAP messages

A

SOAP provides a mechanism, which allows to use any underlying transport protocol, for example HTTP

31
Q

SOAP Message Processing

A
  • Clients generate messages that are sent to Web services
  • Messages pass multiple intermediaries
  • A forward intermediary relays the message and can change headers
  • An active intermediary can change the body of a message
32
Q

SOAP Message Format

A

can be either a client request or a Web server response, is a valid XML document that uses the default SOAP envelope
-> SOAP header element (tag label Header) is optional and holds application specific information, like authentication and routing data
-> SOAP body element (tag label Body) is always mandatory, as it encloses the actual message content
-> Fault element: informs Web service clients about errors that occurred while transmitting or processing the
preceding service request

33
Q

SOAP Service Descriptions- Web Service Description Language (WSDL)

A
  • It is not necessary for clients to have any knowledge about the Web service’s actual implementation
  • Clients only need to know, what messages can be sent and what responses can be expected
  • This is stated in a WSDL file
  • A WSDL file is a XML document
34
Q

SOAP and WSDL provide (2)

A
  • Flexible XML based messaging infrastructure

- Standard service description method

35
Q

SOAP Types

A

Describe the complex data types a Web service
understands and uses to exchange data with its
clients

36
Q

SOAP Interface

A

Describes all operations that a Web service offers to

clients

37
Q

SOAP Binding

A

Necessary technical details clients require to access

interface operations

38
Q

SOAP Service

A

Specify the service’s name and defines endpoints

39
Q

REST

A

Representational State Transfer (REST) describes an architectural style for designing loosely coupled
applications over HTTP (RESTful = REST is used as basis for Web services)

40
Q

What are RESTful Web services

A
  • Build on the client server architecture pattern
  • Are inherently stateless and focused on providing basic read and write operations to the exposed resources
  • A resource can be any coherent and meaningful concept like structured data and texts
  • Clients usually interact with the resources’ representations
  • RESTful Web services can convert resources between different representational states
  • Clients do not have to differentiate between the resources’ actual formats and their representations
41
Q

Six Constraints of RESTful Web Services

A
  1. Built on the client server architecture pattern
  2. Provides a uniform communication interface
  3. Interactions with RESTful Web services are stateless
  4. Capability to cache server responses
  5. RESTful systems are layered
  6. RESTful Web services may provide downloadable code
42
Q
  1. Built on the client server architecture pattern
A
  • Client server architecture separates clients and servers and decouples user interface concerns from data storage and data processing concerns
  • Loose coupling allows each component to scale and evolve independently
  • Server provides access to information over an efficient and standardized interface
  • Client retrieves this information and presents it appropriately to users or other systems
  • Relies heavily on the provision of a reliable interface between components
43
Q
  1. Provides a uniform communication interface
A
  • RESTful Web services provide a uniform communication interface between components
  • Interfaces are typically implemented via URIs , which allow for accessing, creating, and manipulating server resources
  • Client requests and service responses are self descriptive and provide information to explain how requests and responses should be processed
  • The resulting communication simplification between components facilitates understanding interactions between components of a RESTful Web service
44
Q
  1. Interactions with RESTful Web services are stateless
A
  • The server neither stores client specific context information, nor maintains a persistent session state in the server
  • Therefore, all context specific and client specific information that are required must be included in the request
  • Example: when a Web service requires clients to authenticate themselves with a username and password, each client request must include the login credentials
45
Q
  1. Capability to cache server responses
A
  • RESTful systems have the capability to cache server responses in order to improve network efficiency, scalability, and performance
  • A response can be cached by a client and reused for consecutive equivalent requests without resending the request to the Web service
  • Consequently, cacheable responses require requests to be idempotent
46
Q
  1. RESTful systems are layered
A
  • RESTful systems consist of two or more component layers, including separate layers for clients and servers
  • Each component can only interact with the components of the layers immediately above or below it
  • This facilitates replacing and extending individual components, as resulting changes for other components will be limited to adjacent layers
47
Q
  1. RESTful Web services may provide downloadable code
A
  • RESTful Web services may provide downloadable code
  • A requesting application’s functionality can be extended via program code that is executed on the client system
  • Example: Extension for message decryption and encryption functionalities
    → Clients could download this extension from the Web service and invoke its functions locally to enable secure end to end communication with or over the Web service
  • RESTful Web services have little to no control over a client’s ability to actually execute the distributed program code
48
Q

RESTful Web Service Interactions

A
  • uniform interface design only provides basic operations for accessing and manipulating, i.e. creating, deleting, reading, and updating, resources
  • HTTP is, therefore, the preferred communication protocol for RESTful Web service interactions
49
Q

Format of unique URI’s used to identify each resource

A

:///< ResourceType>/

50
Q

Exposing RESTful Web Services

A
  • RESTful interactions are often generated and processed by the client via lightweight libraries
  • Web Application Description Language (WADL), which is a machine-readable XML variation for HTTP based Web services
51
Q

Characteristics of RESTful Web Services

A
  • Architectural style with six nonspecific constraints
  • Approach focuses on the resources’ representation
  • Interactions with RESTful Web services are stateless
  • Responses can be cached by the client
  • The Messages have a small message overhead
  • HTTP as transfer protocol
  • Message format is flexible (e.g., HTML, XML, JSON, plain text)
52
Q

Dis-/Advantages of RESTful Web Services

A

+ Scalable
+ Requires fewer resources
+ Requests cacheable

  • Less security and flexibility