Microsoft.ServiceModel.Web.HelpPageInvoker.GetRequestXmlSchema C# (CSharp) Method

GetRequestXmlSchema() public method

public GetRequestXmlSchema ( string operation ) : Message
operation string
return Message
        public Message GetRequestXmlSchema(string operation)
        {
            foreach (OperationDescription od in this.Description.Operations)
            {
                if (od.Name == operation)
                {
                    
                    bool isXmlSerializerType;
                    Type body = GetRequestBodyType(od, out isXmlSerializerType);
                    Message result;
                    if (IsBodySpecial(body, "request", out result))
                    {
                        return result;
                    }
                    try
                    {
                        return CreateSchema(body, isXmlSerializerType);
                    }
                    catch (Exception e)
                    {
                        return CreateTextMessage(String.Format("Could not generate schema for request. Failed with error: {0}", e.Message));
                    }
                }
            }
            return null;
        }