public ResponseMessageHeader(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode inReplyToNode = xmlNode.SelectSingleNode("inReplyTo");
     
     if (inReplyToNode != null)
     {
         if (inReplyToNode.Attributes["href"] != null || inReplyToNode.Attributes["id"] != null) 
         {
             if (inReplyToNode.Attributes["id"] != null) 
             {
                 inReplyToIDRef_ = inReplyToNode.Attributes["id"].Value;
                 MessageId ob = new MessageId(inReplyToNode);
                 IDManager.SetID(inReplyToIDRef_, ob);
             }
             else if (inReplyToNode.Attributes["href"] != null)
             {
                 inReplyToIDRef_ = inReplyToNode.Attributes["href"].Value;
             }
             else
             {
                 inReplyTo_ = new MessageId(inReplyToNode);
             }
         }
         else
         {
             inReplyTo_ = new MessageId(inReplyToNode);
         }
     }
     
 
     XmlNode sentByNode = xmlNode.SelectSingleNode("sentBy");
     
     if (sentByNode != null)
     {
         if (sentByNode.Attributes["href"] != null || sentByNode.Attributes["id"] != null) 
         {
             if (sentByNode.Attributes["id"] != null) 
             {
                 sentByIDRef_ = sentByNode.Attributes["id"].Value;
                 MessageAddress ob = new MessageAddress(sentByNode);
                 IDManager.SetID(sentByIDRef_, ob);
             }
             else if (sentByNode.Attributes["href"] != null)
             {
                 sentByIDRef_ = sentByNode.Attributes["href"].Value;
             }
             else
             {
                 sentBy_ = new MessageAddress(sentByNode);
             }
         }
         else
         {
             sentBy_ = new MessageAddress(sentByNode);
         }
     }
     
 
     XmlNodeList sendToNodeList = xmlNode.SelectNodes("sendTo");
     
     if (sendToNodeList != null)
     {
         this.sendTo_ = new List<MessageAddress>();
         foreach (XmlNode item in sendToNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     sendToIDRef_ = item.Attributes["id"].Value;
                     sendTo_.Add(new MessageAddress(item));
                     IDManager.SetID(sendToIDRef_, sendTo_[sendTo_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     sendToIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 sendTo_.Add(new MessageAddress(item));
                 }
             }
             else
             {
                 sendTo_.Add(new MessageAddress(item));
             }
         }
     }
     
 
     XmlNodeList copyToNodeList = xmlNode.SelectNodes("copyTo");
     
     if (copyToNodeList != null)
     {
         this.copyTo_ = new List<MessageAddress>();
         foreach (XmlNode item in copyToNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     copyToIDRef_ = item.Attributes["id"].Value;
                     copyTo_.Add(new MessageAddress(item));
                     IDManager.SetID(copyToIDRef_, copyTo_[copyTo_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     copyToIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 copyTo_.Add(new MessageAddress(item));
                 }
             }
             else
             {
                 copyTo_.Add(new MessageAddress(item));
             }
         }
     }
     
 
     XmlNode creationTimestampNode = xmlNode.SelectSingleNode("creationTimestamp");
     
     if (creationTimestampNode != null)
     {
         if (creationTimestampNode.Attributes["href"] != null || creationTimestampNode.Attributes["id"] != null) 
         {
             if (creationTimestampNode.Attributes["id"] != null) 
             {
                 creationTimestampIDRef_ = creationTimestampNode.Attributes["id"].Value;
                 XsdTypeDateTime ob = new XsdTypeDateTime(creationTimestampNode);
                 IDManager.SetID(creationTimestampIDRef_, ob);
             }
             else if (creationTimestampNode.Attributes["href"] != null)
             {
                 creationTimestampIDRef_ = creationTimestampNode.Attributes["href"].Value;
             }
             else
             {
                 creationTimestamp_ = new XsdTypeDateTime(creationTimestampNode);
             }
         }
         else
         {
             creationTimestamp_ = new XsdTypeDateTime(creationTimestampNode);
         }
     }
     
 
     XmlNode expiryTimestampNode = xmlNode.SelectSingleNode("expiryTimestamp");
     
     if (expiryTimestampNode != null)
     {
         if (expiryTimestampNode.Attributes["href"] != null || expiryTimestampNode.Attributes["id"] != null) 
         {
             if (expiryTimestampNode.Attributes["id"] != null) 
             {
                 expiryTimestampIDRef_ = expiryTimestampNode.Attributes["id"].Value;
                 XsdTypeDateTime ob = new XsdTypeDateTime(expiryTimestampNode);
                 IDManager.SetID(expiryTimestampIDRef_, ob);
             }
             else if (expiryTimestampNode.Attributes["href"] != null)
             {
                 expiryTimestampIDRef_ = expiryTimestampNode.Attributes["href"].Value;
             }
             else
             {
                 expiryTimestamp_ = new XsdTypeDateTime(expiryTimestampNode);
             }
         }
         else
         {
             expiryTimestamp_ = new XsdTypeDateTime(expiryTimestampNode);
         }
     }
     
 
     XmlNode implementationSpecificationNode = xmlNode.SelectSingleNode("implementationSpecification");
     
     if (implementationSpecificationNode != null)
     {
         if (implementationSpecificationNode.Attributes["href"] != null || implementationSpecificationNode.Attributes["id"] != null) 
         {
             if (implementationSpecificationNode.Attributes["id"] != null) 
             {
                 implementationSpecificationIDRef_ = implementationSpecificationNode.Attributes["id"].Value;
                 ImplementationSpecification ob = new ImplementationSpecification(implementationSpecificationNode);
                 IDManager.SetID(implementationSpecificationIDRef_, ob);
             }
             else if (implementationSpecificationNode.Attributes["href"] != null)
             {
                 implementationSpecificationIDRef_ = implementationSpecificationNode.Attributes["href"].Value;
             }
             else
             {
                 implementationSpecification_ = new ImplementationSpecification(implementationSpecificationNode);
             }
         }
         else
         {
             implementationSpecification_ = new ImplementationSpecification(implementationSpecificationNode);
         }
     }
     
 
     XmlNodeList partyMessageInformationNodeList = xmlNode.SelectNodes("partyMessageInformation");
     
     if (partyMessageInformationNodeList != null)
     {
         this.partyMessageInformation_ = new List<PartyMessageInformation>();
         foreach (XmlNode item in partyMessageInformationNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     partyMessageInformationIDRef_ = item.Attributes["id"].Value;
                     partyMessageInformation_.Add(new PartyMessageInformation(item));
                     IDManager.SetID(partyMessageInformationIDRef_, partyMessageInformation_[partyMessageInformation_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     partyMessageInformationIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 partyMessageInformation_.Add(new PartyMessageInformation(item));
                 }
             }
             else
             {
                 partyMessageInformation_.Add(new PartyMessageInformation(item));
             }
         }
     }
     
 
     XmlNode SignatureNode = xmlNode.SelectSingleNode("Signature");
     
     if (SignatureNode != null)
     {
         if (SignatureNode.Attributes["href"] != null || SignatureNode.Attributes["id"] != null) 
         {
             if (SignatureNode.Attributes["id"] != null) 
             {
                 SignatureIDRef_ = SignatureNode.Attributes["id"].Value;
                 SignatureType ob = new SignatureType(SignatureNode);
                 IDManager.SetID(SignatureIDRef_, ob);
             }
             else if (SignatureNode.Attributes["href"] != null)
             {
                 SignatureIDRef_ = SignatureNode.Attributes["href"].Value;
             }
             else
             {
                 Signature_ = new SignatureType(SignatureNode);
             }
         }
         else
         {
             Signature_ = new SignatureType(SignatureNode);
         }
     }
     
 
 }
 public NotificationMessageHeader(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList inReplyToNodeList = xmlNode.SelectNodes("inReplyTo");
     if (inReplyToNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in inReplyToNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 inReplyToIDRef = item.Attributes["id"].Name;
                 MessageId ob = MessageId();
                 IDManager.SetID(inReplyToIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 inReplyToIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 inReplyTo = new MessageId(item);
             }
         }
     }
     
 
     XmlNodeList sentByNodeList = xmlNode.SelectNodes("sentBy");
     if (sentByNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in sentByNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 sentByIDRef = item.Attributes["id"].Name;
                 MessageAddress ob = MessageAddress();
                 IDManager.SetID(sentByIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 sentByIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 sentBy = new MessageAddress(item);
             }
         }
     }
     
 
     XmlNodeList sendToNodeList = xmlNode.SelectNodes("sendTo");
     
     foreach (XmlNode item in sendToNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 sendToIDRef = item.Attributes["id"].Name;
                 List<MessageAddress> ob = new List<MessageAddress>();
                 ob.Add(new MessageAddress(item));
                 IDManager.SetID(sendToIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 sendToIDRef = item.Attributes["href"].Name;
             }
             else
             {
             sendTo.Add(new MessageAddress(item));
             }
         }
     }
     
 
     XmlNodeList copyToNodeList = xmlNode.SelectNodes("copyTo");
     
     foreach (XmlNode item in copyToNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 copyToIDRef = item.Attributes["id"].Name;
                 List<MessageAddress> ob = new List<MessageAddress>();
                 ob.Add(new MessageAddress(item));
                 IDManager.SetID(copyToIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 copyToIDRef = item.Attributes["href"].Name;
             }
             else
             {
             copyTo.Add(new MessageAddress(item));
             }
         }
     }
     
 
     XmlNodeList creationTimestampNodeList = xmlNode.SelectNodes("creationTimestamp");
     if (creationTimestampNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in creationTimestampNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 creationTimestampIDRef = item.Attributes["id"].Name;
                 XsdTypeDateTime ob = XsdTypeDateTime();
                 IDManager.SetID(creationTimestampIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 creationTimestampIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 creationTimestamp = new XsdTypeDateTime(item);
             }
         }
     }
     
 
     XmlNodeList expiryTimestampNodeList = xmlNode.SelectNodes("expiryTimestamp");
     if (expiryTimestampNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in expiryTimestampNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 expiryTimestampIDRef = item.Attributes["id"].Name;
                 XsdTypeDateTime ob = XsdTypeDateTime();
                 IDManager.SetID(expiryTimestampIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 expiryTimestampIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 expiryTimestamp = new XsdTypeDateTime(item);
             }
         }
     }
     
 
     XmlNodeList implementationSpecificationNodeList = xmlNode.SelectNodes("implementationSpecification");
     if (implementationSpecificationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in implementationSpecificationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 implementationSpecificationIDRef = item.Attributes["id"].Name;
                 ImplementationSpecification ob = ImplementationSpecification();
                 IDManager.SetID(implementationSpecificationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 implementationSpecificationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 implementationSpecification = new ImplementationSpecification(item);
             }
         }
     }
     
 
     XmlNodeList partyMessageInformationNodeList = xmlNode.SelectNodes("partyMessageInformation");
     
     foreach (XmlNode item in partyMessageInformationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 partyMessageInformationIDRef = item.Attributes["id"].Name;
                 List<PartyMessageInformation> ob = new List<PartyMessageInformation>();
                 ob.Add(new PartyMessageInformation(item));
                 IDManager.SetID(partyMessageInformationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 partyMessageInformationIDRef = item.Attributes["href"].Name;
             }
             else
             {
             partyMessageInformation.Add(new PartyMessageInformation(item));
             }
         }
     }
     
 
     XmlNodeList SignatureNodeList = xmlNode.SelectNodes("Signature");
     if (SignatureNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in SignatureNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 SignatureIDRef = item.Attributes["id"].Name;
                 SignatureType ob = SignatureType();
                 IDManager.SetID(SignatureIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 SignatureIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 Signature = new SignatureType(item);
             }
         }
     }
     
 
 }
