ConvertV2ToBetaSearch() public method

public ConvertV2ToBetaSearch ( string RDFResults, string queryid, string version, bool individual ) : string
RDFResults string
queryid string
version string
individual bool
return string
        public Connects.Profiles.Service.DataContracts.PersonList ProfileSearch(Connects.Profiles.Service.DataContracts.Profiles qd, bool isSecure)
        {
            Connects.Profiles.Service.DataContracts.PersonList pl = null;
            string req = string.Empty;
            string responseXML = string.Empty;

            try
            {
                DataIO ps = new DataIO();
                XmlDocument searchrequest = new XmlDocument();
                Utility.Namespace namespacemgr = new Connects.Profiles.Utility.Namespace();

                Connects.Profiles.Service.DataContracts.Profiles p = new Connects.Profiles.Service.DataContracts.Profiles();

                req = Connects.Profiles.Utility.XmlUtilities.SerializeToString(qd);

                DebugLogging.Log("+++++++++ REQUEST=" + req);

                Type type = typeof(Connects.Profiles.Service.DataContracts.PersonList);

                searchrequest.LoadXml(this.ConvertToRDFRequest(req, qd.Version.ToString()));

                if (qd.QueryDefinition.PersonID != null && qd.Version != 2)
                {
                    qd.QueryDefinition.PersonID = ps.GetPersonID(qd.QueryDefinition.PersonID).ToString();
                }

                if (qd.QueryDefinition.PersonID != null)
                {
                    responseXML = ps.Search(qd.QueryDefinition.PersonID, isSecure).OuterXml;
                }
                else
                {
                    responseXML = ps.Search(searchrequest, isSecure).OuterXml;
                }

                string queryid = string.Empty;
                queryid = qd.QueryDefinition.QueryID;

                if (responseXML == string.Empty)
                {
                    if (queryid == null)
                        queryid = Guid.NewGuid().ToString();

                    responseXML = "<PersonList Complete=\"true\" ThisCount=\"0\" TotalCount=\"0\" QueryID=\"" + queryid + "\" xmlns=\"http://connects.profiles.schema/profiles/personlist\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" />";

                }
                else
                {

                    string version = string.Empty;
                    bool individual = false;

                    version = qd.Version.ToString();

                    if (qd.QueryDefinition.PersonID != null || qd.QueryDefinition.InternalIDList != null)
                        individual = true;

                    responseXML = ps.ConvertV2ToBetaSearch(responseXML, queryid, version, individual);
                }

                DebugLogging.Log("+++++++++ DONE WITH Convert V2 to Beta Search");
                pl = Connects.Profiles.Utility.XmlUtilities.DeserializeObject(responseXML, type) as Connects.Profiles.Service.DataContracts.PersonList;
                DebugLogging.Log("+++++++++ Returned + a total count of = " + pl.TotalCount);

            }
            catch (Exception ex)
            {
                DebugLogging.Log(req + " " + responseXML);
                DebugLogging.Log("ERROR==> " + ex.Message + " STACK:" + ex.StackTrace + " SOURCE:" + ex.Source);
            }

            return pl;
        }
        public Connects.Profiles.Service.DataContracts.PersonList ProfileSearch(Connects.Profiles.Service.DataContracts.Profiles qd, bool isSecure)
        {
            Connects.Profiles.Service.DataContracts.PersonList pl = null;
            try
            {
                DataIO ps = new DataIO();
                XmlDocument searchrequest = new XmlDocument();
                Utility.Namespace namespacemgr = new Connects.Profiles.Utility.Namespace();
                XmlNamespaceManager namespaces;

                string responseXML;

                Connects.Profiles.Service.DataContracts.Profiles p = new Connects.Profiles.Service.DataContracts.Profiles();

                string req = Connects.Profiles.Utility.XmlUtilities.SerializeToString(qd);

                Type type = typeof(Connects.Profiles.Service.DataContracts.PersonList);

                searchrequest.LoadXml(this.ConvertToRDFRequest(req));

                namespaces = namespacemgr.LoadNamespaces(searchrequest);

                if (qd.QueryDefinition.PersonID!=null)
                {
                    responseXML = ps.Search(qd.QueryDefinition.PersonID).OuterXml;
                }
                else
                {
                    responseXML = ps.Search(searchrequest,isSecure).OuterXml;
                }

                string queryid = string.Empty;
                string version = string.Empty;
                bool individual = false;

                queryid = qd.QueryDefinition.QueryID;
                version = qd.Version.ToString();

                if (qd.QueryDefinition.PersonID != null)
                    individual = true;

                responseXML = ps.ConvertV2ToBetaSearch(responseXML, queryid, version, individual);

                pl = Connects.Profiles.Utility.XmlUtilities.DeserializeObject(responseXML, type) as Connects.Profiles.Service.DataContracts.PersonList;

            }
            catch (Exception ex)
            {
                DebugLogging.Log("ERROR==> " + ex.Message + " STACK:" + ex.StackTrace + " SOURCE:" + ex.Source);
            }

            return pl;
        }