电脑桌面
添加蚂蚁七词文库到电脑桌面
安装后可以在桌面快捷访问

迁移调用webservice的.net wcf项目到.net6,由于转义字符&导致接口不通

来源:金蝶云社区作者:金蝶2024-09-163

迁移调用webservice的.net wcf项目到.net6,由于转义字符&导致接口不通

//迁移调用webservice的.net wcf项目到.net6,由于webservice地址带转义字符例如&导致接口不通




private void TestWs()
{
//<?xml version=\"1.0\" encoding=\"utf-8\"?>
string xml = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:asi=\"http://siebel.com/asi/\" ><soapenv:Header><UsernameToken xmlns=\"http://siebel.com/webservices\">LIULL113650</UsernameToken><PasswordText xmlns=\"http://siebel.com/webservices\">LIULL113650</PasswordText></soapenv:Header><soapenv:Body><asi:Hans_spcAccount_spcInfo_spcQuery_spcWF><SearchExpr>[Account.Id]=&apos;1-F188GK&apos;</SearchExpr></asi:Hans_spcAccount_spcInfo_spcQuery_spcWF></soapenv:Body></soapenv:Envelope>";
HttpContent content = new StringContent(xml, Encoding.UTF8, "text/xml");
//content.Headers.Add("SOAPAction", "http://tempuri.org/LIS

迁移调用webservice的.net wcf项目到.net6,由于转义字符&amp;导致接口不通

//迁移调用webservice的.net wcf项目到.net6,由于webservice地址带转义字符例如&amp;导致接口不通private void TestWs(){//<?xml version=\...
点击下载文档文档为doc格式

声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。如若本站内容侵犯了原著者的合法权益,可联系本站删除。

已经是第一篇
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息
QQ群
  • 答案:my7c点击这里加入QQ群
支持邮箱
微信
  • 微信