Soap 无法确定请求的根元素

Soap 无法确定请求的根元素,soap,Soap,当我尝试发布一些SOAP请求时,出现以下错误: <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://www.w3.org/2003/05/soap-envelope">

当我尝试发布一些SOAP请求时,出现以下错误:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"  
 xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
   <soap:Body>
    <soap:Fault>
        <soap:Code>
            <soap:Value>soap:Receiver</soap:Value>
        </soap:Code>
        <soap:Reason>
            <soap:Text>The root element for the request could not be determined. When RoutingStyle is set to RequestElement, SoapExtensions configured via an attribute on the method cannot modify the request stream before it is read. The extension must be configured via the SoapExtensionTypes element in web.config or the request must arrive at the server as clear text.</soap:Text>
        </soap:Reason>
    </soap:Fault>
</soap:Body>

肥皂:接收器
无法确定请求的根元素。当RoutingStyle设置为RequestElement时,通过方法上的属性配置的SoapExtensions无法在读取请求流之前修改请求流。扩展必须通过web.config中的SoapExtensionTypes元素进行配置,或者请求必须以明文形式到达服务器。

我正在使用

 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
  xmlns:m="http://test.#######.co.uk/ws-b/>
    <soapenv:Body>
     <hs:logon>
       <hs:username>USER</m:username>
       <hs:password>pass123</m:password>
    </hs:logon>
  </soapenv:Body>
</soapenv:Envelope>
似乎未声明“hs”命名空间。此外,关闭标记的命名空间与打开标记的命名空间不同。你能试试吗

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
  xmlns:hs="http://test.#######.co.uk/ws-b/">
    <soapenv:Body>
     <hs:logon>
       <hs:username>USER</hs:username>
       <hs:password>pass123</hs:password>
    </hs:logon>
  </soapenv:Body>
</soapenv:Envelope>

使用者
密码123
似乎未声明“hs”命名空间。此外,关闭标记的命名空间与打开标记的命名空间不同。你能试试吗

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
  xmlns:hs="http://test.#######.co.uk/ws-b/">
    <soapenv:Body>
     <hs:logon>
       <hs:username>USER</hs:username>
       <hs:password>pass123</hs:password>
    </hs:logon>
  </soapenv:Body>
</soapenv:Envelope>

使用者
密码123

这就是我最终要做的工作:

<Envelope xmlns="http://www.w3.org/2003/05/soap-envelope">
    <Body>
        <logon xmlns="http://tempuri.org/">
            <username>user</username>
            <password>password</password>

        </logon>
    </Body>
</Envelope>

用户
密码

这就是我最终要做的工作:

<Envelope xmlns="http://www.w3.org/2003/05/soap-envelope">
    <Body>
        <logon xmlns="http://tempuri.org/">
            <username>user</username>
            <password>password</password>

        </logon>
    </Body>
</Envelope>

用户
密码

他在
xmlns:hs
名称空间周围缺少一个结束引号,还有其他问题。我错过了结束标记名称空间-我已经更正并在名称空间上添加了结束引号-但我仍然遇到同样的问题。他在
xmlns:hs
名称空间周围缺少一个结束引号,在其他问题中,我错过了结束标记名称空间——我已经纠正了它并在名称空间中添加了结束引号——但我仍然遇到同样的问题。