コード例 #1
0
        static void Main(string[] args)
        {
            SearchLocationsRequest request = CreateSearchLocationsRequest();
            //
            LocationsService service = new LocationsService();

            if (usePropertyFile())
            {
                service.Url = getProperty("endpoint");
            }
            //
            try
            {
                // Call the Locations web service passing in a SearchLocationsRequest and returning a SearchLocationsReply
                SearchLocationsReply reply = service.searchLocations(request);
                if (reply.HighestSeverity == NotificationSeverityType.SUCCESS || reply.HighestSeverity == NotificationSeverityType.NOTE || reply.HighestSeverity == NotificationSeverityType.WARNING)
                {
                    ShowSearchLocationsReply(reply);
                }
                ShowNotifications(reply);
            }
            catch (SoapException e)
            {
                Console.WriteLine(e.Detail.InnerText);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
            Console.WriteLine("Press any key to quit!");
            Console.ReadKey();
        }