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 example demonstrates how these schemas should be inserted in an MPS Namespace:

<procedure name="DeleteMailbox" type="write" access="public" description="Delete a mailbox">
  <Schema name="inputSchema">
	<xs:schema xmlns="http://provisioning.microsoft.com/hostedexchange" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://provisioning.microsoft.com/hostedexchange" 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:all>
			<xs:element minOccurs="1" maxOccurs="1" name="path" type="xs:string">
			<xs:annotation>
				<xs:documentation>The LDAP path of a user object</xs:documentation>
				<xs:appinfo xmlns="http://provisioning.microsoft.com/examples">LDAP://CN=Johnc@AlpineSkiHouse.com,OU=AlpineSkiHouse,OU=ConsolidatedMessenger,OU=Hosting,DC=Fabrikam,DC=Com</xs:appinfo>
			</xs:annotation>
			</xs:element>
			<xs:element minOccurs="1" maxOccurs="1" name="preferredDomainController" type="xs:string">
			<xs:annotation>
				<xs:documentation>The name of the domain controller to use for this operation</xs:documentation>
				<xs:appinfo xmlns="http://provisioning.microsoft.com/examples">ad01.fabrikam.com</xs:appinfo>
			</xs:annotation>
			</xs:element>
		</xs:all>
		</xs:complexType>
	</xs:element>
	</xs:schema>
  </Schema>
  <Schema name="outputSchema">
	<xs:schema xmlns="http://provisioning.microsoft.com/hostedexchange" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://provisioning.microsoft.com/hostedexchange" 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 above example, do not return any data when called. In these cases an <Schema name="output"> should still be included and defined as an empty complex type.