我正在使用 Fiddler 向我的网络服务发布一个肥皂请求。我在使用控制台应用程序客户端(使用服务引用代理)时捕获了来自服务的请求。通过服务参考客户端的请求工作正常。但是,当我在提琴手中使用相同的请求数据时,我收到 400 bad request 错误。我在提琴手中使用的请求数据如下。任何指导都会很棒!
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<To s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://localhost:51909/Service1.svc</To>
<Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://tempuri.org/IService1/Test</Action>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Test xmlns="http://tempuri.org/">
<request>
<Data xmlns="http://www.hr-xml.org/3">
<Position>
<DocID>1234556677</DocID>
</Position>
</Data>
</request>
</Test>
</s:Body>
</s:Envelope>
在提琴手中使用以下内容标题
内容长度:786 内容类型:文本/xml SoapAction:http ://tempuri.org/Service1/Test
编辑:我发现了确切的错误,但我不确定它是什么意思。错误是寻址版本“AddressingNone (http://schemas.microsoft.com/ws/2005/05/addressing/none)”不支持添加 WS-Addressing 标头。有任何想法吗?