1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

76
1 PART III - WEB SERVICES AND PART III - WEB SERVICES AND PRIMITIVE SOA PRIMITIVE SOA
  • date post

    18-Dec-2015
  • Category

    Documents

  • view

    215
  • download

    0

Transcript of 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

Page 1: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

1

PART III - WEB SERVICES AND PART III - WEB SERVICES AND PRIMITIVE SOAPRIMITIVE SOA

PART III - WEB SERVICES AND PART III - WEB SERVICES AND PRIMITIVE SOAPRIMITIVE SOA

Page 2: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

2

1. Web Services 1. Web Services FrameworkFramework

1. Web Services 1. Web Services FrameworkFramework

Page 3: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

3

Framework

• A technology framework is a collection of things. (objects)

• It can include – one or more architectures – technologies– concepts– models– sub-frameworks

Page 4: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

4

Web Services Framework (I)

• an abstract concept defined by standards organizations and implemented by (proprietary) technology platforms

• “core building blocks” that include Web services, service descriptions, and messages

• a communications agreement centered around service descriptions based on WSDL

• a messaging framework comprised of SOAP technology and concepts

Page 5: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

5

Web Services Framework (II)

• a service description registration and discovery architecture sometimes realized through UDDI

• a well-defined architecture that supports messaging patterns and compositions

• a second generation of Web services extensions (also known as the WS-* specifications) continually broadening

Page 6: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

6

Relazioni strutturali

Page 7: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

7

Punti chiave 3.1

• First- and second-generation technologies, along with design-agnostic concepts and implementation-neutral architectures, form form an abstract Web services frameworkan abstract Web services framework.

• The fundamentals of this framework are in alignment with the core characteristics of primitive SOA.

• First- and second-generation technologies, along with design-agnostic concepts and implementation-neutral architectures, form form an abstract Web services frameworkan abstract Web services framework.

• The fundamentals of this framework are in alignment with the core characteristics of primitive SOA.

Page 8: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

8

2. Services (as Web 2. Services (as Web services)services)

2. Services (as Web 2. Services (as Web services)services)

Page 9: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

9

Web Service classification

• a temporary classification based on the roles it assumes during the runtime processing of a message

• a permanent classification based on the application logic it provides and the roles it assumes within a solution environment

SERVICE ROLE

SERVICE MODELS

Page 10: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

10

Service roles

• A Web service is capable of assuming different roles,

depending on the context within which it is used.

• A service is therefore not labeled exclusively as a client

or server, but instead as a unit of software capable of

altering its role, depending on its processing

responsibility in a given scenario.

• It is not uncommon for a Web service to change its role

more than once within a given business task.

– It is especially not uncommon for a Web service within an SOA to

assume different roles in different business tasks.

Page 11: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

11

Service role : provider

• The Web service is invoked via an external source, such as a service requestor

• The Web service provides a published service description offering information about its features and behavior

Page 12: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

12

Service Role : requestor

• Any unit of processing logic capable of issuing a request

message that can be understood by the service provider

is classified as a service requestor.

– A Web service is always a service provider but also can act as

a service requestor.

• A Web service takes on the service requestor role under

the following circumstances:

a. The Web service invokes a service provider by sending it a

message [GO]

b. The Web service searches for and assesses the most suitable

service provider by studying available service descriptions

Page 13: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

13

Services swapping roles – Case Study 3.2.1

Page 14: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

14

Intermediaries

• Web services communication is based on the use of messaging paths because once a service provider submits a message, it can be processed by multiple intermediate routing and processing agents before it arrives at its ultimate destination.

• Web services and service agents that route and process a message after it is initially sent and before it arrives at its ultimate destination are referred to as intermediariesintermediaries or or intermediary servicesintermediary services.

• Because an intermediary receives and submits messages, it always transitions through service provider and service requestor roles [GO]

Page 15: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

15

Types of intermediaries

• passive intermediary, – is typically responsible for routing messages

to a subsequent location – It may use information in the SOAP message

header to determine the routing path, – Either way, what makes this type of

