Directory Programming .NET

Active Directory and ADAM programming support for .NET developers
Welcome to Directory Programming .NET Sign in | Join | Help
in Search

Starting Directory Services Markup Language (DSML) project, advice welcome

Last post 03-04-2011, 11:56 AM by Guillo. 6 replies.
Sort Posts: Previous Next
  •  09-24-2007, 2:14 AM 1714

    Starting Directory Services Markup Language (DSML) project, advice welcome

    I like the idea of DSML but I've not find any examples of its use in the .net world. Any experiences with it, pitfalls, general advice?

     

  •  09-24-2007, 10:06 AM 1716 in reply to 1714

    Re: Starting Directory Services Markup Language (DSML) project, advice welcome

    DSML is programmed with System.DirectoryServices.Protocols in .NET.  It uses a provider mechanism to provide an abstraction over the LDAP API where you configure based on your connection choice whether you want to use TCP/IP-based LDAP or DSML. 

    I haven't used DSML much, nor do I know anyone who has, but if it works for your scenario, then this should get you where you are going.

    If you have TCP/IP connectivity to the directory itself in addition to connectivity to the DSML server, I definitely would not bother with DSML and would go straight for LDAP.  In either case, .NET S.DS.P should give you essentially the same programming model.

  •  09-24-2007, 4:38 PM 1725 in reply to 1716

    Re: Starting Directory Services Markup Language (DSML) project, advice welcome

    The reason I'm looking to use DSML is to provide a LDIF style mechanism to be notified of changes.  So rather than talk to an LDAP server using DSML I want the server to talk to me in DSML. It seems easier to process than LDIF, given the obvious advantages and support of XML. Does this sound like a crazy idea?

  •  09-24-2007, 6:27 PM 1727 in reply to 1725

    Re: Starting Directory Services Markup Language (DSML) project, advice welcome

    Well, I won't call your idea crazy, but that is not the first choice I would make if I needed to discover changes to the directory.  :)

    I'd suggest using the DirSync control, either with S.DS or S.DS.P to do a polling-based approach (this is what most people do) or if you really really need callbacks, look at doing change notifications using S.DS.P directly. 

    We have some DirSync samples in ch 5 of the book that you can grab from the code downloads.

    Honestly, I don't have any idea if a DSML server would have the notion of a change notification, as that would essentially be like the web server calling the client instead of the other way around.  That's just not how web servers usually work.  DSML is at the root an HTTP/SOAP based translation of LDAP operations.

  •  09-25-2007, 3:51 AM 1731 in reply to 1727

    Re: Starting Directory Services Markup Language (DSML) project, advice welcome

    Thanks Joe, it was my original intention to use the DirSync control however, I'm now trying to kill a number of birds with one stone.

    1. The application needs to work without a connected directory server (not allowed to use ADAM for now)

    2. The application is directory agnostic, both in terms of the technology and the schema

    The DSML idea becomes attractive because I can publish a location to dump files to (or a web service) ala Biztalk integration and these files are XML DSML. Therefore the application can maintain its own subset of data (I know that flies in the face of centrally stored data but they're my specs) and I can publish a contract/schema that other system admins can use. This means that if a sys admin is in charge of some wierd and wonderful directory it becomes their job to extract the changes rather than mine ;). I will give the DirSync chapter another read though now I've gone a bit further down this avenue.

    I take your point about the original intention of DSML but I'm hoping I can bastardize it to more easily support integration of changes (hope being the operative word).

  •  09-25-2007, 9:40 AM 1735 in reply to 1731

    Re: Starting Directory Services Markup Language (DSML) project, advice welcome

    All I can say at this point is good luck!  I don't think there is any standard mechanism across platforms for LDAP change notification or sync, so I think that may be difficult to build in a directory-agnostic way.  DirSync and LDAP change notifications are MS extensions.

    I also don't know if every directory out there supports DSML.  I know the MS directories do to some extent (although I don't know how well maintained the DSML server for Windows is).

    I can see why it would be nice to get the LDAP data munged into XML automatically though.

    In the case of S.DS.P, I'm not sure if it ever gives you the raw XML.  Its API goal is to make the XML transparent to the programmer so that you can switch back and forth between LDAP TCP and DSML under the hood and maintain the same object-based programming model.

    You might end up being happier issuing your own HTTP calls, although that will likely be fairly difficult as there is no WSDL support in DSML, so you have to craft your SOAP calls by hand.

    Hopefully you'll find a way to move forward that works for you.

  •  03-04-2011, 11:56 AM 8954 in reply to 1714

    Re: Starting Directory Services Markup Language (DSML) project, advice welcome

    I did as Joe described in his first post, though I have since turned to SPML for this exact same use.

    Chicago Translation Services | English to Spanish Translation
View as RSS news feed in XML