Ask a Question

posting xml file using ready api

samirc23
Contributor

posting xml file using ready api

Hello,

 

i m using ready api - SoapUI NG and i m trying to post xml file by attaching file in Attachments tab but getting error message as bad request, please find attached screenshot for ref:

 

please let me know how we can post file using SoapUI NG, i m able to send same file using Postman.

 

Many Thanks,

Samir

5 REPLIES 5
IgorG
Staff

Change the Media Type to multipart/form-data. Right now your request woll not include the attachment. You can find more info in the documentation.

API Bloom

yes i tried with multipart/form-data and than multipart/mixed but still getting bad request message 

<Error>
<Message>SourceName and FileReceived cannot be empty.</Message>
</Error>

Hello,

 

any update on this issue please ?

 

thanks,

Nastya_Khovrina
SmartBear Alumni (Retired)

Hi samirc23,

 

Please compare a successful raw request from Postman with a raw request from ReadyAPI. To get a raw request in ReadyAPI, please choose the Raw tab in the left request. Please see the screenshot attached.

  

To get a raw request which was successfully sent from a browser or another application you can use Fiddler (http://www.telerik.com/download/fiddler) which is a free tool to capture HTTP(S) traffic.

 

It seems that you need to change a style of the "SourceName" and "FileReceived" parameters. If the style is Plain the values of these parameters are not sent. Please refer to the article about parameters: Resource Parameters Page. Note that you can change the style only on the Projects tab.


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
2016-12-19_1414
Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.

Here is a screenshot of how to send an xml request

rawxmlrequest.PNG

cancel
Showing results for 
Search instead for 
Did you mean: