Export (0) Print
Expand All
7 out of 7 rated this helpful - Rate this topic

Outlook 2007 Mobile Service Guidelines (Part 3 of 3)

Office 2007

Summary:   Learn about the XML schema for data that is passed between Outlook 2007 Mobile Service (OMS) Web providers and OMS clients, and the WSDL definition for an OMS Web service. This article is intended as a reference for OMS Web service providers. (43 printed pages)

Paul Shen, Microsoft Corporation

Bing He, Microsoft Corporation

Yong Zhang, Microsoft Corporation

Judy Zhang, Microsoft Corporation

Published February 2007

Updated December 2007

Applies to:   Microsoft Office Outlook 2007

Contents

Introduction to OMS Schemas

This is the final part of a three-part series of articles that introduces Microsoft Office Outlook 2007 Mobile Service (OMS) and provides guidelines for working with the service. For code examples and information about the message flow between OMS Web service providers and clients, see Outlook 2007 Mobile Service Guidelines (Part 1 of 3). For recommendations for implementing an OMS Web service, see Outlook 2007 Mobile Service Guidelines (Part 2 of 3).

serviceInfo String Reference

A serviceInfo string is an XML-formatted string that contains information about an OMS Web service such as supported service types, parameters of supported services, and authentication types. The GetServiceInfo() method returns a serviceInfo string.

The elements of a serviceInfo string are described in the next section, followed by the serviceInfo schema.

Element Descriptions

Table 1 gives detailed explanations of the elements used in the serviceInfo string. All elements are required except those that are explicitly indicated as optional.

Table 1. Elements of serviceInfo

Element Attribute Description

<serviceInfo>

Root element.

<serviceProvider>

Company name of service provider, which is displayed on the OMS account settings user interface (UI) in Outlook 2007.

<serviceUri>

The Uniform Resource Identifier (URI) of the Web service that acts as the unique ID of the Web service. If the serviceUri of the OMS Web service is changed, the OMS client treats the service as a new OMS Web service.

<signUpPage>

URI of sign-up or logon page of the OMS Web service.

<targetLocale>

Locale ID (LCID). Used to indicate the country or region for which the Web service is targeted (such as 2052 for Chinese-China and 1042 for Korean).

Default value is 0 (the service is global).

For a detailed LCID chart, see Locale ID (LCID) Chart.

Referring to 3GPP2 C.R1001-C Table 9.1-1, different Short Message Service (SMS) encoding schemas could be used in different markets. Generally, there are two types of encoding:

  • 7 or 8 bits, for pure ASCII text message, and Unicode for text message consisting of ASCII characters and other characters such as DBCS.

  • 8/16 bits, for ASCII and non-ASCII characters. Mainly used by Korea and Japan.

In type 1 encoding, an ASCII character is counted as one Unicode character in a text message consisting of both ASCII and non-ASCII characters.

In type 2 encoding, an ASCII character is counted as one byte in a text message, consisting of both ASCII and non-ASCII characters.

If the <targetLocale> is in Korean or Japanese, the message length is calculated based on type 2 encoding, whereas for other locales it is based on type 1 encoding.

<targetLocale> is also referred to by the client in displaying the name of the Web service on the OMS UI. See the description of <localName> for more details.

<localName>

Service name, in the local language, which is displayed in the OMS account setting UI when the <targetLocale> is the same as the Office UI language. Otherwise, the <englishName> is used. The default account name is composed by using <localName> or <englishName> followed by the <replyPhone> element of the userInfo string (see userInfo String Reference in this article), in the form <replyPhone> (<localName>).

<englishName>

Service name, in English, which is displayed in the OMS account settings UI when the <targetLocale> does not match the Office UI language.

<authenticationType>

Used to indicate the method of authentication supported by the Web service. Supported values are "passport" and "other". If "passport" is not supported, use "other", which means that users are authenticated by using a normal user ID and password.

<supportedService>

Parent tag for supported service elements

<SMS_SENDER>

maxRecipientsPerMessage

maxMessagesPerSend

maxSbcsPerMessage

maxDbcsPerMessage

Supported service type. <SMS_SENDER> handles outbound text messages. Limitations or properties are specified as attributes. When the client sends a message to the Web service, the required service type is indicated in the xmsData string which is passed as a parameter to DeliverXms().

Optional, but at least one of <SMS_SENDER> or <MMS_SENDER> must be supported.

Attributes include the following:

  • maxRecipientsPerMessage represents the number of recipients allowed for an SMS message. The service side is responsible for checking if the number of recipients exceeds the limit set by the service. If the client exceeds that limit, the Web service should return an error by using the "other" error code (see "OMS Error Codes" in the xmsResponse String Reference section in this article for error code definitions). The OMS client allows users to send a SMS message to any number of recipients at the same time.

  • maxMessagesPerSend represents the number of separate SMS messages allowed in one xmsData string. Be aware that the maximum value supported by the OMS client is 20. An exception is that the maximum number of messages in one xmsData string can be as many as 50 when the sourceType element of the xmsData string is "calSummary". The recommended value of maxMessagesPerSend is 20. The Web service is responsible for checking if the number of messages in one xmsData string exceeds the limit set by the Web service. If the OMS client exceeds this limit, the Web service should return error by using the "other" error code.

  • maxSbcsPerMessage represents the number of characters allowed for an SMS message purely consisting of US ASCII characters.

  • maxDbcsPerMessage represents the number of characters allowed for an SMS message containing double byte characters.

<MMS_SENDER>

supportSlide

maxRecipientsPerMessage

maxSizePerMessage

maxSlidesPerMessage

Supported service type. <MMS_SENDER> handles outbound Multimedia Messaging Service (MMS) messages. Limitations or properties are specified as attributes.

Optional, but at least one of <SMS_SENDER> or <MMS_SENDER> must be supported.

Attributes include the following:

  • supportSlide indicates whether Synchronized Multimedia Integration Language (SMIL) is supported in describing presentation of the MMS message or not. The client does not block users from sending slide MMS messages (messages that use SMIL) to the Web service. If the Web service receives a message that uses SMIL and does not support it, the Web service must either report an error of type "other" or convert the message to non-slide mode.

  • maxRecipientsPerMessage is the same as in <SMS_SENDER>.

  • maxSizePerMessage represents the maximum size, in bytes, of the MMS message.

  • maxSlidesPerMessage represents the maximum number of slides an MMS message can have.

serviceInfo Schema

<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" 
   targetNamespace="http://schemas.microsoft.com/office/Outlook/2006/OMS" 
   xmlns:tns="http://schemas.microsoft.com/office/Outlook/2006/OMS" 
   xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:complexType name="tSMS_SENDER">
      <xs:annotation>
         <xs:documentation>
            Specify a type for outgoing text message service.
         </xs:documentation>
      </xs:annotation>
      <xs:attribute name="maxRecipientsPerMessage" type="xs:unsignedInt" use="required">
         <xs:annotation>
            <xs:documentation>
               Maximum number of recipients allowed for a text message.
            </xs:documentation>
         </xs:annotation>
      </xs:attribute>
      <xs:attribute name="maxMessagesPerSend" type="xs:unsignedInt" use="required">
         <xs:annotation>
            <xs:documentation>
               Maximum number of split text messages allowed in one DeliverXms transaction.
            </xs:documentation>
         </xs:annotation>
      </xs:attribute>
      <xs:attribute name="maxSbcsPerMessage" type="xs:unsignedInt" use="required">
         <xs:annotation>
            <xs:documentation>
               Maximum number of single-byte chars a text message can have.
            </xs:documentation>
         </xs:annotation>
      </xs:attribute>
      <xs:attribute name="maxDbcsPerMessage" type="xs:unsignedInt" use="required" >
         <xs:annotation>
            <xs:documentation>
               Maximum number of double-byte chars a text message can have.
            </xs:documentation>
         </xs:annotation>
      </xs:attribute>
   </xs:complexType>
   <xs:complexType name="tMMS_SENDER">
      <xs:annotation>
         <xs:documentation>
            Specify a type for outgoing multimedia message service.
         </xs:documentation>
      </xs:annotation>
      <xs:attribute name="supportSlide" type="xs:boolean" use="required">
         <xs:annotation>
            <xs:documentation>
                Indicate if the Web service supports multimedia messages that are described as a series of slides using SMIL. 
            </xs:documentation>
         </xs:annotation>
      </xs:attribute>
      <xs:attribute name="maxRecipientsPerMessage" type="xs:unsignedInt" use="required">
         <xs:annotation>
            <xs:documentation>
               Maximum number of recipients allowed for a multimedia message.
            </xs:documentation>
         </xs:annotation>
      </xs:attribute>
      <xs:attribute name="maxSizePerMessage" type="xs:unsignedInt" use="required">
         <xs:annotation>
            <xs:documentation>
               Maximum size in bytes that a multimedia message can have.
            </xs:documentation>
         </xs:annotation>
      </xs:attribute>
      <xs:attribute name="maxSlidesPerMessage" type="xs:unsignedInt" use="required">
         <xs:annotation>
            <xs:documentation>
               Maximum number of slides a multimedia message can have.
            </xs:documentation>
         </xs:annotation>
      </xs:attribute>
   </xs:complexType>
   <xs:complexType name="tSupportedService">
      <xs:annotation>
         <xs:documentation>
            Specify a type for services supported by a Web service.
         </xs:documentation>
      </xs:annotation>
      <xs:sequence>
         <xs:element name="SMS_SENDER" type="tns:tSMS_SENDER" minOccurs="0">
            <xs:annotation>
                <xs:documentation>
                   Outgoing text message service (SMS).
               </xs:documentation>
            </xs:annotation>
         </xs:element>
      <xs:element name="MMS_SENDER" type="tns:tMMS_SENDER" minOccurs="0">
            <xs:annotation>
               <xs:documentation>
                  Outgoing multimedia message service (MMS).
               </xs:documentation>
            </xs:annotation>
         </xs:element>
      </xs:sequence>
   </xs:complexType>
   <xs:complexType name="tServiceInfo">
      <xs:annotation>
         <xs:documentation>
            Specify a type for Web service properties.
         </xs:documentation>
      </xs:annotation>
      <xs:sequence>
         <xs:element name="serviceProvider" type="xs:string">
            <xs:annotation>
               <xs:documentation>
                  Name of the OMS Web service provider.
               </xs:documentation>
            </xs:annotation>
         </xs:element>
         <xs:element name="serviceUri" type="xs:string" >
            <xs:annotation>
               <xs:documentation>
                  Uniform Resource Identifier (URI) of the Web service.
               </xs:documentation>
            </xs:annotation>
         </xs:element>
         <xs:element name="signUpPage" type="xs:string">
            <xs:annotation>
               <xs:documentation>
                  Hyperlink to the sign-up page of the Web service.
               </xs:documentation>
            </xs:annotation>
         </xs:element>
         <xs:element name="targetLocale" type="xs:unsignedShort" minOccurs="0">
            <xs:annotation>
               <xs:documentation>
                  The Locale ID that represents the market the Web service is for. Use zero for global service. 
                  Default value is zero. 
               </xs:documentation>
            </xs:annotation>
         </xs:element>
         <xs:element name="localName" type="xs:string">
            <xs:annotation>
               <xs:documentation>
                  Official name of the Web service in local language. If the 'targetLocale' is same 
                  as the UI language of Microsoft Office Outlook 2007, 'localName' 
                  is displayed on the account setting user interface of Outlook 2007.
               </xs:documentation>
            </xs:annotation>
         </xs:element>
         <xs:element name="englishName" type="xs:string">
            <xs:annotation>
               <xs:documentation>
                  Official name of the Web service in English. If the 'targetLocale' is different 
                  from the UI language of Microsoft Office Outlook 2007, 'englishName' is displayed 
                  on the account setting user interface of Outlook 2007.
               </xs:documentation>
            </xs:annotation>
         </xs:element>
         <xs:element name="authenticationType" type="xs:string">
            <xs:annotation>
               <xs:documentation>
                  Type of authentication supported by the Web service. Currently supported values are 'passport' or 'other'.
              </xs:documentation>
           </xs:annotation>
         </xs:element>
        <xs:element name="supportedService" type="tns:tSupportedService">
            <xs:annotation>
               <xs:documentation>
                  Supported services by the Web service.
               </xs:documentation>
            </xs:annotation>
         </xs:element>
      </xs:sequence>
   </xs:complexType>
   <xs:element name="serviceInfo" type="tns:tServiceInfo">
      <xs:annotation>
         <xs:documentation>
            Information about the Web service with its properties defined in type tServiceInfo.
         </xs:documentation>
      </xs:annotation>
   </xs:element>
