Forum Discussion

ZP's avatar
Occasional Contributor
5 years ago

ReadyAPI - Dynamic POST using .xml files or using .csv file that are saved in the directory

I am using ReadyAPI (SOAPUI) POST method.    I would like to POST content from an external file.    1) In the media type drop down I select application/xml OR application/json 2) And in the...
  • richie's avatar
    5 years ago
    Hi ZP,

    Yep this works for REST requests, but you won't include the 'path' to the file in the request, but if you're using a directory datasource (as ypu appear to describe) then each of your files will be loaded into a single property and within the request field you simply reference the datasource property. (e.g. something like '${#datasource#dataprop}', depending on the name of your datasource and property name)
    I'm driving at moment, but will answer properly with complete details once i get into work (unless someone else answers before then)


  • NBorovykh's avatar
    5 years ago

    Hi ZP,


    The Media Type of the request matters - it should be `application/xml`. 


    On my side, your scenario with a sample Petstore project works fine. My project and a video showing how I run it are attached.


    Let me know if this helps.