Directory Services

SOAP Request and Response Binding

The SOAP Request and Response binding method uses SOAP to bind to a server. SOAP is a lightweight protocol for data exchange in a distributed environment and consists of:

SOAP therefore defines the XML format for messages. For example, if you have a well-formed XML fragment consisting of a DSML V2 document enclosed in a pair of SOAP elements, you have a SOAP message.

This implementation of SOAP request/response binding uses HTTP 1.1 and HTTPS 1.1 as a transport for DSML V2 requests and responses. The version of SOAP used for this binding is SOAP 1.1.

The following illustration shows the data flow for a DSML V2 request and response.

DSML-SOAP flow diagram

In the preceding illustration, a client makes a request using the SOAP (XML) over HTTP protocol. That request goes to a server running IIS, where it is routed to a DMSL V2 ISAPI extension. There, it is converted to LDAP commands, which are sent on to the directory services. The response occurs in a reverse fashion, with the response returning to the client via the SOAP over HTTP response.

Every SOAP request and response must have an envelope element that contains a body element, and a body element that contains the DSML V2 payload. The following code example shows the general form of a SOAP message.

		All SOAP header elements go here
		The DMSL 2.0 payload (document) goes here

The <Envelope> and <Body> elements are required, but the <Header> element is optional. For more information about the SOAP specification, see and Using DSML Services for Windows.

The following code example shows a request/response message sequence.

ccc<!--  **** DSMLv2 Request ****** --> 
<se:Envelope xmlns:se="">
   <se:Body xmlns:dsml="urn:oasis:names:tc:DSML:2:0:core">
		 <modifyRequest> … </modifyRequest>
		 <addRequest> … </addRequest>

<!--  **** DSMLv2 Response ****** -->
<soap:Envelope xmlns:soap=""
	<batchResponse xmlns="urn:oasis:names:tc:DSML:2:0:core"
		 <modifyResponse> … </modifyResponse>
		 <addResponse> … </addResponse>

In the preceding example, be aware of the following: