Bregt,
You should be able to map binary to a filedocument, this can be achieved in the import mapping of the REST Call action. The stacktrace points to a security problem.
I tried to put the application/pdf into an empty object with interface system.FileDocument & return it as a filedocument stocked in a variable:
Let me know if you need more screenshots.
I get this error:
com.mendix.modules.microflowengine.MicroflowException: Error calling REST service
at RESTconsume.Microflow_IRISNext_RetrieveBinary (CallRest : 'Call REST (GET)')
Advanced stacktrace:
at com.mendix.integration.actions.microflow.RestCallAction.execute(RestCallAction.scala:79)
Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: java.security.PrivilegedActionException: org.apache.http.client.ClientProtocolException
at com.mendix.integration.util.PrivilegedUtil$$anonfun$withPrivileged$2.applyOrElse(PrivilegedUtil.scala:17)
Caused by: java.security.PrivilegedActionException: null