</xs:schema>

xmsUser String Reference

An xmsUser string is an XML-formatted string that contains authentication information for a user. It is used as a parameter to the GetUserInfo() method. For more information, see the "string GetUserInfo(string xmsUser) Web Service Method" section in Outlook 2007 Mobile Service Guidelines (Part 1 of 3).

xmsUser Schema

<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/office/Outlook/2006/OMS" 
xmlns:tns="http://schemas.microsoft.com/office/Outlook/2006/OMS" 
xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:complexType name="tXmsUser">
      <xs:annotation>
         <xs:documentation>
            Specify a type for user's authentication information.
         </xs:documentation>
      </xs:annotation>
      <xs:sequence>
         <xs:element name="userId" type="xs:string" minOccurs="0" >
            <xs:annotation>
               <xs:documentation>
                  User's identification provided by their service provider.
               </xs:documentation>
            </xs:annotation>
         </xs:element>
         <xs:element name="password" type="xs:string" minOccurs="0">
            <xs:annotation>
               <xs:documentation>
                  User's password provided by their service provider.
               </xs:documentation>
            </xs:annotation>
         </xs:element>
         <xs:element name="customData" type="xs:string" minOccurs="0" >
            <xs:annotation>
               <xs:documentation>
                  Reserved for future extension.
               </xs:documentation>
            </xs:annotation>
         </xs:element>
      </xs:sequence>
      <xs:attribute name="client" type="xs:string" >
         <xs:annotation>
            <xs:documentation>
               Client information, such as "Microsoft Office Outlook 12.0".
            </xs:documentation>
         </xs:annotation>
      </xs:attribute>
   </xs:complexType>
   <xs:element name="xmsUser" type="tns:tXmsUser" >
      <xs:annotation>
         <xs:documentation>
            User's authentication information.
         </xs:documentation>
      </xs:annotation>
   </xs:element>
</xs:schema>

userInfo String Reference

