We saw in our previous post how to get a specific person. If you don’t exactly know which person you want, you instead need to enumerate objects from ILM. ILM exposes a WS-Enumeration endpoint which enables you specify a filter query and then page over results. We described the WS-Enumeration protocol a bit more in Topic 6.
To enumerate over each person object in ILM we must pass a filter that only returns person objects. To do this we specify the XPath expression “/Person”. For those with .NET backgrounds, think of this expression as syntactically similar to the expression you would pass to XmlNode.SelectNodes(String). ILM supports modest filters compared to XmlNode, but even with simple rules you can construct very useful results. For example, to get the administrator person, one way is to use the expression “/Person[DisplayName=’Administrator’]”. Unfortunately fully describing the filter language is beyond the scope of this particular post, and for now we suggest trial and error or reading the MSDN page above for information on XPath expressions. If there is enough demand we may cover this topic later.
Let’s get to the code:
That’s it! The next steps are to construct business-relevant queries and do something with the objects you get back.
In our next post we’ll use the enumeration client to construct a useful view of ILM’s schema.