intermediary passive is that it does not modify the message.[GO]

Page 16: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

16

Active intermediaries

• Like passive intermediary services, active intermediaries also route messages to a forwarding destination.

• Prior to transmitting a message, however, these services actively process and alter the message contents – Typically, active intermediaries will look for particular

SOAP header blocks and perform some action in response to the information they find there.

– They almost always alter data in header blocks and may insert or even delete header blocks entirely [GO]

Page 17: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

17

Case Study 3.2.2

Passive Intermediary

After shipping a TLS order, RailCo's Invoice Submission Service transmits a message containing an electronic invoice. The first TLS Web service to receive the message is a passive intermediary called the Load Balancing Service. Its purpose is to provide load balancing logic by checking the current processing statistics of available TLS servers. When the server with the lowest usage is identified, this passive intermediary routes the message accordingly.Upon receiving the message from the Invoice Submission Service requestor, the passive Load Balancing intermediary acts as the service provider. After it has determined where the message is to be forwarded to, it changes its role to service requestor to forward the invoice document to the destination Accounts Payable Service provider.

Page 18: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

18

Case Study 3.2.3

Active Intermediary

TLS employs a number of active intermediaries. The Internal Policy Service, for

example, examines the message to determine whether it is subject to any

internal policy restrictions. If it is, the active intermediary inserts a new header

block containing one or more policy rules used by subsequent service providers.

As with the passive intermediary example, the active intermediary transitions

through service provider and service requestor roles before finally forwarding

the message to the appropriate TLS service provider.

Page 19: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

19

Initial sender and ultimate receiver

• Initial senders are simply service requestors that initiate the transmission of a message. – Therefore, the initial

sender is always the first Web service in a message path.

• The counterpart to this role is the ultimate receiver. – This label identifies service

providers that exist as the last Web service along a message's path

Page 20: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

20

Case Study 3.2.4

Expanding on the previous example that demonstrated the use of a passive intermediary, let's take a look at all the services involved in that message exchange. In this scenario, we had the RailCo Invoice Submission Service (acting as the service requestor) initiating the message transmission. By receiving the message, the Load Balancing intermediary acts as the service provider. Upon routing the message, the intermediary temporarily assumes the service requestor role and sends the message to the Accounts Payable Service, another service provider

These three physical services created four logical roles to complete two service requestor-to-service provider transmissions. There was, however, only one Web service that initiated the transmission. This was the Invoice Submission Service, and it is therefore considered the initial sender. Similarly, there was only one Web service that ended the overall activity, which makes the Accounts Payable Service the ultimate receiver.

Page 21: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

21

Service Composition

• This particular term does not apply to a single Web service, but to a composite relationship between a collection of services.

• Any service can enlist one or more additional services to complete a given task. Further, any of the enlisted services can call other services to complete a given sub-task. Therefore, each service that

participates in a composition assumes an individual role of service composition member [GO]

• The concept of service composability is very important to service-oriented environments

– In fact, service composition is frequently governed by WS-* composition extensions, such as WS-BPEL and WS-CDL, which introduce the related concepts of orchestration and choreography, respectively

Page 22: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

22

Case Study 3.2.5

When the TLS Accounts Payable Service receives an invoice, it invokes a

series of additional services to fully process the invoice contents:

It first uses the Vendor Profile Service to validate the invoice header data

and link the invoice document to a vendor account.

Next, the Accounts Payable Service extracts taxes and shipping fees and

directly logs all amounts into the appropriate A/P accounts.

Finally, the Accounts Payable Service passes the Ledger Service the

invoice total, which it uses to update the General Ledger.

Page 23: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

23

Service models

• The manner in which services are being utilized in the real world, though, has led to a classification based on the nature of the application logic they provide, as well as their business-related roles within the overall solution.

• These classifications are known as service models

Page 24: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

24

Business service model

• as fundamental building blocks for the representation of business logic

• to represent a corporate entity or information set

• to represent business process logic

• as service composition members

Page 25: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

25

Utility service model

• as services that enable the characteristic of reuse within SOA

