Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 82386

How to POST a file with attributes as form-data to a REST service?

$
0
0

Hi all,

 

I am trying to POST a doc file to a REST service. I make use of the JAVA action of the RestServices with useformdata:true.

As result I receive an error 500; internal server error/unknown error.

Response status: 500 Internal Server Error, ETag: null, body: '{"succeeded":false,"shortMsg":"Unexpected error:null"}']

 

 

Seen this is normally a pretty simple call (see attachment),

link to image

I think I miss something in my microflow. Could you guys tell me how I can build the same in a microflow?

 

Edit 1: I reproduced the same error with Postman (Chrome extension to execute webservices); when there is no templateFile i got the same error. So I think that in Mendix the file and the attributes are not well formed by their names into one object...

 

I do now as follow:

1 - filedocument object with 2 attributes (no binary attribute included)

2 - then I do a post with submist as formdata : true...


Viewing all articles
Browse latest Browse all 82386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>