Skip to Content

REST ADAPTER with multipart/form-data

Hi Team,

I have a requirement like need to send as a below format with rest receiver adapter.

------WebKitFormBoundary9wF7XXXXXXk2Squd
Content-Disposition: form-data; name="app name" -- (Header of the body)

{"Request": {

"Header": {
"Order": "123",
},
"Detail": [
{
"countermeasure": "EA",
"line Number": "1"
},
{
"countermeasure": "EB",
"line Number": "2"
}
]
}}
------WebKitFormBoundary9wFXXXXXud--(Footer of the body)

in Header i need to maintain the details like below

Content-Type:multipart/form-data; boundary=----WebKitFormBounda7777777qud
Accept:text/HTML,application/HTML+xml,application/xml;r=0.7,image/webp,image/apng,*/*;s=0.8
Accept-Encoding:XXXIX
Accept-Language:XXXIX

The above details are maintainer under HTTP Header tab. request body format acheived by java mapping .

Now am facing an issue when i try to send to target system getting an error like "500: Time out reached while waiting for response".

I can able to reach the server but data going as an empty to target system. due to this its throwing an 500 error.

Data format i have used as Binary and content type as given multipart/form-data.

Note: I tried to execute with postman with Operation mapping output. Its working fine. When ever try to send data from PO system its giving an error.

Kindly check this one and advise on this.

Thanks in advance

Regards

Spal

Add a comment
10|10000 characters needed characters exceeded

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.