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, 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 10, Design Patterns and .NET 6 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...