private static string SjekkForretningskvitteringForKonsistens(XmlDocument document)
{
var partInfo = document.SelectSingleNode("//ns6:PartInfo", GetNamespaceManager(document));
var partInfoBodyId = string.Empty;
if (partInfo.Attributes.Count > 0)
partInfoBodyId = partInfo.Attributes["href"].Value;
var bodyId = document.SelectSingleNode("//env:Body", GetNamespaceManager(document)).Attributes["wsu:Id"].Value;
if (!partInfoBodyId.Equals(string.Empty) && !bodyId.Equals(partInfoBodyId))
{
throw new SdpSecurityException(
$"Id i PartInfo og i Body matcher er ikke like. Partinfo har '{partInfoBodyId}', body har '{bodyId}'");
}
return bodyId;
}