Specifies the request status code for a corresponding
SyncML command. Parent Elements: SyncBody Restrictions: A Status command
only applies to the command corresponding to the specified CmdRef (i.e.,
1:1 correspondence of a command and a Status). If there were multiple
Item elements specified in the command, and if the items’ status code
were not the same, then a Status MUST be returned for each of the items.
If all of the items had the same status code, a Status for all of the
items MAY be returned. In these cases the SourceRef and TargetRef
elements are used to identify the Item, which the status code applies
to. If all of the items in the command had the same status code, then it
is also allowed to return a single Status for the entire command. When
returning a single Status for a command with multiple items, the
SourceRef and TargetRef elements MUST NOT be specified in the Status
command. Additionally, if the Status command is associated with a
command that had other commands inside it (e.g., Sync, Atomic,
Sequence), then the status value only applies to the corresponding
command, and is not related to the status of the commands inside it.
Ordering of Status commands in a SyncML response MUST match the order of
the commands in the corresponding SyncML request. That is, when there
are multiple commands in a SyncML request, then the corresponding Status
commands MUST appear in the SyncML response in the same order as the
associated commands appeared in the SyncML request. In addition, the
status on the SyncHdr MUST be the first status element in the SyncBody
of the response. Even in the case where the statuses for the previous
request span multiple messages/responses, the status on SyncHdr MUST be
the first status element followed by other statuses and/or remaining
statuses. The CmdID element type specifies the SyncML message-unique
identifier for this command. The MsgRef element type specifies the MsgID
of the associated SyncML request. The CmdRef element type specifies the
CmdID of the associated SyncML request. The element type MUST be
present. If "0", the Status command corresponds to a status code for the
SyncHdr of the SyncML message referenced by the Status command. The Cmd
element type specifies the name of the SyncML command associated with
the SyncML request. The value of the element type can also be "SyncHdr"
when the CmdRef element type has a value of "0". The optional TargetRef
element type specifies the target addresses from the associated command.
If the Item elements of the command associated with the Status command
has a Target element, the value MUST be copied into the TargetRef of the
Status command. If more than one TargetRef element type is specified,
then the request status code applies to all of these TargetRef values.
If the request status code is applicable to the entire list of items
specified in the associated request command, then the TargetRef element
type MUST NOT be specified. The optional SourceRef element type
specifies the source address from the associated command. If the Item
elements of the command associated with the Status command has a Source
element, the value MUST be copied into the SourceRef of the Status
command. If more than one SourceRef element type is specified, then the
request status code applies to all of these SourceRef values. If the
request status code is applicable to the entire list of items specified
in the associated request command, then the SourceRef element type MUST
NOT be specified. The Cred element type specifies authentication
credential for the command. The Chal element type specifies the
authentication challenge for the command or the message. If the status
code in the Data element is (401) Unauthorized or (407) Authentication
required, the challenge SHOULD be included. The Data element type
specifies the request status code type. The optional and repeatable Item
element type contains additional information about the status condition,
such as the SyncML command. This specification permits a Status command
to be issued against another Status command. This case will probably not
normally be encountered. However, 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 to notify the server that that requested
authentication scheme is not supported and negotiate a authentication
scheme it does support. SyncML servers and SyncML clients not supporting
such a usage case need provide no further response to the SyncML entity
issuing the "Status on a Status". A Status MUST also be returned for the
SyncHdr. However, if a client creates a message containing only a
successful Status on a SyncHdr, the entire message MUST NOT be sent. A
server MUST send this message. Status codes are listed in Section 11,
Response Status Codes.