SOAP web services
The Simple Object Access Protocol (SOAP) allows both one-way messages and answer/response messages. Communication can be both synchronous and asynchronous, 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 that we described in Chapter 11, Design Patterns and .NET 5 Implementation.
Messages are represented as XML documents called envelopes. Each envelope contains a header
, a body
, and a fault
element. The body
is where the actual content of the message is placed. The fault
element contains possible errors, so it is the way exceptions are exchanged when communication occurs. Finally, the header
contains any auxiliary information that enriches the protocol...