Export Mapping Error

0
I am trying to expose the rest service of an app that I am working on and I have been following the mendix documentation on how to do so. I am getting an error saying “Export mapping does not support mapping type returned by a microflow.” Does anyone know how to fix this error?
asked
2 answers
3

So you have a published rest service. That service has a problem with its export mapping. Since it is an export, not import, mapping, the mapping is in the Response-tab of your rest-service-activity. The rest service uses a microflow Location_Get_ByKey to fabricate the content of the response and the rest-service uses mapping EM_LocationExport to transform the result of your microflow to the required export format, JSON or XML. The result of your microflow is of entity type System.HttpResponse. The mapping EM_LocationExport however expects a different entity type. Hence this error.

So if you make sure that you make the microflow return its result in a format that the exportmapping can handle, this error will be resolved.

For better understanding / more details on what happens you have two options:

  1. Change the loglevel of ‘Published services’ to Trace
  2. Change your rest-call-activity to store the result in a string instead of in a mapping; add an activity ‘Export mapping’ passing that string to EM_LocationExport.
answered
0

I was under the impression that the mapping was used to convert the domain model entity along with its associations into a formatted JSON string. Then that is put into an http response and exported to wherever it it consumed. That is how the Mendix documentation "Publish a REST Service" does it at least.

answered