Message Document Type Definitions
Messages
An E/M API application communicates with the E/M API service by sending and receiving XML messages. The XML messages must follow the schema defined by the Message DTDs.
A Message Document Type Definition (DTD) designates an XML list that specifies which elements can appear in a request, query, or response document. It also specifies the contents and attributes of the elements. For more information on XML DTD schema, refer to http://www.w3.org/TR/2004/REC-xml11-20040204/#NT-doctypedecl.
For examples of E/M API XML requests based on the Message DTDs, see the Message Examples.
Request DTD
The Request DTD defines the login and logout messages that your application can send to the Cisco Exchange Mobility service.
<!-- login requests DTD --><!ELEMENT request (appInfo, (login | logout | logoutAll))><!ELEMENT appInfo (appID, (appCertificate | appEncryptedCertificate))><!ELEMENT appID (#PCDATA)><!ELEMENT appCertificate (#PCDATA)><!ELEMENT appEncryptedCertificate (#PCDATA)><!ELEMENT login (deviceName, userID, deviceProfile?, exclusiveDuration?, remoteIPAddr?, isViaHeaderSet?)><!ELEMENT logout (deviceName, remoteIPAddr?, isViaHeaderSet?)><!ELEMENT logoutAll (remoteIPAddr?, isViaHeaderSet?)><!ELEMENT deviceName (#PCDATA)><!ELEMENT userID (#PCDATA)><!ELEMENT deviceProfile (#PCDATA)><!ELEMENT remoteIPAddr (#PCDATA)><!ELEMENT isViaHeaderSet (#PCDATA)><!ELEMENT exclusiveDuration (time | indefinite)><!ELEMENT time (#PCDATA)><!ELEMENT indefinite EMPTY>
Login or Logout Response DTD
Login or Logout Response DTD defines the messages that your application receives from the Cisco Extension Mobility service when it sends a login or logout request message.
<!-- login response DTD --><!ELEMENT response (success | failure)><!ELEMENT success EMPTY><!ELEMENT failure (error)><!ELEMENT error (#PCDATA)><!ATTLIST error code NMTOKEN #REQUIRED>
Query DTD
The Query DTD defines the Device-User and User-Devices messages that your application sends the Cisco Extension Mobility service to find out which user is logged in to a device or to which devices users are logged in.
<!-- login query DTD --><!ELEMENT query (appInfo, (deviceUserQuery | userDevicesQuery | checkUser | deviceProfileQuery))><!ELEMENT appInfo (appID, (appCertificate | appEncryptedCertificate))><!ELEMENT appID (#PCDATA)><!ELEMENT appCertificate (#PCDATA)><!ELEMENT appEncryptedCertificate (#PCDATA)><!ELEMENT deviceUserQuery (deviceName+,remoteIPAddr?)><!ELEMENT userDevicesQuery (userID+,remoteIPAddr?)><!ELEMENT checkUser (userID+,remoteIPAddr?,isViaHeaderSet?)><!ELEMENT deviceProfileQuery (userID+,remoteIPAddr?,isViaHeaderSet?)><!ELEMENT deviceName (#PCDATA)><!ELEMENT userID (#PCDATA)><!ELEMENT remoteIPAddr (#PCDATA)><!ELEMENT isViaHeaderSet (#PCDATA)>
Query Response DTD
The Query Response DTD defines the messages that your application receives from the Cisco Extension Mobility service when it sends the service a Device-User or User-Devices query.
<!-- login query results DTD --><!ELEMENT response (deviceUserResults | userDevicesResults | deviceProfileResults| failure)><!ELEMENT deviceUserResults (device+)><!ELEMENT userDevicesResults (user+)><!ELEMENT deviceProfileResults (userID+)><!ELEMENT device (userID | lastlogin | none | doesNotExist)><!ATTLIST device name NMTOKEN #REQUIRED><!ELEMENT user (deviceName+ | none | doesNotExist)><!ATTLIST user id NMTOKEN #REQUIRED><!ELEMENT userID (#PCDATA)><!ELEMENT lastlogin (#PCDATA)><!ELEMENT deviceName (#PCDATA)><!ELEMENT none EMPTY><!ELEMENT doesNotExist EMPTY><!ELEMENT failure (errorMessage)><!ELEMENT errorMessage (#PCDATA)>
For examples of messages see the Response Types Reference section of this guide.