A userInfo string is an XML-formatted string that is returned by the GetUserInfo() Web method implemented by OMS Web services. If the call to GetUserInfo() was successful, the userInfo string will contain user information and an error element with the code attribute set to "OK". If the call failed, the userInfo string will contain at least one error element with its severity attribute set to "failure". The following example shows the schema for a userInfo string.

userInfo Schema

<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/office/Outlook/2006/OMS" 
xmlns:tns="http://schemas.microsoft.com/office/Outlook/2006/OMS" 
xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:complexType name="tError">
      <xs:annotation>
         <xs:documentation>
            Specify a type for the error data returned by the Web service.
         </xs:documentation>
      </xs:annotation>
      <xs:simpleContent>
         <xs:extension base="xs:string">
            <xs:attribute name="code" type="xs:string" use="required" >
               <xs:annotation>
                  <xs:documentation>
                     Predefined error code.
                  </xs:documentation>
               </xs:annotation>
            </xs:attribute>
           <xs:attribute name="severity" type="xs:string" use="optional" >
               <xs:annotation>
                  <xs:documentation>
                     Severity of an error.
                 </xs:documentation>
              </xs:annotation>
           </xs:attribute>
         </xs:extension>
      </xs:simpleContent>
   </xs:complexType>
   <xs:complexType name="tUserInfo">
      <xs:annotation>
         <xs:documentation>
            Specify a type for user information.
         </xs:documentation>
      </xs:annotation>
      <xs:sequence>
         <xs:element name="replyPhone" type="xs:string" minOccurs="0">
            <xs:annotation>
               <xs:documentation>
                  Users' mobile phone number.
               </xs:documentation>
            </xs:annotation>
         </xs:element>
         <xs:element name="smtpAddress" type="xs:string" minOccurs="0">
            <xs:annotation>
               <xs:documentation>
                  SMTP address for receiving replies from mobile phone.
               </xs:documentation>
            </xs:annotation>
         </xs:element>
         <xs:element name="error" type="tns:tError">
            <xs:annotation>
               <xs:documentation>
                  Error data returned by the Web service.
               </xs:documentation>
            </xs:annotation>
         </xs:element>
         <xs:element name="customData" type="xs:string" minOccurs="0" >
            <xs:annotation>
               <xs:documentation>
                  Reserved for future extension.
               </xs:documentation>
            </xs:annotation>
         </xs:element>
      </xs:sequence>
   </xs:complexType>
   <xs:element name="userInfo" type="tns:tUserInfo">
      <xs:annotation>
         <xs:documentation>
            User information returned by the Web service.
         </xs:documentation>
      </xs:annotation>
   </xs:element>
</xs:schema>

xmsData String Reference

An xmsData string is an XML-formatted string that is used to store message information, including the content of the message and its intended recipients. It is used as a parameter to the DeliverXms() Web service method. The elements of an xmsData string are described in Table 2, followed by the xmsData schema.

Element Descriptions

Table 2 defines some of the elements of the xmsData. All elements are required except those that are explicitly indicated as optional.

Table 2. Elements of xmsData

Element Attribute Description

<xmsData>

Root element.

<user>

Parent tag for user information elements.

<userId>

User ID, which is either a passport or any string consisting of characters and digits. Mobile number can be used as a non-passport userId.

<password>

A user password created when signing up the service with a service provider.

<replyPhone>

Reply number or callback number, mainly used in Korea. Service providers that do not support callback numbers can ignore this element. Optional.

<customData>

For future extension.

<xmsHead>

Parent tag for header elements of an XMS message.

<scheduled>

Indicates that the message is to be sent at a specified time. UTC time in format of YYYY-MM-DDThh:mm:ssZ. The accuracy is at the minute level, so the second element ("ss") is always "00". The service side needs to convert the scheduled time to the local time zone. If the specified time is in the past, the message is sent immediately. Optional.

<requiredService>

Required service by client. One of the supported services defined in the serviceInfo string. Valid values are SMS_SENDER or MMS_SENDER.

<sourceType>

Indicates to the service that the message is automatically generated from Outlook Reminder, Calendar Summary, Rules, or manually sent by using XMS inspector or Outlook inspector ("other").

Valid values are "reminder", "calSummary" or "ruleBased", "xmsInspector", or "other".

The Web service can provide users with a Web UI to block some of these messages at certain times or for certain conditions. The Web service can ignore this element if it does not support the sourceType specific action.

Optional.

<to>

Parent element of recipient list.

<recipient>

Multiple occurrences. Refers to the recipient’s mobile phone number (address). At least one recipient is required. Maximum number of recipients is specified by the Web service in the maxRecipientsPerMessage attribute of the supported service type (<MMS_SENDER> or <SMS_SENDER>).

<xmsBody…>

Format

Parent element of XMS message body elements. The format attribute specifies the format or type of xmsBody. OMS supports SMS and MMS. Other message formats may be supported in the future.

<subject>

Subject of the message. Only applies to MMS messages.

<mmsSlides>

The root element for the presentation description part. Only applies to MMS messages.

