3.2.5.2.1 Parse Incoming Envelope and Get Shared Key

Upon receiving an application message, the server MUST follow the common request schema as defined in section 2.2.2 and the specific application message definition in section 2.2.3 to parse the message.

If any required element or attribute is missing, the server MUST return a Fault message as defined in section 2.2.3.3. The fault code is defined in section 2.2.2.2.4 and can be any value in the fault code list except 304. The fault string can be any string describing the error.

The server MUST extract the fragment element, which is the base64 decoded content from the Data attribute of the Payload element from a service request, as defined in section 2.2.2.2.5. This fragment element is as defined in section 2.2.2.1.2, and it contains secured content.

The server MUST read from the attribute ManagementServer from the fragment element. This value identifies the client. The server MUST use this value to retrieve the shared key between the client and itself.

If the server does not have the key, the server MUST return a Fault message as defined in section 2.2.3.3. The fault code MUST be set to 304 to indicate that the client needs to register first. The fault string can be any string describing the error.