如何调用SOAP服务? [英] How to call SOAP services?

查看:101
本文介绍了如何调用SOAP服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个旧版SOAP asmx Web服务,我需要使用最新的.NET Framework进行交互.我们是否已经摆脱了不得不使用HttpClient手动构造所有调用的局面?我不能通过Visual Studio以某种方式添加服务参考吗 并使用引用服务的对象,然后仅调用公开的方法?我很难找到好的文档和示例.

I have a legacy SOAP asmx web service I need to interact with using the latest .NET Framework.  Have we not evolved past having to use HttpClient to manually construct all the calls?  Can't I add a service reference somehow through visual studio and use an object that references the service, and then just call the methods exposed?  I am having trouble finding good documentation and examples.

这是我要避免的事情,它必须比这更容易:
https://forums.asp.net/t/2123810.aspx?Make+a+web+service+request+and+read+response+from+example+cUrl

This is what I want to avoid, it must be easier than this:
https://forums.asp.net/t/2123810.aspx?Make+a+web+service+request+and+read+response+from+example+cUrl

推荐答案

以上是您通过VS使用asmx Web服务的方式.

The above is how you consume an asmx Web service through VS.

这是如何使用Web服务WSDL来使用asmx Web服务的另一个示例.

Here is another example of how to consume an asmx Web service using the Web services WSDL.

https://www.sitepoint.com/net-web-services-5-steps/


这篇关于如何调用SOAP服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