コード例 #1
0
        /// <summary>
        /// Tests a call to Activity Service
        /// </summary>
        static void TestActivityService()
        {
            Console.WriteLine("TestActivityService");
            System.ServiceModel.Channels.Binding binding = FaBindingFactory.GetUsernameTokenOverSslBinding();
            EndpointAddress       endpointAddress        = new EndpointAddress(new Uri("Url to the service"));
            ActivityServiceClient client = FaServiceFactory.GetActivityServiceClient(binding, endpointAddress, new NetworkCredential(userName, password));

            FusionApplicationAccelerator.ActivityServiceReference.FindCriteria findCriteria = new FusionApplicationAccelerator.ActivityServiceReference.FindCriteria();
            findCriteria.fetchSize  = 2;
            findCriteria.fetchStart = 0;
            string[] findAttributes = new string[1] {
                "ActivityId"
            };
            findCriteria.findAttribute = findAttributes;

            FusionApplicationAccelerator.ActivityServiceReference.FindControl findControl = new FusionApplicationAccelerator.ActivityServiceReference.FindControl();
            Activity[] result = client.findActivity(findCriteria, findControl);
            if (null != result && result.Length > 0)
            {
                foreach (Activity activity in result)
                {
                    Console.WriteLine("  activity = " + activity.ActivityId);
                }
            }
            else
            {
                if (null == result)
                {
                    Console.WriteLine("  activity null ");
                }
                else
                {
                    Console.WriteLine("  activity empty ");
                }
            }
        }
コード例 #2
0
ファイル: Tester.cs プロジェクト: rajnish732/Oracle-Cloud
        /// <summary>
        /// Tests a call to Activity Service
        /// </summary>
        static void TestActivityService()
        {
            Console.WriteLine("TestActivityService");
            System.ServiceModel.Channels.Binding binding = FaBindingFactory.GetUsernameTokenOverSslBinding();
            EndpointAddress endpointAddress = new EndpointAddress(new Uri("Url to the service"));
            ActivityServiceClient client = FaServiceFactory.GetActivityServiceClient(binding, endpointAddress, new NetworkCredential(userName, password));
            FusionApplicationAccelerator.ActivityServiceReference.FindCriteria findCriteria = new FusionApplicationAccelerator.ActivityServiceReference.FindCriteria();
            findCriteria.fetchSize = 2;
            findCriteria.fetchStart = 0;
            string[] findAttributes = new string[1] { "ActivityId" };
            findCriteria.findAttribute = findAttributes;

            FusionApplicationAccelerator.ActivityServiceReference.FindControl findControl = new FusionApplicationAccelerator.ActivityServiceReference.FindControl();
            Activity[] result = client.findActivity(findCriteria, findControl);
            if (null != result && result.Length > 0)
            {
                foreach (Activity activity in result)
                {
                    Console.WriteLine("  activity = " + activity.ActivityId);
                }
            }
            else
            {
                if (null == result)
                {
                    Console.WriteLine("  activity null ");
                }
                else
                {
                    Console.WriteLine("  activity empty ");
                }
            }
        }