public override object Load(string sectionName, string fileName)
        {
            XmlDocument document = new XmlDocument();
            document.Load(fileName);

            // add EncryptedData to new document
            XmlNode node = document.SelectSingleNode("//EncryptedData");

            if ( node != null )
            {
                // decrypt
                EncryptXml decrypt = new EncryptXml(document);
                decrypt.AddKeyNameMapping("db", ReadServerEncryptionKey());
                decrypt.DecryptDocument();

                // create object (desearilize)
                AccountMessageSerializer serializer = new AccountMessageSerializer();
                AccountDatabase database = (AccountDatabase)Create(document);

                return database;
            }
            else
            {
                return base.Load (sectionName, fileName);
            }
        }
        /// <summary>
        /// Handles the SoapEnvelopes.
        /// </summary>
        /// <param name="envelope"> The SoapEnvelope.</param>
        protected override void Receive(SoapEnvelope envelope)
        {
            XmlDocument document;
            AccountMessage message;
            AccountMessageSerializer serializer = new AccountMessageSerializer();

            switch ( envelope.Context.Addressing.Action.Value )
            {
                case "urn:ecyware:greenblue:licenseServices:createAccount":
                    document = DecryptBodyObject(envelope);

                    // create object (desearilize)
                    message = (AccountMessage)serializer.Create(document.DocumentElement.OuterXml);

                    // Replace body and send to base class.
                    envelope.SetBodyObject(message);
                    base.Receive(envelope);
                    break;
                case "urn:ecyware:greenblue:licenseServices:updateAccount":
                    document = DecryptBodyObject(envelope);

                    // create object (desearilize)
                    message = (AccountMessage)serializer.Create(document.DocumentElement.OuterXml);

                    // Replace body and send to base class.
                    envelope.SetBodyObject(message);
                    base.Receive(envelope);
                    break;
                default:
                    base.Receive(envelope);
                    break;
            }
        }
        /// <summary>
        /// Encrypts the account message.
        /// </summary>
        /// <param name="message"> The AccountMessage.</param>
        /// <returns> A encrypted XML String.</returns>
        private string EncryptAccountMessage(AccountMessage message)
        {
            try
            {
                AccountMessageSerializer serializer = new AccountMessageSerializer();
                XmlNode xmlNode = serializer.Serialize(message);
                XmlDocument document = new XmlDocument();
                document.AppendChild(document.ImportNode(xmlNode,true));

                // Encrypt xml
                EcyXmlEncryption.EncryptXml enc = new EcyXmlEncryption.EncryptXml(document);
                enc.AddKeyNameMapping("accountMessage", ReadKey());

                XmlElement el = (XmlElement)document.SelectSingleNode("/AccountMessage");
                EcyXmlEncryption.EncryptedData data = enc.Encrypt(el, "accountMessage");
                enc.ReplaceElement(el, data);

                return document.DocumentElement.OuterXml;
            }
            catch
            {
                throw;
            }
        }