Required for slide-based MMS messages. If mmsSlides is not available for an MMS message, the MMS message is said to be in non-slide mode or "multipart.mixed" in terms of MMS, and the media are presented in their encoding sequence. The child elements of mmsSlides are a subset of 3GPP SMIL.

<head>

The root tag for head part of SMIL.

<meta name="author" …>

name

content

Metadata indicating the author of the SMIL part with name="author" and content ="msOfficeOutlookOms". No action is required on the service side.

Optional.

<layout>

The root tag for layout part of SMIL.

<root-layout …>

width

height

background-color

Specifies phone screen resolution in pixels, and background color.

<region id="image" …>

id

left

top

width

height

Attribute id can be either "image" or "text" indicating the type of region being defined. The other four attributes specify the position and size of the region in pixels.

<body>

Root tag for the body part of SMIL.

<par dur="3000" …>

Dur

Root tag of an MMS slide. Attribute dur specifies duration in milliseconds that the slide will be played.

Multiple occurrences.

<img …>

src

region

Base64 encoded image object. Attribute src refers to the contentId attribute of the <content> element.

Optional.

<text …>

src

region

Plain text object. Attribute src refers to the contentID attribute of the <content> element.

Optional.

<audio …>

src

region

Base64 encoded audio object. Attribute src refers to the contentId of the <content> element.

Optional.

<content>

contentType

contentId

contentLocation

Multiple occurrence and sequential.

Represents one of the following:

The split SMS messages if format attribute of <xmsBody> is "SMS". Multiple content elements are possible for SMS with each element representing a division of a longer message. The Web service should send each of the elements as individual text messages in sequence.

Text, image, or audio object for a slide if format attribute of <xmsBody> is "MMS" and SMIL part is available (slide mode).

Page of text, image, or audio object of MMS message, if format attribute of <xmsBody> is "MMS" and SMIL part is not available (non-slide mode).

Attributes include the following:

  • contentType: MIME (Multipurpose Internet Mail Extensions) content type. Supported content-types are defined in the "Content Type Table."

  • contentId: Content ID referred in SMIL body part. Ignore it for SMS and non-slide mode MMS.

  • contentLocation: indicates the file name of a media object, which can be used as the default file name when the object is saved.

xmsData Schema

