using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web.Services.Description; using System.IO; using System.Xml; namespace wsdlreader { class Program { static void Main(string[] args) { ServiceDescription wsdl = ServiceDescription.Read(@"C:\Inetpub\wwwroot\WebService1\t.wsdl"); foreach (PortType pt in wsdl.PortTypes) { Console.WriteLine("PortType {0}", pt.Name); foreach (Operation op in pt.Operations) { Console.WriteLine("\tOperation: {0}", op.Name); foreach (OperationMessage msg in op.Messages) { if (msg is OperationInput) Console.WriteLine("\t\tInput Message: {0}", msg.Message); else if (msg is OperationOutput) Console.WriteLine("\t\tOutput Message: {0}", msg.Message); else Console.WriteLine("\t\tFault Message: {0}", msg.Message); } } } } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)