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

蓝咒 提交于 2020-01-24 00:26:31

问题


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:


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.



来源:https://stackoverflow.com/questions/25126924/consuming-a-webservice-wsdl-using-monodevelop-c-sharp-on-4-0-on-windows-7-pro

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!