コード例 #1
0
        static public string TestPolicy(PolicyDocumentEntity policyDoc, QueryEntity cie)
        {
            xmlGenerate gen     = new xmlGenerate();
            string      request = gen.generate(cie);
            string      policy  = gen.generate(policyDoc);

            string res = string.Empty;

            try
            {
#if REMOTE_SERVICE
                policyService.TestPolicy policyService = new PolicyBuilder.policyService.TestPolicy();
                res = policyService.Test(policy, request);
#else
                policyShimLib.TestPolicyClass tpc = new policyShimLib.TestPolicyClass();
                res = tpc.Test(policy, request);
#endif
            }
            catch (Exception ex)
            {
                res = "!!service down!! - try refresh " + ex.Message;
            }

            return(res);
        }
コード例 #2
0
        public static string TestPolicy(PolicyDocumentEntity policyDoc, QueryEntity cie)
        {
            xmlGenerate gen = new xmlGenerate();
            string request = gen.generate(cie);
            string policy = gen.generate(policyDoc);

            string res = string.Empty;
            try
            {
            #if REMOTE_SERVICE
                policyService.TestPolicy policyService = new PolicyBuilder.policyService.TestPolicy();
                res = policyService.Test(policy, request);
            #else
                policyShimLib.TestPolicyClass tpc = new policyShimLib.TestPolicyClass();
                res = tpc.Test(policy, request);
            #endif
            }
            catch (Exception ex)
            {
                res = "!!service down!! - try refresh " + ex.Message;
            }

            return res;
        }