BizTalk & DSML

Monday, December 19, 2005

Need to interact with Active Directory (or other LDAP source) through your BizTalk implementation?

One option to be able to do this is to use Directory Service Markup Language (DSML).
DSML is a XML-based langaguge which allows you to interact with a LDAP source, such as Active Directory. You can (among other things) add, delete, update and query your directory source just as within the System.DirectoryServices namespace.

The advantage of using DSML over the System.DirectoryServices namespace is that you can go directly from an XML structure to another XML structure (through a transformation map) within your BizTalk orchestration, while if going through the the System.DirectoryServices namespace you are required you to go from
XML Message -> .NET object -> XML Message by calling an external assembly from the orchestration.


An example DSML Add message looks like this:

<addRequest dn="CN=Alice,OU=HR,DC=Example,DC=COM">
   <attr name="objectclass"><value>top</value></attr>
   <attr name="objectclass"><value>person</value></attr>
   <attr name="objectclass"><value>organizationalPerson</value></attr>
   <attr name="sn"><value>Johnson</value></attr>
   <attr name="givenName"><value>Alice</value></attr>
   <attr name="title"><value>Software Design Engineer</value></attr> 
</addRequest>


Microsoft has released a DSML Service (DSML Standard v2.0) for Windows which runs as a Windows Service and exposes a web service interface. It comes with some good coding examples and a Web based console to directly execute DSML against the service.
The service can further be secured through certificates to prevent unauthorised access.


Links:

DSML Services for Windows

DSML v2.0 Documentation

XML Schema for DSML

Posted by Marcus Rosen at 8:35 PM  

1 comments:

I am new to Directory Service Markup Language so do not have much exprience.The code you provide is really helpful.Although I understand what it does it will really be a great help if you can give brief explanation.Thanks.

2:26 PM  

Post a Comment