Пример #3
0
        public ExceptionMessageHeader(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode inReplyToNode = xmlNode.SelectSingleNode("inReplyTo");

            if (inReplyToNode != null)
            {
                if (inReplyToNode.Attributes["href"] != null || inReplyToNode.Attributes["id"] != null)
                {
                    if (inReplyToNode.Attributes["id"] != null)
                    {
                        inReplyToIDRef_ = inReplyToNode.Attributes["id"].Value;
                        MessageId ob = new MessageId(inReplyToNode);
                        IDManager.SetID(inReplyToIDRef_, ob);
                    }
                    else if (inReplyToNode.Attributes["href"] != null)
                    {
                        inReplyToIDRef_ = inReplyToNode.Attributes["href"].Value;
                    }
                    else
                    {
                        inReplyTo_ = new MessageId(inReplyToNode);
                    }
                }
                else
                {
                    inReplyTo_ = new MessageId(inReplyToNode);
                }
            }


            XmlNode sentByNode = xmlNode.SelectSingleNode("sentBy");

            if (sentByNode != null)
            {
                if (sentByNode.Attributes["href"] != null || sentByNode.Attributes["id"] != null)
                {
                    if (sentByNode.Attributes["id"] != null)
                    {
                        sentByIDRef_ = sentByNode.Attributes["id"].Value;
                        MessageAddress ob = new MessageAddress(sentByNode);
                        IDManager.SetID(sentByIDRef_, ob);
                    }
                    else if (sentByNode.Attributes["href"] != null)
                    {
                        sentByIDRef_ = sentByNode.Attributes["href"].Value;
                    }
                    else
                    {
                        sentBy_ = new MessageAddress(sentByNode);
                    }
                }
                else
                {
                    sentBy_ = new MessageAddress(sentByNode);
                }
            }


            XmlNodeList sendToNodeList = xmlNode.SelectNodes("sendTo");

            if (sendToNodeList != null)
            {
                this.sendTo_ = new List <MessageAddress>();
                foreach (XmlNode item in sendToNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            sendToIDRef_ = item.Attributes["id"].Value;
                            sendTo_.Add(new MessageAddress(item));
                            IDManager.SetID(sendToIDRef_, sendTo_[sendTo_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            sendToIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            sendTo_.Add(new MessageAddress(item));
                        }
                    }
                    else
                    {
                        sendTo_.Add(new MessageAddress(item));
                    }
                }
            }


            XmlNodeList copyToNodeList = xmlNode.SelectNodes("copyTo");

            if (copyToNodeList != null)
            {
                this.copyTo_ = new List <MessageAddress>();
                foreach (XmlNode item in copyToNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            copyToIDRef_ = item.Attributes["id"].Value;
                            copyTo_.Add(new MessageAddress(item));
                            IDManager.SetID(copyToIDRef_, copyTo_[copyTo_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            copyToIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            copyTo_.Add(new MessageAddress(item));
                        }
                    }
                    else
                    {
                        copyTo_.Add(new MessageAddress(item));
                    }
                }
            }


            XmlNode creationTimestampNode = xmlNode.SelectSingleNode("creationTimestamp");

            if (creationTimestampNode != null)
            {
                if (creationTimestampNode.Attributes["href"] != null || creationTimestampNode.Attributes["id"] != null)
                {
                    if (creationTimestampNode.Attributes["id"] != null)
                    {
                        creationTimestampIDRef_ = creationTimestampNode.Attributes["id"].Value;
                        XsdTypeDateTime ob = new XsdTypeDateTime(creationTimestampNode);
                        IDManager.SetID(creationTimestampIDRef_, ob);
                    }
                    else if (creationTimestampNode.Attributes["href"] != null)
                    {
                        creationTimestampIDRef_ = creationTimestampNode.Attributes["href"].Value;
                    }
                    else
                    {
                        creationTimestamp_ = new XsdTypeDateTime(creationTimestampNode);
                    }
                }
                else
                {
                    creationTimestamp_ = new XsdTypeDateTime(creationTimestampNode);
                }
            }


            XmlNode expiryTimestampNode = xmlNode.SelectSingleNode("expiryTimestamp");

            if (expiryTimestampNode != null)
            {
                if (expiryTimestampNode.Attributes["href"] != null || expiryTimestampNode.Attributes["id"] != null)
                {
                    if (expiryTimestampNode.Attributes["id"] != null)
                    {
                        expiryTimestampIDRef_ = expiryTimestampNode.Attributes["id"].Value;
                        XsdTypeDateTime ob = new XsdTypeDateTime(expiryTimestampNode);
                        IDManager.SetID(expiryTimestampIDRef_, ob);
                    }
                    else if (expiryTimestampNode.Attributes["href"] != null)
                    {
                        expiryTimestampIDRef_ = expiryTimestampNode.Attributes["href"].Value;
                    }
                    else
                    {
                        expiryTimestamp_ = new XsdTypeDateTime(expiryTimestampNode);
                    }
                }
                else
                {
                    expiryTimestamp_ = new XsdTypeDateTime(expiryTimestampNode);
                }
            }


            XmlNode implementationSpecificationNode = xmlNode.SelectSingleNode("implementationSpecification");

            if (implementationSpecificationNode != null)
            {
                if (implementationSpecificationNode.Attributes["href"] != null || implementationSpecificationNode.Attributes["id"] != null)
                {
                    if (implementationSpecificationNode.Attributes["id"] != null)
                    {
                        implementationSpecificationIDRef_ = implementationSpecificationNode.Attributes["id"].Value;
                        ImplementationSpecification ob = new ImplementationSpecification(implementationSpecificationNode);
                        IDManager.SetID(implementationSpecificationIDRef_, ob);
                    }
                    else if (implementationSpecificationNode.Attributes["href"] != null)
                    {
                        implementationSpecificationIDRef_ = implementationSpecificationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        implementationSpecification_ = new ImplementationSpecification(implementationSpecificationNode);
                    }
                }
                else
                {
                    implementationSpecification_ = new ImplementationSpecification(implementationSpecificationNode);
                }
            }


            XmlNodeList partyMessageInformationNodeList = xmlNode.SelectNodes("partyMessageInformation");

            if (partyMessageInformationNodeList != null)
            {
                this.partyMessageInformation_ = new List <PartyMessageInformation>();
                foreach (XmlNode item in partyMessageInformationNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            partyMessageInformationIDRef_ = item.Attributes["id"].Value;
                            partyMessageInformation_.Add(new PartyMessageInformation(item));
                            IDManager.SetID(partyMessageInformationIDRef_, partyMessageInformation_[partyMessageInformation_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            partyMessageInformationIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            partyMessageInformation_.Add(new PartyMessageInformation(item));
                        }
                    }
                    else
                    {
                        partyMessageInformation_.Add(new PartyMessageInformation(item));
                    }
                }
            }


            XmlNode SignatureNode = xmlNode.SelectSingleNode("Signature");

            if (SignatureNode != null)
            {
                if (SignatureNode.Attributes["href"] != null || SignatureNode.Attributes["id"] != null)
                {
                    if (SignatureNode.Attributes["id"] != null)
                    {
                        SignatureIDRef_ = SignatureNode.Attributes["id"].Value;
                        SignatureType ob = new SignatureType(SignatureNode);
                        IDManager.SetID(SignatureIDRef_, ob);
                    }
                    else if (SignatureNode.Attributes["href"] != null)
                    {
                        SignatureIDRef_ = SignatureNode.Attributes["href"].Value;
                    }
                    else
                    {
                        Signature_ = new SignatureType(SignatureNode);
                    }
                }
                else
                {
                    Signature_ = new SignatureType(SignatureNode);
                }
            }
        }
        public RequestMessageHeader(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList sentByNodeList = xmlNode.SelectNodes("sentBy");

            if (sentByNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in sentByNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        sentByIDRef = item.Attributes["id"].Name;
                        MessageAddress ob = MessageAddress();
                        IDManager.SetID(sentByIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        sentByIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        sentBy = new MessageAddress(item);
                    }
                }
            }


            XmlNodeList sendToNodeList = xmlNode.SelectNodes("sendTo");

            foreach (XmlNode item in sendToNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        sendToIDRef = item.Attributes["id"].Name;
                        List <MessageAddress> ob = new List <MessageAddress>();
                        ob.Add(new MessageAddress(item));
                        IDManager.SetID(sendToIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        sendToIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        sendTo.Add(new MessageAddress(item));
                    }
                }
            }


            XmlNodeList copyToNodeList = xmlNode.SelectNodes("copyTo");

            foreach (XmlNode item in copyToNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        copyToIDRef = item.Attributes["id"].Name;
                        List <MessageAddress> ob = new List <MessageAddress>();
                        ob.Add(new MessageAddress(item));
                        IDManager.SetID(copyToIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        copyToIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        copyTo.Add(new MessageAddress(item));
                    }
                }
            }


            XmlNodeList creationTimestampNodeList = xmlNode.SelectNodes("creationTimestamp");

            if (creationTimestampNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in creationTimestampNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        creationTimestampIDRef = item.Attributes["id"].Name;
                        XsdTypeDateTime ob = XsdTypeDateTime();
                        IDManager.SetID(creationTimestampIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        creationTimestampIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        creationTimestamp = new XsdTypeDateTime(item);
                    }
                }
            }


            XmlNodeList expiryTimestampNodeList = xmlNode.SelectNodes("expiryTimestamp");

            if (expiryTimestampNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in expiryTimestampNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        expiryTimestampIDRef = item.Attributes["id"].Name;
                        XsdTypeDateTime ob = XsdTypeDateTime();
                        IDManager.SetID(expiryTimestampIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        expiryTimestampIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        expiryTimestamp = new XsdTypeDateTime(item);
                    }
                }
            }


            XmlNodeList implementationSpecificationNodeList = xmlNode.SelectNodes("implementationSpecification");

            if (implementationSpecificationNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in implementationSpecificationNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        implementationSpecificationIDRef = item.Attributes["id"].Name;
                        ImplementationSpecification ob = ImplementationSpecification();
                        IDManager.SetID(implementationSpecificationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        implementationSpecificationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        implementationSpecification = new ImplementationSpecification(item);
                    }
                }
            }


            XmlNodeList partyMessageInformationNodeList = xmlNode.SelectNodes("partyMessageInformation");

            foreach (XmlNode item in partyMessageInformationNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        partyMessageInformationIDRef = item.Attributes["id"].Name;
                        List <PartyMessageInformation> ob = new List <PartyMessageInformation>();
                        ob.Add(new PartyMessageInformation(item));
                        IDManager.SetID(partyMessageInformationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        partyMessageInformationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        partyMessageInformation.Add(new PartyMessageInformation(item));
                    }
                }
            }


            XmlNodeList SignatureNodeList = xmlNode.SelectNodes("Signature");

            if (SignatureNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in SignatureNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        SignatureIDRef = item.Attributes["id"].Name;
                        SignatureType ob = SignatureType();
                        IDManager.SetID(SignatureIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        SignatureIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        Signature = new SignatureType(item);
                    }
                }
            }
        }