• as services that promote the intrinsic interoperability characteristic of SOA

• as the services with the highest degree of autonomy

Page 26: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

26

Case Study 3.2.6

• In the examples we've gone through so far in this lesson, we've described eight Web services. Six of these are business services, while the other two are utility services, as follows:

– Accounts Payable Service = business service

– Internal Policy Service = utility service

– Invoice Submission Service = business service

– Ledger Service = business service

– Load Balancing Service = utility service

– Order Fulfillment Service = business service

– Purchase Order Service = business service

– Vendor Profile Service = business service

• The Load Balancing and Internal Policy Services are classified as utility services

because they provide generic functionality that can be reused by different types of

applications. The application logic of the remaining services is specific to a given

business task or solution, which makes them business-centric services.

Page 27: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

27

Controller Service Model

• to support and implement the principle of composability

• to leverage reuse opportunities

• to support autonomy in other services

Page 28: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

28

Case Study 3.2.6

In our previous example we demonstrated how the Accounts

Payable Service initiated and coordinated a service

composition consisting of two additional composition

members.

That would classify the Accounts Payable Service as a

controller service. The fact that we already labeled this

service as a business service does not conflict with this new

classification; a single service can be classified as more than

one service model

Page 29: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

29

Key points

• Web services can be labeled using temporary and permanent classifications.

• Temporary classifications relate to roles assumed by a service at runtime. • For example, an intermediary service can transition

through different roles while processing a message.• Service models refer to permanent classifications that

represent the logic housed by the service, as well as its role within the overall solution. • A service can belong to more than one service model.

• Web services can be labeled using temporary and permanent classifications.

• Temporary classifications relate to roles assumed by a service at runtime. • For example, an intermediary service can transition

through different roles while processing a message.• Service models refer to permanent classifications that

represent the logic housed by the service, as well as its role within the overall solution. • A service can belong to more than one service model.

Punti chiave 3.2

Page 30: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

30

3. Service descriptions 3. Service descriptions (with WSDL)(with WSDL)

3. Service descriptions 3. Service descriptions (with WSDL)(with WSDL)

Page 31: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

31

WSDL definitions enable loose coupling between services

Page 32: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

32

Case Study 3.3.1

Page 33: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

33

Service endpoints and description

• A WSDL describes the point of contact for a service provider, also known as the service service endpointendpoint or just endpointendpoint.

• Provides a formal definition of the endpoint interface – requestors wishing to communicate with the service

provider know exactly how to structure request messages

• Establishes the physical location (address) of the service.

Page 34: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

34

WSDL document

consisting of abstract and concrete parts that collectively describe a service endpoint

Page 35: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

35

Abstract description (I)

• Establishes the interface characteristics of the Web service without any reference to the technology used to host or enable a Web service to transmit messages.

• By separating this information, the integrity of the service description can be preserved regardless of what changes might occur to the underlying technology platform

Page 36: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

36

Abstract description (II)

• Parent portType section

– provides a high-level view of the service interface.

• Each operation represents a specific action performed by the service.

• An operation consists of a set of input and output messages.

– Much like component methods, operations also have input and output parameters. Because Web services rely exclusively on messaging-based communication, parameters are represented as messages.

Page 37: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

37

Concrete description (I)• For a Web service to be able to execute any of

its logic, it needs for its abstract interface definition to be connected to some real, implemented technology.

• Because the execution of service application logic always involves communication, the abstract Web service interface needs to be connected to a physical transport protocol.

• This connection is defined in the concrete description portion of the WSDL file, which consists of three related parts

Page 38: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

38

Concrete description (II)• binding describes the requirements for a service

to establish physical connections. – In other words, a binding represents one possible

transport technology the service can use to communicate.

– SOAP is the most common form of binding, but others also are supported.

– A binding can apply to an entire interface or just a specific operation.

• Related to the binding is the port, which represents the physical address at which a service can be accessed with a specific protocol.

– This piece of physical implementation data exists separately to allow location information to be maintained independently from other aspects of the concrete description.

