Kirill F
Kirill F

Reputation: 41

Generate C# class from WSDL file

I'm trying generate several C# classes from WSDL file. I tried to use an google to get information how I can convert it(Converting WSDL to C# classes), but unfortunately it doesn't help. If you can help me - thanks. My file at some website: https://Example/Example.wsdl - it's not correct way, just example. How I can convert it to C# class by VisualStudio 2019. enter image description here

Upvotes: 4

Views: 15654

Answers (1)

Arun_Raja1
Arun_Raja1

Reputation: 285

In your case there is a way to convert the file to c# file. Do as following.

  • Open Visual Studio Command prompt as a administrator by going to
    Start menu > All Programs > Microsoft Visual Studio 2019 > Visual Studio Tools > Developer Command Prompt for VS 2019.

  • Put your WSDL file in somewhere accessible e.g. in this case I will put it in my C drive and getting output CS class in C drive too but you can change it. Type this command and press okay

    C:\Program Files (x86)\Microsoft Visual Studio 19.0\VC>wsdl /l:C# /out:C:\OutPutClassName.cs C:\myWebService.wsdl

This process will create your WSDL file to the C# class file on the same folder.

Upvotes: 7

Related Questions