2.2.6.1 Status
The Status element type specifies the request status code for a corresponding SyncML command. Status codes are specified in [OMA-SyncMLRP1.2.2] section 10. The element type has the following syntax:
-
<Status>(CmdID, MsgRef, CmdRef, Cmd, Data, Item?+, TargetRef?, SourceRef?)</Status>
Parent Element: SyncBody (section 2.2.4.3)
Restrictions: Status only applies to the command corresponding to the specified CmdRef (section 2.2.3.3); there is a 1:1 correspondence between a command and the Status element. When Status corresponds to a command that contains other commands, the Status applies only to the corresponding command and not to any contained commands. The order of Status elements in a SyncML response MUST match the order of the corresponding commands in the SyncML request.
The Item (section 2.2.5.2) element type is optional and can be present multiple times as required. Item contains additional information about the status condition, such as the SyncML command. When multiple Item (section 2.2.5.2) elements are specified in a command, if the status codes for all Items are not identical, a unique Status element MUST be returned for each Item. If all status codes are identical, the same Status element MAY be returned for all Items.
Status MUST be returned for the SyncHdr (section 2.2.4.2) and MUST be the first Status element in the SyncBody of the response. Even in the case where Status elements for a previous request span multiple messages and responses, the Status in the SyncHdr MUST be the first Status element in the SyncBody followed by other Status elements and/or remaining Status elements for previous requests. However, when a client creates a message containing only a successful Status in a SyncHdr, the entire message MUST NOT be sent. A server MUST send this message.
The CmdID (section 2.2.3.2) element type specifies the unique identifier for the SyncML message for the command.
The MsgRef (section 2.2.3.7) element type specifies the MsgID (section 2.2.3.6) for the associated SyncML request from the server.
The CmdRef element type MUST be present and specifies the CmdID for the associated SyncML request from the server. When CmdRef is zero, Status is a status code for the SyncHdr of the SyncML message referenced by the command corresponding to the Status.
The Cmd (section 2.2.3.1) element type specifies the name of the SyncML command associated with the SyncML request. When CmdRef is "0", Cmd can also be set to
"SyncHdr".The SourceRef (section 2.2.3.10) and TargetRef (section 2.2.3.12) elements are used to identify the Item to which a status code applies. When returning a single Status for a command, the SourceRef and TargetRef elements MUST NOT be specified in the Status.
TargetRef is an optional element that specifies the target addresses from the corresponding command. When the Item element of the corresponding command includes a Target (section 2.2.3.11) element, the value of Item. Target MAY be copied into the Status.TargetRef element. When more than one TargetRef element is specified, the request status code applies to all TargetRef elements. If the request status code is applicable to all Items specified in the associated request command, TargetRef MUST NOT be specified. When Status corresponds to a command that contains a single Item, TargetRef MAY be omitted to minimize message size.
SourceRef is an optional element that specifies the source address from the corresponding command. When the Item element of the corresponding command includes a Source (section 2.2.3.9) element, the value of Item. Source MAY be copied into the Status SourceRef element. When more than one SourceRef element is specified, the request status code applies to all SourceRef elements. If the request status code is applicable to all Items specified in the associated request command, SourceRef MUST NOT be specified.
The Data (section 2.2.5.1) element type specifies the request status code type. Status codes are specified in [OMA-SyncMLRP1.2.2] section 10.
MDM permits a Status to be issued against another Status (or, Status on a Status). While this case is not usually encountered, there are extreme cases where this feature is necessary. For example, if a server returns a (401) Unauthorized status code with a request for an authentication scheme that is not supported by the client, the client might use a (406) Optional feature unsupported code to notify the server that that requested authentication scheme is not supported and negotiate an authentication scheme that it does support. SyncML servers and SyncML clients that do not support this use case are not required to provide further response to the SyncML entity that is issuing the Status on a Status.
Content Model: (CmdID, MsgRef, CmdRef, Cmd, Data, Item?+, SourceRef, TargetRef)
Attributes: None.