<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/office/Outlook/2006/OMS" 
xmlns:tns="http://schemas.microsoft.com/office/Outlook/2006/OMS" 
xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:complexType name="tTo">
    <xs:annotation>
      <xs:documentation>
        Specify a type for recipients of the message.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element maxOccurs="unbounded" name="recipient" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Cell phone number as the recipient of the message.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="tXmsHeader">
    <xs:annotation>
      <xs:documentation>
        Specify a type for the header part of the message data.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="scheduled" type="xs:dateTime" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            Indicate that the message is to be sent at the specified time.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="requiredService" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            Required service by the message.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="sourceType" type="xs:string" minOccurs="0" >
        <xs:annotation>
          <xs:documentation>
            Source of the message, indicating how the message was created by the client. 
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="to" type="tns:tTo">
        <xs:annotation>
          <xs:documentation>
            Recipients of the message.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="subject" type="xs:string" minOccurs="0" >
        <xs:annotation>
          <xs:documentation>
            Subject of the message. Apply only to a multimedia message.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="tUser">
    <xs:annotation>
      <xs:documentation>
        Specify a type for user information.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="userId" type="xs:string" minOccurs="0" >
        <xs:annotation>
          <xs:documentation>
            User's identification provided by their service provider.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="password" type="xs:string" minOccurs="0" >
        <xs:annotation>
          <xs:documentation>
            User's password provided by their service provider.
          </xs:documentation>
        </xs:annotation>
      </xs:element>/>
      <xs:element name="replyPhone" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            User's cell phone number.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="customData" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            Reserved for future extension.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="tMeta">
    <xs:annotation>
      <xs:documentation>
        Specify a type for metadata.
      </xs:documentation>
    </xs:annotation>
    <xs:attribute name="name" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>
          Name of the metadata.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="content" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>
          Content of the metadata.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="tRoot-layout">
    <xs:annotation>
      <xs:documentation>
        Specify a type for the description of the display of a cell phone.
      </xs:documentation>
    </xs:annotation>
    <xs:attribute name="width" type="xs:unsignedInt" use="required" >
      <xs:annotation>
        <xs:documentation>
          Width of the message view.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="height" type="xs:unsignedByte" use="required" >
      <xs:annotation>
        <xs:documentation>
          Height of the message view.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="background-color" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>
          Background color of the message view.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="tRegion">
    <xs:annotation>
      <xs:documentation>
        Specify a type for describing regions of the display of a cell phone.
      </xs:documentation>
    </xs:annotation>
    <xs:attribute name="id" type="xs:string" use="required" >
      <xs:annotation>
        <xs:documentation>
          ID of the region.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="left" type="xs:unsignedInt" use="required">
      <xs:annotation>
        <xs:documentation>
          Left position of the region.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="top" type="xs:unsignedInt" use="required" >
      <xs:annotation>
        <xs:documentation>
          Top position of the region.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="width" type="xs:unsignedInt" use="required">
      <xs:annotation>
        <xs:documentation>
          Width of the region.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="height" type="xs:unsignedInt" use="required" >
      <xs:annotation>
        <xs:documentation>
          Height of the region.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="tLayout">
    <xs:annotation>
      <xs:documentation>
        Specify a type for the layout definition of a multimedia message.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="root-layout" type="tns:tRoot-layout">
        <xs:annotation>
          <xs:documentation>
            Display definition of a cell phone in terms of screen resolution.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="region" type="tns:tRegion" maxOccurs="2">
        <xs:annotation>
          <xs:documentation>
            Regions definition of the display of a cell phone.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="tHeader">
    <xs:annotation>
      <xs:documentation>
        Specify a type for the header part of the message data.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="meta" type="tns:tMeta" minOccurs="0" >
        <xs:annotation>
          <xs:documentation>
            Metadata to indicate the author of the SMIL.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="layout" type="tns:tLayout">
        <xs:annotation>
          <xs:documentation>
            Layout definition of a multimedia message.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="tImg">
    <xs:annotation>
      <xs:documentation>
        Specify a type for image.
      </xs:documentation>
    </xs:annotation>
    <xs:attribute name="src" type="xs:string" use="required" >
      <xs:annotation>
        <xs:documentation>
          Path to the image - contentId attribute of 'content' element is used here.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="region" type="xs:string" use="required" >
      <xs:annotation>
        <xs:documentation>
          Region for displaying the image.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="tText">
    <xs:annotation>
      <xs:documentation>
        Specify a type for plain text.
      </xs:documentation>
    </xs:annotation>
    <xs:attribute name="src" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>
          Path to the text - contentId attribute of 'content' element is used here.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="region" type="xs:string" use="required" >
      <xs:annotation>
        <xs:documentation>
          Region for displaying the text.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="tAudio">
    <xs:annotation>
      <xs:documentation>
        Specify a type for audio.
      </xs:documentation>
    </xs:annotation>
    <xs:attribute name="src" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>
          Path to the audio - contentId attribute of 'content' element is used here.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="tPar">
    <xs:annotation>
      <xs:documentation>
        Specify a type for elements of a slide.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="img" type="tns:tImg" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            Image part of a slide.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="text" type="tns:tText" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            Text part of a slide.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="audio" type="tns:tAudio" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            Audio part of a slide.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="dur" type="xs:unsignedInt" use="required">
      <xs:annotation>
        <xs:documentation>
          Duration in seconds for the slide to be played.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="tBody">
    <xs:annotation>
      <xs:documentation>
        Specify a type for the body part of slide definition.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="par" type="tns:tPar" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>
            Parts of the body part of the slide definition.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="tMmsSlides">
    <xs:annotation>
      <xs:documentation>
        Specify a type for the slide definition.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="head" type="tns:tHeader" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            Header part of the slide definition.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="body" type="tns:tBody">
        <xs:annotation>
          <xs:documentation>
            Body part of the slide definition.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="tContent">
    <xs:annotation>
      <xs:documentation>
        Specify a type for the contents of the body part of the message data.
      </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="contentType" type="xs:string" use="required">
          <xs:annotation>
            <xs:documentation>
              MIME content type of message content.
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="contentId" type="xs:string" use="required">
          <xs:annotation>
            <xs:documentation>
              ID of message content.
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="contentLocation" type="xs:string" use="required">
          <xs:annotation>
            <xs:documentation>
              Location of message content - path to the media file.
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="tXmsBody">
    <xs:annotation>
      <xs:documentation>
        Specify a type for the body part of the message data.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="mmsSlides" type="tns:tMmsSlides">
        <xs:annotation>
          <xs:documentation>
            Slide definition of the body part of the message data.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="content" type="tns:tContent" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>
            Contents of the body part of the message data.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="format" type="xs:string" use="required" />
  </xs:complexType>
  <xs:complexType name="tXmsData">
    <xs:annotation>
      <xs:documentation>
        Specify a type for the message data being transferred to the Web service.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="user" type="tns:tUser" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            User information.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="xmsHead" type="tns:tXmsHeader" minOccurs="0">
        <xs:annotation>
          <xs:documentation>
            Header part of the message data.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="xmsBody" type="tns:tXmsBody">
        <xs:annotation>
          <xs:documentation>
            Body part of the message data.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="client" type="xs:string" >
      <xs:annotation>
        <xs:documentation>
          Client information, such as "Microsoft Office Outlook 12.0".
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:element name="xmsData" type="tns:tXmsData">
    <xs:annotation>
      <xs:documentation>
        Message data being transferred to the Web service.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
</xs:schema>

xmsResponse String Reference

