9.1 Contact Schema
-
<?xml version="1.0" ?> <xs:schema id="contact" version="2.0" targetNamespace="http://schemas.microsoft.com/sip/types" xmlns:tns="http://schemas.microsoft.com/sip/types" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:annotation> <xs:documentation> Live Communications Server 2005 provides Instant Messaging capabilities among users in an enterprise. Users can store a list of contacts that they frequently communicate with on the server and retrieve / manage this list from any machine from which they log on to the service. This schema specifies the structure of XML instances containing contact-related data returned by the server. The server can return two types of contact lists. 1. Full List - A full list of all contacts and their associated groups. 2. Delta List - A list containing a subset of contacts and associated groups that were added, modified, or deleted from the Full List. List (1) is returned from the server in response to a SUBSCRIBE for the event vnd-microsoft-roaming-contact. List (2) is returned from the server in response to any of the SetContact, DeleteContact, DeleteGroup, or ModifyGroup SERVICE operations. These lists are returned by the server in NOTIFY / BENOTIFY requests generated by the server or in the body of a 200 OK response (also called as a "piggy-back notify"). A Full List is a list of groups followed by a list of contacts. Groups are uniquely numbered. The particular numbering sequence is not persisted and may vary from one transmission to the next. Contacts are cross-referenced against groups using group ID numbers. Contacts must be in at least one group. A Delta List is a list of groups that were added and / or modified, followed by a list of contacts that were added and / or modified, followed by a list of groups that were deleted and finally followed by a list of contacts that were deleted. </xs:documentation> </xs:annotation> <xs:include schemaLocation="common.xsd" /> <!-- *************** Common Types *************** --> <xs:simpleType name="groupID"> <xs:annotation> <xs:documentation> This is a number assigned by a server to identify a group. This number can be uniquely used to associate a contact with a group. </xs:documentation> </xs:annotation> <xs:restriction base="xs:nonNegativeInteger"> <xs:minInclusive value="0" /> <xs:maxInclusive value="64" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="baseGroupList"> <xs:list itemType="groupID" /> </xs:simpleType> <xs:simpleType name="groupList"> <xs:restriction base="baseGroupList"> <xs:maxLength value="64" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="groupName"> <xs:annotation> <xs:documentation> The length of this string cannot exceed 256 bytes. </xs:documentation> </xs:annotation> <xs:restriction base="xs:string" /> </xs:simpleType> <xs:simpleType name="contactName"> <xs:annotation> <xs:documentation> The length of this string cannot exceed 256 bytes. </xs:documentation> </xs:annotation> <xs:restriction base="xs:string" /> </xs:simpleType> <xs:simpleType name="externalUri"> <xs:restriction base="xs:string"> <xs:annotation> <xs:documentation> Any string that points to an external resource. The server enforces that the raw representation of this string cannot exceed 1024 bytes. </xs:documentation> </xs:annotation> </xs:restriction> </xs:simpleType> <xs:simpleType name="contactDeltaNum"> <xs:annotation> <xs:documentation> The server maintains a single non-negative integer version number for the contact / group list of every user. Anytime the user performs an operation that modifies his contact / group list, the version number gets incremented. The version number is returned to the client in the contact list allowing the client to determine if it has the most up-to-date information and to refresh the contact / group list if its state, as seen by the server, is out-of-sync. If the client's delta number is out-of-sync with the server, it can obtain the current value by subscribing to the vnd-microsoft-roaming-contact event and looking at the deltaNum attribute of the contactList element in the body of the notification data. The notification data will be received in the 200 OK response or in a separate NOTIIFY or BENOTIFY request from the server. </xs:documentation> </xs:annotation> <xs:restriction base="xs:nonNegativeInteger" /> </xs:simpleType> <xs:complexType name="group"> <xs:attribute name="id" type="tns:groupID" use="required" /> <xs:attribute name="name" type="tns:groupName" use="required" /> <xs:attribute name="externalURI" type="tns:externalUri"> <xs:annotation> <xs:documentation> An external URI is a list of contacts that is stored elsewhere. For example this may point to a location in an LDAP directory. </xs:documentation> </xs:annotation> </xs:attribute> </xs:complexType> <xs:complexType name="contactExtension"> <xs:annotation> <xs:documentation> This element is provided for extensibility. Any valid XML can be stored by the client. The server enforces a limit of 1024 bytes on the size of the element body, where the entire element body is treated as a single string. </xs:documentation> </xs:annotation> <xs:sequence> <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> </xs:complexType> <xs:complexType name="contact"> <xs:sequence> <xs:element name="contactExtension" type="tns:contactExtension" minOccurs="0" maxOccurs="1" /> </xs:sequence> <xs:attribute name="uri" type="tns:sipURI" use="required" /> <xs:attribute name="name" type="tns:contactName" /> <xs:attribute name="groups" type="tns:groupList" default="0" /> <xs:attribute name="subscribed" type="xs:boolean" default="true"> <xs:annotation> <xs:documentation> This attribute specifies whether the client subscribes to this contact's presence. </xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="externalURI" type="tns:externalUri"> <xs:annotation> <xs:documentation> Perhaps the contact is from the Outlook address book, an LDAP directory, or some other external source. A URL can be stored to obtain more information about this contact. </xs:documentation> </xs:annotation> </xs:attribute> </xs:complexType> <!-- ********* Full List ********* --> <xs:complexType name="fullContactList"> <xs:sequence> <xs:element name="group" type="tns:group" minOccurs="0" maxOccurs="64" /> <xs:element name="contact" type="tns:contact" minOccurs="0" maxOccurs="unbounded" > <xs:annotation> <xs:documentation> Although the schema allows for an unbounded number of contacts, the administrator can configure a server to disallow more than a certain number of contacts. </xs:documentation> </xs:annotation> </xs:element> </xs:sequence> <xs:attribute name="deltaNum" type="tns:contactDeltaNum" use="required" /> </xs:complexType> <xs:element name="contactList" type="tns:fullContactList" /> <!-- *********** Delta List *********** --> <xs:complexType name="deltaContactList"> <xs:choice> <xs:element name="addedGroup" type="tns:group" /> <xs:element name="modifiedGroup" type="tns:group" /> <xs:element name="addedContact" type="tns:contact" /> <xs:element name="modifiedContact" type="tns:contact" /> <xs:element name="deletedGroup"> <xs:complexType> <xs:attribute name="id" type="tns:groupID" use="required" /> </xs:complexType> </xs:element> <xs:element name="deletedContact"> <xs:complexType> <xs:attribute name="uri" type="tns:sipURI" use="required" /> </xs:complexType> </xs:element> </xs:choice> <xs:attribute name="deltaNum" type="tns:contactDeltaNum" use="required" > <xs:annotation> <xs:documentation> The value of this attribute is the new delta number after the SERVICE operation was performed. </xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="prevDeltaNum" type="tns:contactDeltaNum" use="required" > <xs:annotation> <xs:documentation> The value of this attribute equals the value of the delta number specified in the SERVICE operation. </xs:documentation> </xs:annotation> </xs:attribute> </xs:complexType> <xs:element name="contactDelta" type="tns:deltaContactList" /> </xs:schema>