Embed XSD in an MPS Namespace

You can use the <xs:schema> element to embed an XML Schema Definition (XSD) in to an Microsoft Provisioning System (MPS) namespace. The schema for a procedure, once defined in its namespace, gets registered in the configuration database.

The following examples demonstrate how these schemas should be inserted in an MPS Namespace.

Input Schema
<Schema name="inputSchema">

	<xs:schema xmlns="http://provisioning.microsoft.com/hostedemail2007" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://provisioning.microsoft.com/hostedemail2007" xmlns:xs="http://www.w3.org/2001/XMLSchema">

		<xs:element name="executeData">

		<xs:annotation>

			<xs:documentation>Delete a user's mailbox.</xs:documentation>

		</xs:annotation>

		<xs:complexType>

			<xs:all>

			<xs:element name="preferredDomainController" type="xs:string">

				<xs:annotation>

				<xs:documentation>The domain controller to use for Active Directory actions.</xs:documentation>

				<xs:appinfo xmlns="http://provisioning.microsoft.com/examples">AD02-K2.Fabrikam.Com</xs:appinfo>

				</xs:annotation>

			</xs:element>

			<xs:element name="user" type="xs:string">

				<xs:annotation>

				<xs:documentation>Specifies the LDAP path of the user object to delete the mailbox from.</xs:documentation>

				<xs:appinfo xmlns="http://provisioning.microsoft.com/examples">LDAP://CN=User02@AlpineSkiHouse.com,OU=AlpineSkiHouse,OU=ConsolidatedMessenger,OU=Host,DC=Fabrikam,DC=Com</xs:appinfo>

				</xs:annotation>

			</xs:element>

			</xs:all>

		</xs:complexType>

		</xs:element>

		<xs:annotation>

		<xs:appinfo xmlns:di="http://provisioning.microsoft.com/ApiDocInfo">

			<di:ApiDocInfo>

			<di:Category>Mailbox</di:Category>

			<di:MinimumRole type="Implicit">UserCreators</di:MinimumRole>

			</di:ApiDocInfo>

		</xs:appinfo>

		</xs:annotation>

	</xs:schema>

	</Schema>

 


Output Schema
<Schema name="outputSchema">

	<xs:schema xmlns="http://provisioning.microsoft.com/hostedemail2007" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://provisioning.microsoft.com/hostedemail2007" xmlns:xs="http://www.w3.org/2001/XMLSchema">

		<xs:element name="executeData">

		<xs:annotation>

			<xs:documentation>The root data node</xs:documentation>

		</xs:annotation>

		<xs:complexType />

		</xs:element>

	</xs:schema>

	</Schema>

Some procedures, as shown in the Output Schema example, do not return any data when called. In these cases an <Schema name="outputSchema"> should still be included and defined as an empty complex type.

To learn more about creating custom namespaces, see Develop Custom Namespaces.