Forum Discussion
Hey anthos
the http headers associated with a particular request are specific to that request, so it;s not like people can just tell you what headers you need. HOWEVER - for certain scenarios there are 'rules' to follow. (attachments or multi part or form data, or % encoded payloads require certain Content-Type headers).
It appears you want to attach a .zip file to a REST request. Looking at the attachment you included, it appears that you've proxied some requests via fiddler - one of the requests (48_request) was via Postman (due to the inclusion of the auto generated Postman-Token header) and the other (529_request) appears to be the same request, but NOT via Postman - so I'm guessing 529_request was via SoapUI...??
If you notice in your Postman request you have a Content-Type header with value 'multipart/form-data;' - I would suggest you need to set the equivalent in your SoapUI request.
I'm guessing about the detail based on your brief description and no info on the fiddler attachment.
The more info you provide, the more likely forum members will be able to assist,
Cheers,
Rich
- anthos3 years agoOccasional Contributor
hi dear
the first attached request header works well (POSTMAN)
POST https://www.sinfi.it/sinfi-validator1/rest/upload?iPlanetDirectoryPro=AQIC5wM2LY4SfcyoFeCBJX5PAhXGBQxVkfnVuk3SBbtkH9s.*AAJTSQACMDEAAlNLABMyNzUzOTc4NTk5MTc1ODAwMzIyAAJTMQACMDc.* HTTP/1.1
X-OpenAM-Username: DMNRFI20T01H501M
X-OpenAM-Password: SQ6f5&$M
User-Agent: Apache-HttpClient/4.5.5 (Java/12.0.1)
Accept: */*
Postman-Token: b0c09aab-db10-45bf-9306-9b5da5c6a97c
Host: www.sinfi.it
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Type: multipart/form-data; boundary=--------------------------610712940258152505076183
Cookie: amlbcookie=07; SERVERID=2
Content-Length: 31455983----------------------------610712940258152505076183
Content-Disposition: form-data; name="loadType"STRICT
----------------------------610712940258152505076183
Content-Disposition: form-data; name="file-value"; filename="TEST_INFR_RT.zip"
Content-Type: application/zip==============================================================
this following request sended via SOAPUI doesn't work.
POST https://www.sinfi.it/sinfi-validator1/rest/upload?iPlanetDirectoryPro=AQIC5wM2LY4SfcyPgdttoQh3vhKa9s8tCrs4sZWWIkVJ1PU.*AAJTSQACMDEAAlNLABQtMzUxNjQ4ODE2OTA5NjIzODYzOQACUzEAAjA3*&loadType=STRICT&name=%22loadType%22&Accept-Encoding=gzip%2C%20deflate%2C%20br%20&file-value=TEST_INFR_RT.zip&file=TEST_INFR_RT.zip&Accept=*%2F*&filename=TEST_INFR_RT.zip HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: multipart/form-data; boundary="----=_Part_3_237119384.1635864631157"
MIME-Version: 1.0
X-OpenAM-Username: DMNRFI20T01H501M
X-OpenAM-Password: SQ6f5&$M
Content-Length: 15728004
Host: www.sinfi.it
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.5 (Java/12.0.1)
------=_Part_3_237119384.1635864631157
Content-Type: application/zip; name=TEST_INFR_RT.zip
Content-Transfer-Encoding: binary
Content-Disposition: form-data; name="TEST_INFR_RT.zip"; filename="TEST_INFR_RT.zip"I don't know how to set SOAPUI parameters to obtain identical Header Request.
Thanks a lot if you can help me 😐
- KarelHusa3 years agoChampion Level 1
Hi anthos ,
what kind of response do you get?
If you:
- make an HTTP POST request,
- select multipart/mixed media type and
- add the zip file as an attachment
SoapUI will then handle all neccessary HTTP headers, unless you have some specific needs.
The response message might be a clue what is missing. When comparing your requests it seems that the session identification might be missing:
Cookie: amlbcookie=07; SERVERID=2
In such case you can add the HTTP headers (Add a custom HTTP header, just beside the Attachments tab).
Best regards,
Karel
Related Content
- 2 years ago
- 2 years ago
- 2 years ago
- 4 years ago
Recent Discussions
- 2 days ago
xml to soap
Solved2 days ago- 3 days ago
- 15 days ago