– Within the WSDL language, the term service is used to refer to a group of related endpoints.

The term "port" is being renamed "endpoint" in version 2.0 of the WSDL specification

Page 39: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

39

Case Study 3.3.2

• The TLS Accounts Payable Service was created to receive invoices submitted by numerous vendors.

• Its associated service description therefore has a simple abstract description consisting of one interface definition that contains a single operation called SubmitInvoice.SubmitInvoice.

• Specified within the operation is one input and one output message. – The input message is responsible for accepting the invoice document

from a vendor service requestor (such as the RailCo Invoice Submission Service).

– The output message is used by the Accounts Payable Service to send a message of acknowledgement indicating that the submitted invoice document has been successfully received and that its contents are valid.

• The concrete part of this service description simply binds the operation to the SOAP protocol and provides a location address for the Accounts Payable Service.

Page 40: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

40

Metadata (I)• We've established that the abstract and concrete

descriptions provided by a WSDL definition express technical information as to how a service can be interfaced with and what type of data exchange it

supports. • WSDL definitions frequently rely on XSD schemas to

formalize the structure of incoming and outgoing messages.

• Another common supplemental service description document is a policy. – Policies can provide rules, preferences, and processing details

above and beyond what is expressed through the WSDL and XSD schema documents.

Page 41: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

41

Metadata (II)

• We have up to three separate documents that each describe an aspect of a service:– WSDL definition– XSD schema– Policy

• Each of these three service description documents can be classified as service service metadatametadata, as each provides information about the service.

Page 42: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

42

Service contracts

• Service description documents can be collectively viewed as establishing a service service contractcontract– a set of conditions that must

be met and accepted by a potential service requestor to enable successful communication

Page 43: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

43

Semantics Description

• provide sufficient semantic information in a structured manner so that, in some cases, service requestors can go as far as to evaluate and choose suitable service providers independently.

• greater importance when dealing with external service providers, where your knowledge of another party's service is limited to the information the service owner decides to publish.

• efforts are currently underway (primarily by the W3C) to continually extend the semantic information provided by service description documents

Page 44: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

44

Service description advertisement and discovery

• locate the latest versions of known service descriptions

• discover new Web services that meet certain criteria

When the initial set of Web services standards emerged, this eventuality was taken into account. This is why UDDI formed part of the first generation of Web services standards. Though not yet commonly implemented, UDDI provides us with a registry model worth describing.

Page 45: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

45

Service description locations centralized in a registry

These registries can be searched manually and accessed programmatically via a standardized API.

Page 46: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

46

Private and public registries

• Public registries accept registrations from any organizations, regardless of whether they have Web services to offer. – Once signed up, organizations acting as service

provider entities can register their services.

• Private registries can be implemented within organization boundaries to provide a central repository for descriptions of all services the organization develops, leases, or purchases.

Page 47: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

47

UDDI registry records (I)

• Business entities– Each public registry record consists of a

business entity containing basic profile information about the organization (or service provider entity).

– Included in this record are one or more business service areas, each of which provides a description of the services offered by the business entity.

• Business services may or may not be related to the use of Web services.

Page 48: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

48

UDDI registry records (II)

• Registry records store binding information in a separate area, called the binding template.– Each business service can reference one or more

binding templates. – The information contained in a binding template may

or may not relate to an actual service. (For example, a binding template may simply point to the address of a Web site. )

• If a Web service is being represented, then the binding template references a tModel. – The tModel section of a UDDI record provides

pointers to actual service descriptions

Page 49: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

49

Basic Structure of UDDI business entity record

Page 50: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

50

Case Study 3.3.3

At any given time there are several concurrent development and integration projects underway at TLS. Almost every project results in the creation of new services. Some are developed as part of service-oriented solutions, while others originate from legacy adapters and ancillary services appended to older distributed systems. The net result is a constantly growing pool of unmanaged services.After a year-end review of past development initiatives, it was discovered that several project teams had inadvertently built Web services with very similar functionality. To avoid a recurrence of redundant effort, a private registry was created . Project teams responsible for any currently active service descriptions were required to register their services in the registry (and this registration process became part of the standard development lifecycle from there on).

