Rest call : 415: Unsupported Media Type error

0
Hello all, When I am trying to consume a service , I am getting below error:  com.mendix.modules.microflowengine.MicroflowException: Error calling REST service     at FIXAppModule.Consume_Notifications (CallRest : 'Call REST (POST)') Advanced stacktrace:     at com.mendix.integration.actions.microflow.RestCallAction.execute(RestCallAction.scala:48) Caused by: com.mendix.modules.microflowengine.MicroflowException: 415: Unsupported Media Type     at FIXAppModule.Consume_Notifications (CallRest : 'Call REST (POST)')   But When i see the response in SOAP UI, I am able to see response properly.  Where I am missing?
asked
3 answers
3

Without knowing details of the service, I suspect you are missing a header that specifies the content type.  It could be you need a header parameter to specify the content type like  Content-Type: application/xml

Here is a link on how to add HTTP headers to your web service call in Mendix:

https://docs.mendix.com/refguide/call-rest-action#3-http-headershttps://docs.mendix.com/refguide/call-rest-action#3-http-headers

 

answered
0

Not sure if this is applicable to REST calls, but i once ran into the issue with SOAP calls where my file was send as an attachment instead of base64 encoded binary.

If you are sending files, you can try uncheking the following checkbox

answered
0

Compare what SOAP sends to what Mendix sends. To see Mendix' send set the Loglevel of RESTconsume in the console to Trace. 

And as addition to Andrej' comment. For REST there is also an option in the request-tab, but I guess you have seen that:

answered