Consuming a Webservice (WSDL) using monodevelop C#

2019-06-09 02:57发布

I'm exploring monodevelop C# for a project I'm moving from away from PHP. I'm currently developing on Windows 7 , and have installed monodevelop 4.0
The instructions for consuming a webservice describes compiling a WSDL uri using a command line tool called mcs

http://www.mono-project.com/Consuming_a_WebService

My monodevelop install does not seem to have installed these cli tools. I have checked the installation path.

The application will be a gtk desktop application, but needs to use web-servers (WSDL)

Questions
1) Is there something else I need to install to get the mcs tool at command line
2) Is using the mcs tool to create a stub assembly .dll for the WSDL the only method

Many Thanks

1条回答
看我几分像从前
2楼-- · 2019-06-09 03:31

mcs is one of the C# compilers that is included with Mono. On Windows unless you installed Mono separately then mcs will not be available. MonoDevelop on Windows uses Microsoft's .NET Framework and does not need Mono to be installed.

In MonoDevelop 4.0 there is a simpler way to create a proxy/stub class for calling a web service. Simply open your solution, open the Solution window (View - Solution), right click your project and select Add - Add Web Reference.

This opens up an Add Web Reference dialog where you can enter the url for the WSDL file and create the proxy class by clicking the OK button.

查看更多
登录 后发表回答