WebService 动态调用库 WebService Data Provider

码农软件 · 软件分类 · WEB服务/SOAP/SOA · 2019-04-09 08:41:27

软件介绍

WebServiceDataProvider

WebServiceDataProvider是一个用于动态调用WebService的C#类库,使用此类库,不仅可以仅通过两三条语句来调用WebService提供的方法,还可以使用动态编译的代码来调用这些方法。你无需在编译前添加好WebService的引用,只用添加这个类库,你就可以在需要时轻松使用WebService提供的服务。

依赖

  • Newtonsoft.json >= 11.0.2

快速开始

在你的项目中搜索并添加名为“Scottxu.WebServiceDataProvider”的NuGet程序包,即可使用。

如何使用

只需简单的几行代码,就可以调用任何WebService。

使用方法名调用

using Scottxu.WebServiceDataProvider;
var connection = new Connection("http://xxxx/xxxx.asmx");
var command = connection.GetMethodCommand("WebService方法名", "WebService名称");
string returnString = connection.Query();

使用动态编译的C#代码调用

using Scottxu.WebServiceDataProvider;
var connection = new Connection("http://xxxx/xxxx.asmx");
var command = connection.GetCSharpCommand(
  "var webService = new WebService名称();" +
  "return webService.WebService方法名();" +
  );
string returnString = connection.Query();

联系作者

如果有任何问题请写Issus。

Email:xyc0714@aliyun.com

本文地址:https://codercto.com/soft/d/3183.html

The Sovereign Individual

The Sovereign Individual

James Dale Davidson、William Rees-Mogg / Free Press / 1999-08-26 / USD 16.00

Two renowned investment advisors and authors of the bestseller The Great Reckoning bring to light both currents of disaster and the potential for prosperity and renewal in the face of radical changes ......一起来看看 《The Sovereign Individual》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器