Page 51: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

51

Punti chiave 3.3

• The WSDL definition is divided into two parts: the abstract description that defines the service interface, and the concrete description that establishes the transport and location information.

• The two other primary service description documents are XSD schemas and policies.

• Service descriptions can be dynamically discovered by humans or applications, using private or public service registries.

• The WSDL definition is divided into two parts: the abstract description that defines the service interface, and the concrete description that establishes the transport and location information.

• The two other primary service description documents are XSD schemas and policies.

• Service descriptions can be dynamically discovered by humans or applications, using private or public service registries.

Page 52: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

52

4. MESSAGING 4. MESSAGING (with SOAP)(with SOAP)

4. MESSAGING 4. MESSAGING (with SOAP)(with SOAP)

Page 53: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

53

Messaging• All communication between services is message-based

, the messaging framework chosen must be standardized so that all services, regardless of origin, use the same format and transport protocol.

• The receipt of a message by a service is the most fundamental action within SOA and the sole action that initiates service-oriented automation messaging framework be extremely flexible and highly extensible.

• The SOAP specification was chosen to meet all of these requirements and has since been universally accepted as the standard transport protocol for messages processed by Web services.

Page 54: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

54

Simple Object Access Protocol SOAP

• SOAP specification's main purpose is to to define a standard message format. define a standard message format.

• The structure of this format is quite simple, but its ability to be extended and customized has positioned SOAP messaging as the driving force behind many of the most significant features of contemporary SOAs

Page 55: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

55

Basic Structure SOAP message (I)

• Every SOAP message is packaged into a container known as an envelopeenvelope.

• the envelope is responsible for housing all parts of the message

Page 56: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

56

Basic Structure SOAP message (II)

• Each message can contain a headerheader, an area dedicated to hosting meta information. – In most service-oriented solutions, this

header section is a vital part of the overall architecture, and though optional, it is rarely omitted.

• The actual message contents are hosted by the message bodybody, which typically consists of XML formatted data. – The contents of a message body are often

referred to as the message payload

Page 57: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

57

Header blocks• A primary characteristic of the SOAP communications framework is

an emphasis on creating messages that are as intelligence-heavy and self-sufficient as possible.

• Message independence is implemented through the use of header blocks

– packets of supplementary meta information stored in the envelope's header area.

– What this means is that through the use of header blocks, SOAP messages are capable of containing a large variety of supplemental information related to the delivery and processing of message contents.

– This alleviates services from having to store and maintain message-specific logic.

• Web services can be designed with generic processing functionality driven by various types of meta information the service locates in the header blocks of the messages it receives

Page 58: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

58

Header blocks suggestion

1. processing instructions that may be executed by service intermediaries or the ultimate receiver

2. routing or workflow information associated with the message

3. security measures implemented in the message

4. reliability rules related to the delivery of the message

5. context and transaction management information

6. correlation information (typically an identifier used to associate a request message with a response message)

Page 59: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

59

Case Study 3.4.1

• Invoices sent via SOAP messages to TLS are required to contain a number of standard header blocks for them to be accepted and processed by the TLS Accounts Payable Service.

• Specifically, the required header blocks include:

– A correlation identifier that conforms to a standard format and is further extended with a value derived from the date and time of the message transmission. The correlation identifier therefore relates the original submission to the eventual response.

– Organization-level security credentials used for authentication purposes. Each vendor has a security account with the TLS B2B system, and the assigned credentials are required with every message transmission.

Page 60: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

60

Attachments and Faults• SOAP attachment to facilitate requirements for

the delivery of data not so easily formatted into an XML document– Each provides a different encoding mechanism used to

bundle data in its native format with a SOAP message. – SOAP attachments are commonly employed to

transport binary files, such as images

• SOAP messages offer the ability to add exception handling logic by providing an optional fault section that can reside within the body area. – The typical use for this section is to store a simple

message used to deliver error condition information when an exception occurs.

Page 61: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

61

