我正在尝试构造一个soap信封来发送数据,当我实例化XmlDocument对象时,我收到此错误“cs0103名称'debuggerDisplayProxy'在当前上下文中不存在”。我不知道它是什么或如何解决它。我在网上搜索并没有找到任何有用的东西。你能帮忙吗?
下面是我尝试编写信封的代码:
private static System.Xml.XmlDocument CreateSoapEnvelope(string xml)
{
var soapEnvelope = new System.Xml.XmlDocument();
soapEnvelope.LoadXml(@"<?xml version=""1.0"" encoding=""utf-8""?>
<soap:Envelope
xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/""
xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""
xmlns:xsd=""http://www.w3.org/2001/XMLSchema"">
<soap:Body>
<HelloWorld3 xmlns=""
http://localhost:52700/api/SOAPService/PostObject"">"
+ xml +
"</HelloWorld3></soap:Body></soap:Envelope>");
return soapEnvelope;
}
下面是错误: