[英]Calling webservice from c# forms app
I have a webservice with a method in it. 我有一个web服务,里面有一个方法。
I can call it fine from ac# webapp using the following: 我可以使用以下代码从ac#webapp调用它:
MyWebService mws = new MyWebService();
mws.MyMethod();
However, if I try and call it from ac# forms app, I add the webservice in the same way. 但是,如果我尝试从ac#forms app调用它,我会以相同的方式添加webservice。
This time if I use intellisense, I get the following methods / properties: 这次如果我使用intellisense,我会得到以下方法/属性:
MyMethodRequest
MyMethodRequestBody
MyMethodResponse
MyMethodResponseBody
MyWebServiceSoap
MyWebServiceSoapChannel
MyWebServiceSoapClient
How do I call my method? 我该如何调用我的方法?
most probably: 最可能:
MyWebServiceSoapClient client = new MyWebServiceSoapClient();
client.MyMethod();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.