An xmsResponse string is an XML-formatted string that is returned by DeliverXms() to indicate success or failure. The xmsResponse string contains one or more error elements that may have associated content or recipientList child elements, depending on the type of error.

OMS Error Codes

The OMS Web service can return many different errors to the OMS client. Calls to both GetUserInfo() and DeliverXms() return XML-formatted strings that include one or more error elements that indicate the success or failure of the call.

The value of the code attribute of each error element included in a userInfo or xmsResponse string should be one of the values in Table 3. These values are not case sensitive.

The value of the severity attribute can be either "neutral" or "failure". This attribute is required for errors included in xmsResponse strings, but is optional in userInfo strings.

The "ok" error code indicates success. The "other" error code can be used to indicate an error that does not match one of the expected error types, and should have an accompanying content child element that gives details about the error.

Each error element returned in an xmsResponse string may have at most one content and one recipientList child element, depending on the type of error. The content element contains a description or parameters of the error. The recipientList element contains a string containing the list of recipients that are affected by the error. Table 3 shows the expected content of these child elements for each type of error and also the predefined error codes used by OMS Web services.

Table 3. OMS Error Codes

Value of "code" attribute Explanation Value of "severity" attribute <content> child element <recipientList> child element

ok

Full success.

neutral

Not applicable

Not applicable

invalidUser

Invalid or unrecognized user ID or password.

failure

Not applicable

Not applicable

unregisteredUser

User has not registered for the service. The service provider returns "invalidUser" if it cannot make the judgment based on the user ID.

failure

Not applicable

Not applicable

unregisteredService

User has not subscribed to the service listed in the <content> element.

failure

"SMS" or "MMS"

Not applicable

expiredUser

User’s prepayment is used up or the registration is expired. The error code is for the service provider who provides prepaid service.

failure

Not applicable

Not applicable

invalidRecipient

One or more recipients are not valid or not recognized. Returns semicolon delimited recipients in the <recipientList> element.

failure

Not applicable

Recipent1; Recipient2; …

crossCarrier

One or more recipients are from a carrier that is not supported by the sender’s carrier. Returns semicolon delimited recipients in the <recipientList> element.

failure

Not applicable

Recipent1; Recipent2;…

invalidChar

Message subject or body contains characters or words that are not allowed by local policy or not supported by the service provider.

failure

Not applicable

Not applicable

invalidMedia

Invalid or unsupported media. Returns content IDs of invalid media in the <content> element. (Attribute only applies to MMS messages).

failure

location1; location2…

Not applicable

perDayMsgLimit

Exceeded limit on the number of messages a user can send per day. Returns the limit number in the <content> element.

failure

Limit on number of messages per day in the form:

"# SMS" or "# MMS"

Recipent1; Recipent2;…

perMonthMsgLimit

Exceeded limit on the number of messages a user can send per month. Returns the limit number in the <content> element.

failure

Limit on number of messages per month in the form:

"# SMS" or "# MMS"

Recipent1; Recipent2;…

lengthLimit

Exceeded length limit of SMS message. Returns maximum length limits for single byte messages and double byte messages in the <content> element.

failure

DB or mixed limit; SB limit

Not applicable

sizeLimit

Exceeded size limit of MMS message.

failure

Maximum size allowed (in bytes) of MMS messages

Not applicable

slidesLimit

Exceeded limit on number of slides an MMS message can have.

failure

Maximum number of slides allowed per MMS message

Not applicable

invalidFormat

Invalid or unrecognized XMS data format.

failure

Not applicable

Not applicable

serviceNetwork

Service-side network problem, for example, unable to connect to SMSC or MMSC.

failure

Not applicable

Recipent1; Recipent2;…

noScheduled

Scheduled send is not supported. The message was sent immediately.

failure

Not applicable

Not applicable

lowBalance

User’s account balance is low. Returns current balance and cost per message in the <content> element.

failure

Returns current balance and cost per message separated by semi-colons (use currency symbol before each number). For example, "$5.00;$0.10"

Recipent1; Recipent2;…

serviceUpdate

Service should return this message every time service properties are changed. Client may call GetServiceInfo() to update service properties when this message is received.

neutral

UTC time in format of YYYY-MM-DDThh:mm:ssZ. Second part ("ss") is always "00" and the accuracy is at minute level.

Not applicable

ceasedService

Notifies client that the service is terminated.

failure

Not applicable

Not applicable

other

Use this error code for all other errors.

Service provider decides the severity

Error message

Recipent1; Recipent2;…

Bb277362.note(en-us,office.12).gifNote:

The userInfo string may include these error codes, but error elements included in a userInfo string do not have any child elements.

The following section shows the schema of an xmsResponse string.

xmsResponse Schema

<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/office/Outlook/2006/OMS" 
xmlns:tns="http://schemas.microsoft.com/office/Outlook/2006/OMS" 
xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:complexType name="tError">
    <xs:annotation>
      <xs:documentation>
        Specify a type for the error reported by the Web service.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="content" type="xs:string" minOccurs="0" >
        <xs:annotation>
          <xs:documentation>
            Descriptions of the error.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="recipientList" type="xs:string" minOccurs="0" >
        <xs:annotation>
          <xs:documentation>
            Recipients that are impacted by the error.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="code" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>
          Code that represents a predefined error.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="severity" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>
          Severity of the error. Supported values are "failure" and "neutral".
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType> 
  <xs:complexType name="tXmsResponse">
    <xs:annotation>
      <xs:documentation>
        Specify a type for the response from the Web service.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="error" type="tns:tError" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>
            Error reported by the Web service.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="xmsResponse" type="tns:tXmsResponse">
    <xs:annotation>
      <xs:documentation>
        Response from the Web service.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
</xs:schema>

OMS Web Service Methods

An OMS Web service must implement three public methods: GetServiceInfo(), GetUserInfo(), and DeliverXms(). GetServiceInfo() enables the OMS client to find out information about a Web service. GetUserInfo() returns information about a specific user account. DeliverXms() is called to send a message to one or more recipients. These Web methods are described in detail and used in example code in the first article in this series, Outlook 2007 Mobile Service Guidelines (Part 1 of 3). The Web Services Description Language (WSDL) definition for an OMS Web service is included here.

OMS Web Service WSDL

<?xml version="1.0" encoding="utf-8"?>
<definitions 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" 
xmlns:tns="http://schemas.microsoft.com/office/Outlook/2006/OMS" 
xmlns:s="http://www.w3.org/2001/XMLSchema" 
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" 
targetNamespace="http://schemas.microsoft.com/office/Outlook/2006/OMS" 
xmlns="http://schemas.xmlsoap.org/wsdl/">
  <types />
  <message name="GetUserInfoSoapIn">
    <part name="xmsUser" type="s:string" />
  </message>
  <message name="GetUserInfoSoapOut">
    <part name="GetUserInfoResult" type="s:string" />
  </message>
  <message name="GetServiceInfoSoapIn" />
  <message name="GetServiceInfoSoapOut">
    <part name="GetServiceInfoResult" type="s:string" />
  </message>
  <message name="DeliverXmsSoapIn">
    <part name="xmsData" type="s:string" />
  </message>
  <message name="DeliverXmsSoapOut">
    <part name="DeliverXmsResult" type="s:string" />
  </message>
  <portType name="OMSServiceSoap">
    <operation name="GetUserInfo">
      <documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Read user infomation such as mobile number.</documentation>
      <input message="tns:GetUserInfoSoapIn" />
      <output message="tns:GetUserInfoSoapOut" />
    </operation>
    <operation name="GetServiceInfo">
      <documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Read service properties.</documentation>
      <input message="tns:GetServiceInfoSoapIn" />
      <output message="tns:GetServiceInfoSoapOut" />
    </operation>
    <operation name="DeliverXms">
      <documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Send a text message or multimedia message.</documentation>
      <input message="tns:DeliverXmsSoapIn" />
      <output message="tns:DeliverXmsSoapOut" />
    </operation>
  </portType>
  <binding name="OMSServiceSoap" type="tns:OMSServiceSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <operation name="GetUserInfo">
      <soap:operation soapAction="http://schemas.microsoft.com/office/Outlook/2006/OMS/GetUserInfo" style="rpc" />
      <input>
        <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://schemas.microsoft.com/office/Outlook/2006/OMS" />
      </input>
      <output>
        <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://schemas.microsoft.com/office/Outlook/2006/OMS" />
      </output>
    </operation>
    <operation name="GetServiceInfo">
      <soap:operation soapAction="http://schemas.microsoft.com/office/Outlook/2006/OMS/GetServiceInfo" style="rpc" />
      <input>
        <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://schemas.microsoft.com/office/Outlook/2006/OMS" />
      </input>
      <output>
        <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://schemas.microsoft.com/office/Outlook/2006/OMS" />
      </output>
    </operation>
    <operation name="DeliverXms">
      <soap:operation soapAction="http://schemas.microsoft.com/office/Outlook/2006/OMS/DeliverXms" style="rpc" />
      <input>
        <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://schemas.microsoft.com/office/Outlook/2006/OMS" />
      </input>
      <output>
        <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://schemas.microsoft.com/office/Outlook/2006/OMS" />
      </output>
    </operation>
  </binding>
  <service name="OMSService">
    <port name="OMSServiceSoap" binding="tns:OMSServiceSoap">
      <soap:address location="http://localhost/OMSWS30/Service.asmx" />
    </port>
  </service>
</definitions>

Conclusion

This article defined and explained the XML schemas that are used by OMS Web services and clients and provided the WSDL definition of the OMS Web service. For code examples and information about the message flow between OMS Web service providers and clients, see Outlook 2007 Mobile Service Guidelines (Part 1 of 3). For recommendations for how to implement an OMS Web service, see Outlook 2007 Mobile Service Guidelines (Part 2 of 3).

Additional Resources

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.