惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 司徒正美
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs
Martin Fowler
Martin Fowler
罗磊的独立博客
The GitHub Blog
The GitHub Blog
L
LangChain Blog
A
About on SuperTechFans
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
DataBreaches.Net
宝玉的分享
宝玉的分享
U
Unit 42
阮一峰的网络日志
阮一峰的网络日志
Last Week in AI
Last Week in AI
N
Netflix TechBlog - Medium
The Cloudflare Blog
Microsoft Azure Blog
Microsoft Azure Blog
H
Help Net Security
美团技术团队
大猫的无限游戏
大猫的无限游戏
雷峰网
雷峰网
爱范儿
爱范儿
酷 壳 – CoolShell
酷 壳 – CoolShell
MongoDB | Blog
MongoDB | Blog

博客园 - 81

海康摄像机叠加文字显示 sip视频通话 easyGBS 003忘记成本(2026年3月25日) PostgreSQL插件TimeScaleDB基本使用 mssql的列存储 duckdb数据库操作 Oracle数据高效插入 西门子S7 PLC对接【转】 006股息很重要(2026年1月12日) 005独立思考(2026年1月9日) 004人的一生只需富一次(2026年1月7日) 003盈亏同源(2026年1月6日) 002投资赚钱的方法很多,要找到适合自己的(2026年1月5日) 001买股票就是买企业(2026年1月3日) mysql嵌套查询如何利用索引? 串口通信中的流控,RtsEnable,DtrEnable ,Handshake 。如果通信失败则各种组合测试一下。uartassist串口调试工作支持流控参数 aot跨平台 C# 读写opc ua服务器,浏览所有节点,读写节点,读历史数据,调用方法,订阅,批量订阅操作 银河麒麟安装dotnet8 Picturebox控件中图片的旋转
。net8调用webservice函数
81 · 2025-12-19 · via 博客园 - 81
1. nuget中加两个引用,注意:一定是要4.10.3这个版本,最新的10版本不行
<PackageReference Include="System.ServiceModel.Http" Version="4.10.3" /> <PackageReference Include="System.ServiceModel.Primitives" Version="4.10.3" />

2. 生成包装类,注意所指定的namespace,指令生成一个Reference.cs文件


net8调用webservice.ServiceReference2.WebService1SoapClient c = new net8调用webservice. ServiceReference2.WebService1SoapClient(net8调用webservice.ServiceReference2.WebService1SoapClient.EndpointConfiguration.WebService1Soap12);
byte[] buf = System.Text.UTF8Encoding.UTF8.GetBytes("abca中楞");
var t = await c.HelloWorld2Async("abc在", buf);
this.textBox1.Text = t.Body.HelloWorld2Result;