Forum Discussion

qa-koala's avatar
qa-koala
New Contributor
10 years ago

multipart/form-data w/ boundaries - request failing - same headers/body pass using fiddler

This is my first post, first impassable issue I have run into with soap ng so far.

 

I am testing a batch upload service for work and I have used fiddler for a sanity check before trying to create a regression suite for the service with soap ng. The sanity check through fiddler works fine, but the exact same test through soap ng is failing. The only difference between the two that I can see is the content-length is larger with soap ng.

 

The content-length for this service is important and the request through fiddler will fail if it is not correct. I have tried to manually specify the content-length in soap ng but the request instantly fails when I do this, it looks like it doesn't even try to connect to the endpoint at all. I get back "<missing raw response data>" when manually specifying the content-length.

 

At this point I am thinking the content-length is the culprit. I will post screenshots of the two applicatons with the tests loaded. If anyone has experience using multipart content types with boundaries and soap ng, please advise how you have gotten your tests to work.

 

The fiddler setup is working, I copied that as close as possible to soap ng which is failing.

fiddler content-length = 616

soap ng content-length = 757 (where is the extra length coming from?)

 

SOAP NG REQUEST

 

SOAPNG-Setup.png

 

 FIDDLER REQUEST

 

Fiddler-Setup.png

  • qa-koala's avatar
    qa-koala
    New Contributor

    Let me ask a more specific question then.

     

    Does SOAP NG pad their requests with extra space or anything? I have copied the exact request from fiddler into SOAP NG and the content-length is 100+ characters larger in SOAP NG than fiddler. Where could that extra length be coming from?

  • Hi,

    I got the similiar problem when trying to set up the POST multipart/form-data in SoapUI.

     

    I added the following to the Header:

    'Contenty-Type' with  the value of 'multipart/form-data; boundary=----WebKitFormBoundaryA6X2XSe7EZhljISy'

     

    Select the 'Media Type' as 'multipart/form-data', then put the following content to the request body:

    ------WebKitFormBoundaryA6X2XSe7EZhljISy
    Content-Disposition: form-data; name="file"; filename="attachment.txt"
    Content-Type: text/plain


    ------WebKitFormBoundaryA6X2XSe7EZhljISy
    Content-Disposition: form-data; name="subject"

    Version(master)_URL(https://mercury-qa.morningstar.com/#)
    ------WebKitFormBoundaryA6X2XSe7EZhljISy
    Content-Disposition: form-data; name="topic"

    Asset Allocation
    ------WebKitFormBoundaryA6X2XSe7EZhljISy
    Content-Disposition: form-data; name="country"

    CU$$$$$USA
    ------WebKitFormBoundaryA6X2XSe7EZhljISy
    Content-Disposition: form-data; name="recipients"


    ------WebKitFormBoundaryA6X2XSe7EZhljISy
    Content-Disposition: form-data; name="feedback"

    test
    ------WebKitFormBoundaryA6X2XSe7EZhljISy--

     

    Then attached the file 'attachment.txt', run it, I got the following error:

    HTTP/1.1 500 Internal Server Error

     

    Did I miss anything? Anyone is able to help?

     

    Thanks!

    • sesleri's avatar
      sesleri
      New Contributor

      Having the same issue.  Seems soapui will not allow you to actually have separate form data in your request because of the automatic boundaries it inserts.  Anyone figure this out?