【发布时间】:2022-01-24 04:00:03
【问题描述】:
我有一个在 AWS 实例上运行的 Web 服务。可以在这里到达http://mqlistener-dev.us-east-2.elasticbeanstalk.com/WebService.asmx。当我将此 url 输入浏览器时,我被带到实例并显示一个页面。这是我预期会发生的。我在创建 SOAP 请求的 c# 应用程序中有代码,我能够发送该请求并返回响应。
我现在希望能够从 Postman 中创建 SOAP 请求。我相信我已经完成了所有设置,但我不断收到无效的主机名 HTTP 错误 400 消息。这是 Postman 的 CURL 代码:
curl --location --request POST 'http://mqlistener-dev.us-east-2.elasticbeanstalk.com/WebService.asmx' \
--header 'SOAPAction: http://jrstestsite.org/mq' \
--header 'Content-Type: text/xml;charset="utf-8"' \
--header 'Accept: text/xml' \
--data-raw '<?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>
<mq xmlns="http://jrstestsite.org/">
<mqRequest> </mqRequest>
</mq>
</soap:Body>
</soap:Envelope>'
知道为什么 Postman 无法联系到http://mqlistener-dev.us-east-2.elasticbeanstalk.com/WebService.asmx吗?
谢谢。
【问题讨论】: