Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Upcoming Branch, 22.01.01
Description
When you forward a request-map on json response after a service call like this :
<request-map uri="updateMyEntity"> <security https="true" auth="true"/> <event type="service" invoke="serviceWithUnserializableElement"/> <response name="success" type="request" value="json"/> <response name="error" type="request" value="json"/> </request-map>
The request json works fine if the serviceWithUnserializableElement have an element unserializable on out put at the first level
<service name="serviceWithUnserializableElement"...> <attribute name="outputStream" type="java.io.OutputStream" mode="OUT"/> </service>
If the definition is like this
<service name="serviceWithUnserializableElement"...> <attribute name="outputStreamMap" type="Map" mode="OUT"/> </service>
The json failed to generate if the outputStream is a map en
try here :
CommonEvents.jsonResponseFromRequestAttributes: JSON json = JSON.from(attrMap); writeJSONtoResponse(json, request, response);
Despite the function UtilHttp.getJSONAttributeMap that safe only the first map level and don't work in deep.