Export (0) Print
Expand All

Serialization of Enhanced Presence category instances

Learn how to create enhanced presence data by using XML Schema Definition (XSD) files.

Last modified: August 16, 2013

Applies to: Lync 2013 | Lync Server 2013

With XSD files, you can generate presence data according to schema specifications.

To generate the data class from a schema:

  1. Create .NET Framework classes for the XML types defined in the XSD files. You can accomplish this by using Microsoft Xml Schema/DataTypes Support Utility (XSD.exe). This tool is part of the .NET Framework SDK.

  2. Create presence data object by instantiating the resultant classes and assigning appropriate values.

  3. Serialize the presence data object to obtain its XML representation.

  4. Attach the XML blob to the SIP message body. The process used to attach an XML blob to a SIP message depends on the API used by your application.

Creating Enhanced Presence data classes from the XML schemas

Demonstrates how to use XSD.exe to create C# classes from a given XSD file.

Instantiating and initializing an Enhanced Presence data class

Demonstrates how to instantiate and initialize an Enhanced Presence data class in C#.

Serializing an Enhanced Presence data object to an XML element

Demonstrates how to serialize an Enhanced Presence data object in C# to create the corresponding XML string.

Show:
© 2014 Microsoft