【问题标题】:Bad request using postman to test soap service使用邮递员测试肥皂服务的错误请求
【发布时间】:2018-09-24 01:05:36
【问题描述】:

您好,我想使用邮递员测试 Web 服务,但很难获得有效响应。这是我要发送的内容 标题

Content-Type:text/xml; charset=utf-8
Content-Length:402
SOAPAction:"http://tempuri.org/TestGetItem"

身体

<?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://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <TestGetItem xmlns="http://tempuri.org">
      <user>ht</user>
      <password>8522</password>
      <input>1942002</input>
    </TestGetItem>
  </soap:Body>
</soap:Envelope>

服务位于http://localhost:8050/GagarinWebService/ItemService.asmx 我正在尝试向http://localhost:8050/GagarinWebService/ItemService.asmx?op=TestGetItem提出请求

我在这里做错了什么?

【问题讨论】:

    标签: web-services post soap postman


    【解决方案1】:

    好的,我想通了,Content-Length 计算错误,407 不是 402

    【讨论】:

      猜你喜欢
      • 2018-08-18
      • 2016-12-18
      • 2014-01-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多