Export (0) Print
Expand All

Schema Data Types

Visual Studio 2010

Updated: April 7, 2010

All FIM data types that begin with “xs:” or “xsd:” are standard XML types as defined by the W3C XML Schema. Examples include xsd:string and xsd:boolean. The data types used by the default FIM object schema are listed below. Modifications to schema object definitions and user-defined schema elements must use or extend these types.

Binary

This type contains Base64-encoded data (per W3C Standard XML Encryption Requirement) and is used to support binary data. The maximum length for this data type is 264 bytes. The FIM Binary data type uses base64Binary defined as XSD standard Base64Binary.

The following example defines a binary element named “Photo.”

<xsd:element name="Photo" type="xsd:base64Binary"/>

An instance of the “Photo” object might look like the following.

<rm:Photo>
  SomeBinary
</rm:Photo>

Boolean

Boolean values are represented in FIM with the XSD standard Boolean type. Multi-valued Boolean attributes are not supported.

The following example defines a Boolean element named “Localizable.”

<xsd:element name="Localizable" type="xsd:boolean"/>

DateTime

The format of the dateTime data type is: yyyy '-' mm '-' dd 'T' hh ':' mm ':' ss ('.' s+)?, in compliance with Universal Coordinate Time (UCT). The minimum allowed value for this is 1753-01-01T00:00:00. The type uses XSD standard dateTime type except that time zones are not supported and the smallest unit of time that is used is the millisecond. The parts of the data type are described below.

  • '-'? yyyy is a four-or-more digit optionally negative-signed numeral that represents the year. If the numeral is more than four digits, leading zeros are prohibited, and the value '0000' is prohibited. A plus sign is prohibited. The remaining dashes ('-') after the year are separators between parts of the dates; the first mm is a two-digit numeral that represents the month, and dd is a two-digit numeral that represents the day.

  • 'T' is a separator between the day and the time of day.

  • ':' is a separator between parts of the time-of-day portion of the datetime.

  • hh is a two-digit numeral that represents the hour. The value must be between 0 and 23. The second mm is a two-digit numeral that represents the minute. ss is a two-digit numeral that represents the number of whole seconds. ‘.’ s+ (if present) represents the fractional seconds. At most, 3 digits representing a fraction of a second is permitted in FIM.

The following example defines a dateTime element named “ExpirationTime.”

<xsd:element name="ExpirationTime" type="xsd:dateTime"/>

An instance of the “ExpirationTime” element might look like the following.

<rm:ExpirationTime>
  2007-12-31T23:59:59.502
</rm:ExpirationTime>

Integer

FIM uses the standard 64-bit XSD integer type.

The following example defines an integer element named “Age.”

<xsd:element name="Age" type="xsd:integer"/>

An instance of the “Age” element might look like the following.

<rm:Age>
  34
</rm:Age>

Reference

A reference data type is represented as a Microsoft standard globally unique identifier (GUID). The GUID extends the XSD standard string with the following restrictions: a reference type has a GUID format (shown in an example below) and links to either an existing object in the FIM Service database or itself.

When updating an object, the object has to exist and be valid for the update to be successful. When creating or updating an object, if the object has an attribute which contains a reference value, this reference has to refer to an existing object in the store. In FIM, a Reference attribute is never truly required in the object type.

The following example defines the schema for a GUID.

<xsd:schema 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:rm="http://schemas.microsoft.com/2006/11/ResourceManagement" 
  elementFormDefault="qualified" 
  targetNamespace="http://schemas.microsoft.com/2006/11/ResourceManagement">
  <xs:simpleType name="ReferenceType">
    <xs:restriction base="xs:string">
      <xs:pattern value="([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}"/>
    </xs:restriction>
  </xs:simpleType>
</xsd:schema>

The following example defines a string element named “Assistant.”

<xsd:element name="Assistant" type="rm:ReferenceType"/>

An instance of the “Assistant” element might look like the following.

<rm:Assistant>
  1C56ECCB-9215-4f3e-8F42-5DE3018F679E
</rm:Assistant>

String

The string data type extends the XSD standard string data type. Most strings used in FIM have a length restriction of 448 characters. Strings longer than 448 characters can also be stored in this data type, but only the first 448 characters will be indexed for searching.

The following example defines a string element named “Location.”

<xsd:element name="Location" type="xsd:string"/>

An instance of the “Location” element might look like the following.

<rm:Location>
  Building 42
</rm:Location>

CollectionType

In xsd representation of FIM schema, several collection types are used to express multi-valued attributes. The supported collection types are: StringCollectionType, TextCollectionType, DateTimeCollectionType, ReferenceCollectionType, IntegerCollectionType and BinaryCollectionType. Any Collection type can be viewed equivalent to adding an added attribute to the related element of maxOccurs=“unbounded.”

There is inconsistency in representation between the XSD schema from WS-GetMetadata endpoint and the wire representation. A StringCollectionType consists of multi-valued strings each of which is equal to or shorter than 448 characters. A TextCollectionType consists of multi-valued strings that don’t have length limitations.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft