SOAP web services
The Simple Object Access Protocol (SOAP) allows both one-way messages and request/reply messages. Communication can be both synchronous and asynchronous, as explained in Chapter 1, Understanding the Importance of Software Architecture, and Chapter 2, Non-Functional Requirements, but if the underlying protocol is synchronous, such as in the case of HTTP, the sender receives an acknowledgment saying that the message was received (but not necessarily processed). When asynchronous communication is used, the sender must listen for incoming communications. Often, asynchronous communication is implemented with the Publisher/Subscriber pattern, which we described in Chapter 6, Design Patterns and .NET 8 Implementation.
Messages are represented as XML documents called envelopes. Each envelope contains header
, body
, and fault
elements. The body
is where the actual content of the message is placed. The fault
element contains possible errors, so it is the way exceptions...