Need Example and help to record soap with attachment

LavanyaLavanya Posts: 6

Hi Team,

The Customer needs to virtualize a SOAP request with .png attachments. Content type is "application/xop+xml" and it’s returning few .png files. As of now when they record it, it’s taking those responses at not readable format so application is not able to decode it. I could see the

Can we achieve the above scenario. if yes, Please let me know that how to record soap with attachments and please share an example.

Thank you,



  • satvermasatverma Posts: 2

    I am still looking for solution to this question.

  • OmarROmarR Posts: 90 admin
    edited June 19

    Good morning,

    This should be as simple as manually configuring your Asset/Responder to point to the desired images as an attachment for validation. However, if your team is looking for the image to be returned in the body of the response itself, we will need to do some additional configuration.

    Displaying images in the Response payload (not as attachment) is possible using a file-datasource, a table-datasource, and an Aggregate Datasource.

    You will use a file-datasource to point to your images on a shared directory folder or your workspace. The table-datasource will be used to store and identify the "image-id" for correlation. The aggregate-datasource will be used to combine both of the previous datasources so that they are both visible to the Assset/Responder simultaneously.

    After adding these tools to your suite, You will need to configure your responder to respond with a datasource (file path) and correlate to the "image-id" set in the datasource.Give this a try and let me know if you have any hurdles.

  • benken_parasoftbenken_parasoft Posts: 111 ✭✭
    edited June 19

    The SOAP Message Responder supports MTOM (application/xop+xml). You must configure the Responder with the service's WSDL URL, configure the Response using the Form Input view, and enable MTOM on the Options tab under Attachment Encapsulation Format. There will be elements in your request that correspond with the different MIME attachments. The Form Input view has the proper controls to configure those elements, like a file chooser to reference an external file, or an option to parameterize (like against a File Data Source). Providing the WSDL URL enables the Form Input to show the proper controls for these elements. Also, do not configure anything on the Attachment tab for MTOM. The Attachment tab is only for SwA (SOAP with Attachments), an older spec that predates MTOM.

    There is a bit of detail in the docs for how to set this up, more than I am mentioning here. For full explanation, please see "Parasoft Virtualize User's Guide > Reference > Working with Attachments > MTOM/XOP Messages".

    On a side note, I don't believe Virtualize currently configures such SOAP Message Responders automatically using recorded traffic. You have to configure them manually as I described.

Sign In or Register to comment.