Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Parameterize the attachment <zip> with MIME and MTOM is not working for SOAtest SOAP Client

brawal
brawal Posts: 26

I was using the SOATest SOAP Client to send the soap message request to the backend using MIME and MTOM , which requires the zip attachment along with request, SOAtest only keeps the absolute file path in the request message body not the actual zip file and send to the backend .. which through an error File not supported .

Did anyone face the same issues ? Please suggest me how do we resolve this issue.

SOATest version 9.9.5

Comments

  • [Deleted User]
    [Deleted User] Posts: 0 admin

    Hi brawal,

    Have you been following the example given here: https://docs.parasoft.com/display/SOAVIRT9106CTP312/Working+with+Attachments?

    According to that page, if your schema requires the zip file, there should be an option to include it in the Form Input view of your SOAP Client, and not attaching it in the attachments section of the client:
    "Make sure Form Input is selected from the Views menu. The Form Input view is a schema-aware view. In this view, the xsd:base64Binary schema datatype will be recognized so that you can reference the content that you want to optimize... When you are using MTOM, you do NOT need to add anything to the SOAP Client’s or Message Responder's Attachment tab."

    Do you see these options, and are you attaching the zip file in the right location?

  • brawal
    brawal Posts: 26

    Thank you Thomas for your input. Yes, I followed this link to attached the zipfile for both MIME through the attachment tab, MTOM at the request body , However,I got the File not supported error . When I looked at the traffic viewer, there should be PK with junk charecters for the attachment in the request message instead absolute file path of the attachment zip file. This is only happening with parameterization option . If i send it only one request with attachment, these services works as expected.

    Thanks
    Birendra

  • brawal
    brawal Posts: 26

    MTOM Parameterization of attachment Not working for SOATest which suposed to read the zip file location path from the data source and retrieve the zip file contents and embedded to the request body and send to the server.... which tool is not behaving like that ...

    any suggestions on it ?

  • Ireneusz Szmigiel
    Ireneusz Szmigiel Posts: 228 ✭✭✭

    @brawal
    Could you post your tst with your project?
    Or any other example configured by you where we can try to recreate such behavior?
    How did you parametrize request? Is there any value in request instead of PK(messed string)?

    --
    Ireneusz Szmigiel
    http://www.catb.org/esr/faqs/smart-questions.html

  • benken_parasoft
    benken_parasoft Posts: 1,302 ✭✭✭
    edited May 2019

    suposed to read the zip file location path from the data source

    If you simply parameterize the element's value then the data source column must contain the contents that you want sent for that element. For example, some users use a File Data Source in this case and then parameterize the element against the File Data Source's "File Contents" column.

    However, if instead you want to parameterize the path to the file then instead of picking "Parameterized", you must pick "Fixed", select "File", then type ${ds_col_with_path_to_file} in the "Input file" field.