Reading WSDL using ServiceDescription , C#

  • Thread starter Thread starter StephaneT
  • Start date Start date
S

StephaneT

Hi,

I try to read the schema element (tag <types>) with
ServiceDescription, but Attributes, Elements and SchemaTypes
collections are empty.

Sample of code :

//ServiceDescription
ServiceDescription sd = new ServiceDescription();
XmlTextReader wsdl = new XmlTextReader("file.wsdl");
sd = ServiceDescription.Read(wsdl);
//
sd.Types.Schemas[0].Attributes.Count; //empty !!!
sd.Types.Schemas[0].Elements.Count; //empty !!!
sd.Types.Schemas[0].SchemaTypes.Count; //empty !!!
sd.Types.Schemas[0].Items.Count;// not empty !!!
//

how to make to obtain the parameters of the various functions with
ServiceDescription ???

Thanks,
Stéphane
 
Back
Top