Forum Discussion

xikandar's avatar
xikandar
Occasional Contributor
8 years ago
Solved

Document UPloading request not working via SoapUI

Hi,

 

Help needed on High priority. I am facing problem while uploading document via Post service in SoapUI.
I have also followed these steps as well but every time I get this response: "Message":"Request does not contain document"

  • Create a TestCase in the TestSuite
  • Add an HTTP TestRequest Step to the TestCase
    • Set the endpoint to the URL you want to upload to
    • Set the method to POST (or PUT)
  • In the Request Editor add the File you want to upload to the Attachments tab
  • Set the Media-Type of the POST Body to the same as the Content-Type of the attached File
  • Send the request!

    Note: We upload document in binary, even setting the Media-type to binary didn't help.

    I have to demonstrate SoapUI as best fit for our services and demo is in next week. So looking for some quick help

    Thanks,

    Sikandar Hayyat

 

  • xikandar, I assume you need to change the Media Type of the HTTP Request test step to multipart, now you have "text/plain".

     

    Karel

     

12 Replies

  • xikandar's avatar
    xikandar
    Occasional Contributor

    Hi,

     

    Help needed on High priority. I am facing problem while uploading document via Post service in SoapUI.
    I have also followed all the mentioned steps as well but every time I get this response: "Message":"Request does not contain document"

     

    See the attached image

    • nmrao's avatar
      nmrao
      Champion Level 3
      You first need to create a test suite, test case, then add a test step of required step and then attach the image.
  • xikandar's avatar
    xikandar
    Occasional Contributor

    Nobody is responding other then just moving the post from here to there !!

    • nmrao's avatar
      nmrao
      Champion Level 3
      Please respect other people time by not creating duplicate topics. This is community, people willing to help at their available time. Just a have little patient and allow people to go thru the issues and understand what you are trying to achieve.

      Mean while, try to refine your search either in the community or in the net, and go thru the documentation which might be helpful to you.
      • xikandar's avatar
        xikandar
        Occasional Contributor

        I have already seen the provided documentation and after that I came here.
        In the provided image if you could see, I have created Test suit, test case and them created request then attached image.

        By the way I am not posing same query again n again its your community Managers who are moving my query as I had raised same question for NG Pro as well

  • KarelHusa's avatar
    KarelHusa
    Champion Level 3

    xikandar, I assume you need to change the Media Type of the HTTP Request test step to multipart, now you have "text/plain".

     

    Karel

     

    • xikandar's avatar
      xikandar
      Occasional Contributor

      Thanks KarelHusa your suggestion worked. However I am confused that Postman uploads the binary stream when we set Media Type as "Binary" contrary to SoapUI.  Also when I try to upload the image then system exception appears, seems like SoapUI not sending proper request in this case......

      • KarelHusa's avatar
        KarelHusa
        Champion Level 3

        xikandar, if you provide a working HTTP request (all headers, without binary data), we can try to find out how to achieve the same in SoapUI.

         

        Which system do you integrate?

         

        Karel