通过 curl 发出 soap 请求无效并且服务器返回 "Empty reply from server"
issues a soap request via curl not working and server returning "Empty reply from server"
您好,我正在尝试使用 curl 向 soap 端点发出 post 请求。然而,它没有 return 任何东西。然后是 curl 请求。
curl -v -X POST --header "Content-Type: text/xml;charset=UTF-8" --data @soap-req.xml http://192.168.123.219:8085/engage/stats
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 192.168.123.219...
* TCP_NODELAY set
* Connected to 192.168.123.219 (192.168.123.219) port 8085 (#0)
> POST /engage/stats HTTP/1.1
> Host: 192.168.123.219:8085
> User-Agent: curl/7.54.0
> Accept: */*
> Content-Type: text/xml;charset=UTF-8
> Content-Length: 309
>
* upload completely sent off: 309 out of 309 bytes
* Empty reply from server
* Connection #0 to host 192.168.123.219 left intact
curl: (52) Empty reply from server
以下是文件soap request 9 soap-req.xml
的内容
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:eng="http://openmindnetworks.com/engage/">
<soapenv:Header/>
<soapenv:Body>
<eng:getCampaignStats>
<id>f4202b29-5db5-4cec-965f-70710fcdb60d</id>
</eng:getCampaignStats>
</soapenv:Body>
</soapenv:Envelope>
然而,当我使用肥皂时 UI,它工作正常。
如果您能帮我解决问题,我们将不胜感激
谢谢
每当我提出 soap 请求时,我们都应该始终添加 soapaction header。由于它丢失了,服务器的响应为空。
curl -H 'Content-Type: application/soap+xml; charset=UTF-8'
-H 'SOAPAction: http://openmindnetworks.com/engage/getCampaignStats'
--data @soap-req.xml http://192.168.123.219:8085/engage/stats
您好,我正在尝试使用 curl 向 soap 端点发出 post 请求。然而,它没有 return 任何东西。然后是 curl 请求。
curl -v -X POST --header "Content-Type: text/xml;charset=UTF-8" --data @soap-req.xml http://192.168.123.219:8085/engage/stats
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 192.168.123.219...
* TCP_NODELAY set
* Connected to 192.168.123.219 (192.168.123.219) port 8085 (#0)
> POST /engage/stats HTTP/1.1
> Host: 192.168.123.219:8085
> User-Agent: curl/7.54.0
> Accept: */*
> Content-Type: text/xml;charset=UTF-8
> Content-Length: 309
>
* upload completely sent off: 309 out of 309 bytes
* Empty reply from server
* Connection #0 to host 192.168.123.219 left intact
curl: (52) Empty reply from server
以下是文件soap request 9 soap-req.xml
的内容<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:eng="http://openmindnetworks.com/engage/">
<soapenv:Header/>
<soapenv:Body>
<eng:getCampaignStats>
<id>f4202b29-5db5-4cec-965f-70710fcdb60d</id>
</eng:getCampaignStats>
</soapenv:Body>
</soapenv:Envelope>
然而,当我使用肥皂时 UI,它工作正常。
如果您能帮我解决问题,我们将不胜感激
谢谢
每当我提出 soap 请求时,我们都应该始终添加 soapaction header。由于它丢失了,服务器的响应为空。
curl -H 'Content-Type: application/soap+xml; charset=UTF-8'
-H 'SOAPAction: http://openmindnetworks.com/engage/getCampaignStats'
--data @soap-req.xml http://192.168.123.219:8085/engage/stats