Case Study 3.4.2

• TLS accounting policy requires that all issued purchase orders in excess of $100,000 require the signature of a senior manager.

• Further, these purchase orders are not allowed to be issued in the standard electronic format, as the signature is required to be an ever-present part of the document. To accommodate this requirement, the Purchase Order Service was designed with an alternative operation.

• The accounting system currently used by TLS offers the ability to scan any accounting-related documents. The scanned images are archived on a separate server and linked to the corresponding accounting records via the archive image path.

• When PO cost totals exceed the $100,000 limit, a custom-developed extension to the accounting system invokes the alternative Purchase Order Service operation and passes it a copy of the signed PO document image.

• The service, in turn, generates a SOAP message in which the PO document image exists as a SOAP attachment

Page 62: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

62

Case Study 3.4.3

• The before mentioned SOAP message containing a SOAP attachment is also outfitted with a fault area housing exception information relating specifically to the attached data.

• Should the recipient of the SOAP message be unable to properly process the attachment or should the attachment encounter delivery problems, standard fault codes and descriptions are used to generate a response message that is returned to TLS.

Page 63: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

63

Nodes• Although Web services exist as self-

contained units of processing logic, they are reliant upon a physical communications infrastructure to process and manage the exchange of SOAP messages. – Every major platform has its own

implementation of a SOAP communications server

• In abstract, the programs that services use to transmit and receive SOAP messages are referred to as SOAP nodes

Page 64: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

64

Node types

Page 65: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

65

Message paths

• A message pathmessage path refers to the route taken by a message from when it is first sent until it arrives at its ultimate destination.

• Therefore, a message path consists of at least one initial sender, one ultimate one initial sender, one ultimate receiver, and zero or more receiver, and zero or more intermediaries intermediaries

Page 66: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

66

A message path consisting of three Web services

Page 67: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

67

a message path is sometimes not predetermined

Page 68: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

68

Case Study 3.4.4

• Revisiting our invoice submission scenario one last time, we can establish both logical and physical views of the path along which the invoice SOAP message travels.

• From a logical perspective, the message path is always the same. The RailCo Invoice Submission Service requestor acts as the initial sender and is therefore the starting point of the path.

• The first service provider the message encounters is the TLS Load Balancing intermediary. This service then becomes the next service requestor and forwards the message to the Accounts Payable Service provider.

• As the last service provider along the path, this Web service becomes the ultimate receiver. This establishes a logical message path consisting of three services.

• The corresponding SOAP message path is not as predictable. Because the Load Balancing Service will only decide which physical server to route a message to when it actually receives and processes the message, the ultimate SOAP receiver is not determined until runtime.

Page 69: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

69

Punti chiave 3.4

• The SOAP messaging framework satisfay the need for SOA's confidence on "independent units of communication," by supporting the creation of intelligence-heavy, document-style, and highly extensible messages.

• SOAP messaging establishes a standard message structure that includes an extensible header section used by numerous WS-* extensions to implement enterprise-level features.

• The SOAP node view of the Web services framework abstracts the physical communications framework, which consists of a series of SOAP servers.

• The SOAP messaging framework satisfay the need for SOA's confidence on "independent units of communication," by supporting the creation of intelligence-heavy, document-style, and highly extensible messages.

• SOAP messaging establishes a standard message structure that includes an extensible header section used by numerous WS-* extensions to implement enterprise-level features.

• The SOAP node view of the Web services framework abstracts the physical communications framework, which consists of a series of SOAP servers.

Page 70: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

70

Page 71: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

71

The sender of the request message is classified as a service requestor

( service consumer)

Page 72: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

72

The intermediary service transitions through service provider and service requestor roles while

processing a message.

Page 73: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

73

A passive intermediary service processing a message without altering its contents.

Page 74: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

74

An active intermediary service

Page 75: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

75

A service composition consisting of four members

Page 76: 1 PART III - WEB SERVICES AND PRIMITIVE SOA. 2 1. Web Services Framework.

76

A SOAP node transmitting a

SOAP message received by the service logic.