Extensible Markup Language (XML) is a metalanguage used to describe data. XML documents have two parts, a prologue and a body. The prologue identifies the following information as XML; the body contains the data elements of the document.
XML allows us to create "tags" that have meaning to our business and use these tags to describe the data elements.
The prologue of our XML sample has the required opening <?xml> tag. This identifies it as an XML document and specifies that it conforms to the version 1.0 standard.
All of the elements in the body have "opening" tags and "closing" tags. All of the tags are nested.
Important: All XML tags are case-sensitive. <LastName> is not the same as <Lastname>.
The World Wide Web Consortium defines simple Object Access Protocol (SOAP) as follows:
A lightweight protocol for exchange of information in a decentralized, distributed environment. It is an XML based protocol that consists of three parts: an envelope that defines a framework for describing what is in a message and how to process it, a set of encoding rules for expressing instances of application-defined data types, and a convention for representing remote procedure calls and responses.
SOAP is a messaging format for sharing XML-based data. At its most basic, SOAP is a specialized set of XML tags that have a predefined meaning.
Why SOAP? XML by itself only describes data - SOAP describes what to do with the data. Not only is SOAP the standard for sharing XML data, it allows easier implementation of the communications necessary to access the Millennium SDK.
SOAP messages are always contained in an Envelope. The first items in the Envelope describe the XML Schema namespaces. Following this, the SOAP standard allows for a Header and a Body. The Body has the entries that tell the Millennium SDK Web Service how to process the request. The Header contains generic properties common to all Millennium SDK Web Service calls. You only need to define the SOAP Header once and then attach it to all subsequent calls to the Millennium SDK Web Service.
This may seem complicated, but by using a SOAP-enabled programming tool, you will be able to generate the SOAP message correctly.
To understand SOAP extensions, you must understand the communication protocol for SOAP messages. When a client invokes/calls the Millennium SDK Web Service, it sends a request serialized into a SOAP message over the network. On reaching the server side, this SOAP message is deserialized and the Millennium SDK Web Service reads the request from the client. Depending on the client request, the Millennium SDK Web Service performs the required operations and generates responses. This response serializes into a SOAP message at the server side and deserializes at the client side. Similarly, the SOAP message serializes at the server side and deserializes at the client side when the server sends a response to the client.

Thus, the SOAP message goes through a process of serialization and deserialization both at the client and the server side. The various stages of SOAP messages are available in the SOAPMessageStage enumeration. The members of the enumeration include:
BeforeDeserialize
AfterDeserialize
AfterSerialize
BeforeSerialize
With this basic understanding of the path that SOAP messages take, we will now look at SOAP Extensions.
When the HTTP request comes from the client, the aspnet_isapi.dll handles the request. The aspnet_isapi.dll calls the appropriate handler for web services and invokes the method. . It is during this stage where the SOAP Extension comes into picture. The SOAP Extension can access the SOAP message before and after calling the method. Millennium SDK uses SOAP Extensions. There are four extensions built for the server side and two for the client side that are running inside the Millennium.SDK.Client.SOAPClient object.
The two SOAP Extensions common to the Client and the Server are the Zipping Extension and the Encrypt Extension.
The Zipping Extension is the SOAP Extension responsible for zipping and unzipping the SOAP Message. This extension can compress SOAP messages sent over the wire down to nearly 1/20 of their original size. This extension uses the GZip format.
The Encrypt Extension is the SOAP Extension responsible for encrypting and decrypting the SOAP Message. This extension never uses the same encryption key. Instead, when the SOAP Client initially contacts the Millennium SDK they negotiate an encryption key for use during the entire life of the SOAP client object. If you close the SOAP client and use it again, the SOAP Client and the Millennium SDK negotiate a new encryption key.
The other two SOAP Extensions that can run on the server side are the Trace Extension and the Dump Extension.
The Trace Extension enables you to log all messages sent to the Millennium SDK Web Service along with the response messages returned to the SOAP client. These messages save to the trace.log file located in the directory where you installed the Millennium SDK. The trace.log file contains all the calls along to the Millennium SDK Web Service along with their parameters and what the Millennium SDK returned to the client.
The Dump Extension enables you to log the entire SOAP message along with the call parameters and the Millennium SDK response. This extension will do a dump of the entire SOAP message to a file named dump.log located in the directory where you installed the Millennium SDK.
To optimize performance, you should enable the Trace and the Dump SOAP Extensions during the development life cycle and disable them during the deployment life cycle.
Web services, in the general meaning of the term, are processes offered via the Internet. In a typical scenario, a business application sends a request to a service at a given URL using the SOAP protocol over HTTP. The service receives the request, processes it, and returns a response.