我試圖在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請求中丟失了什麼。