/// <summary>
        /// Gets the status of the service.
        /// Status is one of GREEN, RED representing:
        /// GREEN: This API section of the service is operating normally.
        /// RED: The service is disrupted.
        ///
        /// </summary>
        /// <param name="service">Instance of FBAInventoryServiceMWS service</param>
        /// <param name="request">GetServiceStatusRequest request</param>
        public static void InvokeGetServiceStatus(FBAInventoryServiceMWS service, GetServiceStatusRequest request)
        {
            try
            {
                GetServiceStatusResponse response = service.GetServiceStatus(request);


                Console.WriteLine("Service Response");
                Console.WriteLine("=============================================================================");
                Console.WriteLine();

                Console.WriteLine("        GetServiceStatusResponse");
                if (response.IsSetGetServiceStatusResult())
                {
                    Console.WriteLine("            GetServiceStatusResult");
                    GetServiceStatusResult getServiceStatusResult = response.GetServiceStatusResult;
                    if (getServiceStatusResult.IsSetStatus())
                    {
                        Console.WriteLine("                Status");
                        Console.WriteLine("                    {0}", getServiceStatusResult.Status);
                    }
                    if (getServiceStatusResult.IsSetTimestamp())
                    {
                        Console.WriteLine("                Timestamp");
                        Console.WriteLine("                    {0}", getServiceStatusResult.Timestamp);
                    }
                }
                if (response.IsSetResponseMetadata())
                {
                    Console.WriteLine("            ResponseMetadata");
                    ResponseMetadata responseMetadata = response.ResponseMetadata;
                    if (responseMetadata.IsSetRequestId())
                    {
                        Console.WriteLine("                RequestId");
                        Console.WriteLine("                    {0}", responseMetadata.RequestId);
                    }
                }
            }
            catch (FBAInventoryServiceMWSException ex)
            {
                Console.WriteLine("Caught Exception: " + ex.Message);
                Console.WriteLine("Response Status Code: " + ex.StatusCode);
                Console.WriteLine("Error Code: " + ex.ErrorCode);
                Console.WriteLine("Error Type: " + ex.ErrorType);
                Console.WriteLine("Request ID: " + ex.RequestId);
                Console.WriteLine("XML: " + ex.XML);
            }
        }
        /// <summary>
        /// Returns the service status of a particular MWS API section. The operation
        /// takes no input.
        /// All API sections within the API are required to implement this operation.
        ///
        /// </summary>
        /// <param name="service">Instance of MarketplaceWebServiceProducts service</param>
        /// <param name="request">GetServiceStatusRequest request</param>
        public static void InvokeGetServiceStatus(MarketplaceWebServiceProducts service, GetServiceStatusRequest request)
        {
            try
            {
                GetServiceStatusResponse response = service.GetServiceStatus(request);


                Console.WriteLine("Service Response");
                Console.WriteLine("=============================================================================");
                Console.WriteLine();

                Console.WriteLine("        GetServiceStatusResponse");
                if (response.IsSetGetServiceStatusResult())
                {
                    Console.WriteLine("            GetServiceStatusResult");
                    GetServiceStatusResult getServiceStatusResult = response.GetServiceStatusResult;
                    if (getServiceStatusResult.IsSetStatus())
                    {
                        Console.WriteLine("                Status");
                        Console.WriteLine("                    {0}", getServiceStatusResult.Status);
                    }
                    if (getServiceStatusResult.IsSetTimestamp())
                    {
                        Console.WriteLine("                Timestamp");
                        Console.WriteLine("                    {0}", getServiceStatusResult.Timestamp);
                    }
                    if (getServiceStatusResult.IsSetMessageId())
                    {
                        Console.WriteLine("                MessageId");
                        Console.WriteLine("                    {0}", getServiceStatusResult.MessageId);
                    }
                    if (getServiceStatusResult.IsSetMessages())
                    {
                        Console.WriteLine("                Messages");
                        MessageList    messages    = getServiceStatusResult.Messages;
                        List <Message> messageList = messages.Message;
                        foreach (Message message in messageList)
                        {
                            Console.WriteLine("                    Message");
                            if (message.IsSetLocale())
                            {
                                Console.WriteLine("                        Locale");
                                Console.WriteLine("                            {0}", message.Locale);
                            }
                            if (message.IsSetText())
                            {
                                Console.WriteLine("                        Text");
                                Console.WriteLine("                            {0}", message.Text);
                            }
                        }
                    }
                }
                if (response.IsSetResponseMetadata())
                {
                    Console.WriteLine("            ResponseMetadata");
                    ResponseMetadata responseMetadata = response.ResponseMetadata;
                    if (responseMetadata.IsSetRequestId())
                    {
                        Console.WriteLine("                RequestId");
                        Console.WriteLine("                    {0}", responseMetadata.RequestId);
                    }
                }
                Console.WriteLine("            ResponseHeaderMetadata");
                Console.WriteLine("                RequestId");
                Console.WriteLine("                    " + response.ResponseHeaderMetadata.RequestId);
                Console.WriteLine("                ResponseContext");
                Console.WriteLine("                    " + response.ResponseHeaderMetadata.ResponseContext);
                Console.WriteLine("                Timestamp");
                Console.WriteLine("                    " + response.ResponseHeaderMetadata.Timestamp);
                Console.WriteLine();
            }
            catch (MarketplaceWebServiceProductsException ex)
            {
                Console.WriteLine("Caught Exception: " + ex.Message);
                Console.WriteLine("Response Status Code: " + ex.StatusCode);
                Console.WriteLine("Error Code: " + ex.ErrorCode);
                Console.WriteLine("Error Type: " + ex.ErrorType);
                Console.WriteLine("Request ID: " + ex.RequestId);
                Console.WriteLine("XML: " + ex.XML);
                Console.WriteLine("ResponseHeaderMetadata: " + ex.ResponseHeaderMetadata);
            }
        }