我试图在ReadyAPI中使用API,但它不适用于我。当我通过CURL执行请求时,它工作正常。任何帮助,将不胜感激。SoapUi请求返回404,但curl工作正常
这里是通过卷曲的请求的格式的一个样本,该端部被URL编码:
curl -k -X POST https://myHost.test/999299/profile/SAML2/SOAP/https%3A%2F%2FmyHost.test-999299 -H
"Content-Type: text/xml" -d '{
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
body
</S:Body>
</S:Envelope>
}'
这将返回我期望的正确响应。然而,当我使用这个在了SoapUI和URL进入一个新的REST服务它去掉了URL编码,并形成这样的请求:
POST https://myHost.test/999299/profile/SAML2/SOAP/https://myHost.test-999299 HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml
Content-Length: 555
Host: myHost.test
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_102)
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
body
</S:Body>
</S:Envelope>
此请求返回404未找到。不知道URL编码是否重要,但是当我手动添加它时,它会给我一个内部服务器错误。我在soapui请求中丢失了什么。