【发布时间】:2010-03-09 08:38:49
【问题描述】:
我正在尝试创建一个允许用户输入信息的 asp.net Web 表单,然后通过 XMLwriter 将此信息发送到 Web 服务。
这是应该输出的xml的sn-p;
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body xmlns:ns1="http://its/foo.wsdl">
我尝试通过代码来操作它;
xml.WriteStartElement("soap", "Envelope", "http://schemas.xmlsoap.org/soap/envelope/")
xml.WriteAttributeString("xmlns", "ns1", "http://its/foo.wsdl")
但我收到此错误:
The 'xmlns' attribute is bound to the reserved namespace 'http://www.w3.org/2000/xmlns/'.
谁能告诉我我做错了什么?
谢谢。
【问题讨论】:
标签: asp.net xml web-services syntax