简体   繁体   中英

Consuming a Webservice (WSDL) using monodevelop C# on 4.0 on Windows 7 Pro

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM