/// <summary>
        /// sample:
        /// partyId = 5fed522f-4f34-4db6-8385-5802ea6e219d
        /// sourcePartyId = b1fd3502-3b31-465a-a0b8-cd844bd7004a
        /// string sbParam = "<getPartyDetailRequest><sourcePartyId>sourcePartyId</sourcePartyId></getPartyDetailRequest>";
        /// string url = "http://10.22.53.151:9080/USMDMV2/REST/party?" + sbParam;
        /// </summary>
        /// <param name="sourcePartyId"></param>
        /// <returns></returns>
        public object GetPartyDetails(string sourcePartyId)
        {
            //input param check
            if (string.IsNullOrEmpty(sourcePartyId))
            {
                return null;
            }

            //params defines
            string responeContent = string.Empty;
            string serviceURL = string.Empty;
            serviceURL = Constants.APIURL_Prodect;
            StringBuilder sbParam = new StringBuilder();
            Instrument inStrument = new Instrument();
            PartyDetailSearchResult partyResult = new PartyDetailSearchResult();

            //Get URL
            sourcePartyId = inStrument.HandleSpecialCharacters(sourcePartyId);
            sbParam = GetParams(sourcePartyId);
            serviceURL = serviceURL + "?" + sbParam.ToString();

            //Init http request
            HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(serviceURL);
            httpWebRequest.ContentType = "application/xml";
            httpWebRequest.Method = "POST";
            httpWebRequest.Headers.Add("usmdm-action", "GET");
            httpWebRequest.Headers.Add("APIkey", Constants.APIkey_Product);
            httpWebRequest.Headers.Add("APIKeySecret", Constants.APIKeySecret_Product);

            //send http request
            byte[] bStream = System.Text.Encoding.Default.GetBytes(sbParam.ToString());
            httpWebRequest.ContentLength = bStream.Length;
            using (Stream stream = httpWebRequest.GetRequestStream())
            {
                stream.Write(bStream, 0, bStream.Length);
            }
            try
            {
                //Get http response
                HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
                StreamReader streamReader = new StreamReader(httpWebResponse.GetResponseStream(), UTF8Encoding.UTF8);
                responeContent = streamReader.ReadToEnd();
                httpWebResponse.Close();
                streamReader.Close();

                if (responeContent.Trim().Length <= 0)
                {
                    return null;
                }

                //rebuild the returned xml data
                XmlDocument xmlDoc = inStrument.GetXmlDocByXmlContent(responeContent);
                string[] paramArray = { };
                string statusValue = inStrument.GetNodeValue(xmlDoc, "overallStatus", paramArray);
                string statusDesc = inStrument.GetNodeValue(xmlDoc, "statusMessageDescription", paramArray);

                XDocument xdoc = XDocument.Parse(responeContent);
                if (statusValue.Equals("Success"))
                {
                    partyResult = GetPartyFromXML(xdoc);
                    //res = new JavaScriptSerializer().Serialize(GetPartyFromXML(xdoc));
                }
                else
                {
                    partyResult.IndependenceStatus = statusDesc;
                    partyResult.IndependenceStatusCode = "-1";
                }
            }
            catch (Exception ex)
            {
                partyResult.IndependenceStatusCode = "-1";
                partyResult.IndependenceStatus = ex.Message;
            }
            return partyResult;
        }
 /// <summary>
 /// Get party details of code and desc in xml
 /// </summary>
 /// <param name="xmlDoc"></param>
 /// <returns></returns>
 private PartyDetailSearchResult GetPartyFromXML(XDocument xmlDoc)
 {
     Instrument inStrument = new Instrument();
     List<SourceParty> sourceParties = (from sourceParty in xmlDoc.Descendants("responseGetParty").Elements("party")
                                  select new SourceParty
                                        {
                                            independenceRestrictionStatus = new CodeDesc
                                            {
                                                Code = inStrument.GetElementValue(sourceParty.Element("independenceRestrictionStatus").Element("code")), //需要返回的Independence status code
                                                Desc = inStrument.GetElementValue(sourceParty.Element("independenceRestrictionStatus").Element("desc")), //需要返回的Independence status
                                            }
                                        }).ToList();
     PartyDetailSearchResult partyDetailSearchResult = new PartyDetailSearchResult
     {
         IndependenceStatus = sourceParties[0].independenceRestrictionStatus.Desc,
         IndependenceStatusCode = sourceParties[0].independenceRestrictionStatus.Code
     };
     return partyDetailSearchResult;
 }