Example XML Response
MPS XML Response in string format (some parts omitted for
brevity):
<response>
<data>
<preferredDomainController>AD01-Wh.fabrikam.Com</preferredDomainController>
<container>LDAP://OU=Hosting,DC=fabrikam,DC=Com</container>
<name>KrakHeRes01</name>
<org path="LDAP://ou=KrakHeRes01,OU=Hosting,DC=fabrikam,DC=Com" name="KrakHeRes01">
<otherWellKnownObjects>
<obj wkName="ThisOrganizationRoot" name="LDAP://ou=KrakHeRes01,ou=Hosting,DC=fabrikam,DC=com">
</obj>
<obj wkName="ForeignOwnerOrg" name="LDAP://ou=Hosting,DC=fabrikam,DC=com">
</obj>
<obj wkName="OrgType" name="LDAP://cn=reseller,cn=WatOrgTypes,cn=_Private,ou=Hosting,DC=fabrikam,DC=com">
</obj>
<obj wkName="UserCreators" name="LDAP://cn=Admins@KrakHeRes01,ou=KrakHeRes01,ou=Hosting,DC=fabrikam,DC=com">
</obj>
<obj wkName="ChildOrgCreators" name="LDAP://cn=CSRAdmins@KrakHeRes01,ou=KrakHeRes01,ou=Hosting,DC=fabrikam,DC=com">
</obj>
<obj wkName="MultiGroupPointer" name="LDAP://cn=MultiGroup,cn=_Private,ou=KrakHeRes01,ou=Hosting,DC=fabrikam,DC=com">
</obj>
</otherWellKnownObjects>
<orgs>
<org path="LDAP://cn=_Private,ou=KrakHeRes01,OU=Hosting,DC=fabrikam,DC=Com" name="_Private" class="container">
<otherWellKnownObjects>
<obj wkName="ThisOrganizationRoot" name="LDAP://ou=KrakHeRes01,ou=Hosting,DC=fabrikam,DC=com">
</obj>
<obj wkName="OrgType" name="LDAP://cn=private,cn=WatOrgTypes,cn=_Private,ou=Hosting,DC=fabrikam,DC=com">
</obj>
<.>
<org path="LDAP://cn=AllCustomerAdminsGroups@KrakHeRes01,cn=ChildOrgN,cn=MultiGroup,cn=_Private,ou=KrakHeRes01,OU=Hosting,DC=fabrikam,DC=Com" name="AllCustomerAdminsGroups@KrakHeRes01" class="container">
<otherWellKnownObjects>
<obj wkName="MultiGroupPointer" name="LDAP://cn=AllCustomerAdminsGroups@KrakHeRes01,cn=_Private,ou=KrakHeRes01,ou=Hosting,DC=fabrikam,DC=com">
</obj>
</otherWellKnownObjects>
</org>
<org path="LDAP://cn=AllCustomerCSRAdminsGroups@KrakHeRes01,cn=ChildOrgN,cn=MultiGroup,cn=_Private,ou=KrakHeRes01,OU=Hosting,DC=fabrikam,DC=Com" name="AllCustomerCSRAdminsGroups@KrakHeRes01" class="container">
<otherWellKnownObjects>
<obj wkName="MultiGroupPointer" name="LDAP://cn=AllCustomerCSRAdminsGroups@KrakHeRes01,cn=_Private,ou=KrakHeRes01,ou=Hosting,DC=fabrikam,DC=com">
</obj>
</otherWellKnownObjects>
</org>
</orgs>
</org>
</orgs>
</data>
</response>
Typical C# Usage
//Get user name and password.
string userName = this.Request.ServerVariables.Get("AUTH_USER");
string pass = this.Request.ServerVariables.Get("AUTH_PASSWORD");
//Set credentials.
hostedExch.PreAuthenticate = true;
hostedExch.Credentials = new NetworkCredential(userName,pass);
lblMsg.InnerHtml = mpsResponseHeaderLabel;
//Display response.
this.mpsResponse.DocumentSource = "";
response = hostedExch.CreateResellerOrganization(
container,resellerName,description, propertiesXmlString,
preferredDomainController,sendCredentials);
// set the response XML to match the return from MPF
responseXml.LoadXml(response);
this.mpsResponse.Document = responseXml;
lblDone.InnerText = successMsg;