How to Create a SOAP message that contains an attachment - Bug Reaper

                  Bug Reaper

Lean about Automation Testing,Selenium WebDriver,RestAssured,Appium,Jenkins,JAVA,API Automation,TestNG,Maven, Rest API, SOAP API,Linux,Maven,Security Testing,Interview Questions

Friday 5 September 2014

How to Create a SOAP message that contains an attachment

Hi Reader,

In SoapUI we have provision to upload an attachment as a file and send as a SOAP Request message.

We can upload or attach the document as follows.




Attachments in soapUI are managed in the attachment tab at the bottom of the request editor

1.)Clicking + button is for adding an attachment.



2.)Clicking + button opens up the following from your file-system.

3.)Just Browse the file as an attachment.


We can specify a value of cid:somename and associating an attached file.

We have attached a file from our file-system and refer to it using the cid: notation, which sets its type to “CONTENT”. When adding the file its always better to select cache it in the project file for easy redistribution of the tests.

If selected, the file will be saved in the soapUI project file (compressed), otherwise the project file will keep an absolute path reference to the selected file.



No comments:

Post a Comment