【发布时间】:2020-08-07 01:48:28
【问题描述】:
我正在尝试在机器人工具中自动执行肥皂请求,我尝试了各种组合但徒劳无功。以下是我试图自动化的请求。我已将其保存在一个 XML 文件中,以便在测试用例中调用。 有人可以帮助我如何阅读肥皂请求并将内容发送到端点吗?
SOAP 请求:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://www.example.com/XMLHeader/10"
xmlns:req="http://www.example.com/cream1/cream11I/deleteemailAddress/xyz/Req">
<soapenv:Header>
<ns:vendortool>
<ns:HeaderVersion>11</ns:HeaderVersion>
<ns:MessageId>1234556667</ns:MessageId>
<ns:ServiceRequestorDomain>ABCCCC</ns:ServiceRequestorDomain>
<ns:ServiceRequestorId>health</ns:ServiceRequestorId>
<ns:ServiceProviderDomain>zxcvvbb</ns:ServiceProviderDomain>
<ns:ServiceId>deleteemail</ns:ServiceId>
<ns:ServiceVersion>000</ns:ServiceVersion>
<ns:FaultIndication>True</ns:FaultIndication>
<ns:MessageTimestamp>2020-03-27T11:12:49.418</ns:MessageTimestamp>
</ns:vendortool>
</soapenv:Header>
<soapenv:Body>
<req:deleteemailAddress_Req>
<req:EmailAddress>zsdfghklaa9@gmail.com</req:EmailAddress>
</req:deleteemailAddress_Req>
</soapenv:Body>
</soapenv:Envelope>
测试用例(我试过)
create session deleteemail ${base_url} disable_warnings=1
#Create Request Headers
&{request_header}= create dictionary Content-Type=text/xml; charset=utf-8 User-Agent=Apache-
HttpClient/4.1.1
${Test_Response}= post request deleteemail ${channel_url} ${CURDIR}/deleteemail.xml
headers=${request_header}
【问题讨论】:
标签: soap automation automated-tests robotframework