Closed Manisha0421 closed 3 years ago
I had same issue in the past. POSTing xml payloads was not supported by this library - not sure if that has changed @asyrjasalo? Use robotfamework-requestlibrary instead for sending xml.
Hi!
At the moment we don't have any plans to start support XML with RESTInstance, please use the robotframework-requestlibrary instead for the time being.
@Atihinen any news on supporting XML payloads?
EDIT: ignore my question, I just saw a recent comment of your's which is related.
Hi,
I have to make a POST request through SOAP to a URL by providing the payload as an XML file in the form of a key value pair, like xml: "content of XML file"
The code is able to read the XML file correctly and displays the content of the file but when making the POST request, it gives "
HTTP/1.1 400 Unable to get data [ xml is required]"
Note: This request is being sent using robot framework script; The same request is working fine with the same XML when sending the request via Postman.
Robot file code: Create Session soap ${URLService} verify=False ${file_data} Get Binary File ${Transaction_Request} Log ${file_data} ${files}= Create Dictionary xml ${file_data} ${headers}= Create Dictionary Content-Type=application/xml ${resp}= Post Request alias=soap uri=${URLComponentDateRangeAPI} files=${files} headers=${headers} Log ${resp.content} ${root}= Parse Xml ${resp.content} log ${root.tag}
Output for POST request:
<?xml version="1.0" encoding="UTF-8"?>
Can anybody help resolve this issue.
Thanks & Regards