i have this api
<api xmlns="http://ws.apache.org/ns/synapse" name="EosPlaces" context="/eosplaces"><resource methods="GET" uri-template="/comuni">
<inSequence>
<property name="comuni" expression="get-property('registry', 'gov:/eos/common/json/comuni.json')" scope="axis2" type="STRING"/>
<payloadFactory media-type="json">
<format>$1</format>
<args>
<arg evaluator="xml" expression="$ctx:comuni"/>
</args>
</payloadFactory>
<property name="messageType" value="application/json" scope="axis2"/>
<respond/>
</inSequence></resource></api>
and this is the json stored in the registry with media type application/json:
{
"comuni": [{
"Denominazione": "Agliè",
"Regione": "Piemonte",
"Provincia": "Torino",
"SiglaProv": "TO",
"Belfiore": "A074"
},
{
"Denominazione": "Airasca",
"Regione": "Piemonte",
"Provincia": "Torino",
"SiglaProv": "TO",
"Belfiore": "A109"
},
{
"Denominazione": "Ala di Stura",
"Regione": "Piemonte",
"Provincia": "Torino",
"SiglaProv": "TO",
"Belfiore": "A117"
},
{
"Denominazione": "Albiano d'Ivrea",
"Regione": "Piemonte",
"Provincia": "Torino",
"SiglaProv": "TO",
"Belfiore": "A157"
},
{
"Denominazione": "Almese",
"Regione": "Piemonte",
"Provincia": "Torino",
"SiglaProv": "TO",
"Belfiore": "A218"
},
{
"Denominazione": "Alpette",
"Regione": "Piemonte",
"Provincia": "Torino",
"SiglaProv": "TO",
"Belfiore": "A221"
},
{
"Denominazione": "Alpignano",
"Regione": "Piemonte",
"Provincia": "Torino",
"SiglaProv": "TO",
"Belfiore": "A222"
},
{
"Denominazione": "Andezeno",
"Regione": "Piemonte",
"Provincia": "Torino",
"SiglaProv": "TO",
"Belfiore": "A275"
},
{
"Denominazione": "Andrate",
"Regione": "Piemonte",
"Provincia": "Torino",
"SiglaProv": "TO",
"Belfiore": "A282"
},
{
"Denominazione": "Angrogna",
"Regione": "Piemonte",
"Provincia": "Torino",
"SiglaProv": "TO",
"Belfiore": "A295"
}
]
}
I would like to read the json and ouput it when calling the api but the response is :
<Empty JSON content>
and the raw is : "HTTP/1.1 200 OK Host: 192.168.0.191:8280 Accept-Encoding: gzip,deflate Content-Type: application/json; charset=UTF-8 Date: Wed, 08 Apr 2020 12:00:19 GMT Transfer-Encoding: chunked Connection: Keep-A1live"
{}
Thank you
Update : if i log the property that pick the json from the registry, this is what i see in the log
ewoJCSJjb211bmkiOiBbewoJCQkJIkRlbm9taW5hemlvbmUiOiAiQWdsacOoIiwKCQkJCSJSZWdpb25lIjogIlBpZW1vbnRlIiwKCQkJCSJQcm92aW5jaWEiOiAiVG9yaW5vIiwKCQkJCSJTaWdsYVByb3YiOiAiVE8iLAoJCQkJIkJlbGZpb3JlIjogIkEwNzQiCgkJCX0sCgkJCXsKCQkJCSJEZW5vbWluYXppb25lIjogIkFpcmFzY2EiLAoJCQkJIlJlZ2lvbmUiOiAiUGllbW9udGUiLAoJCQkJIlByb3ZpbmNpYSI6ICJUb3Jpbm8iLAoJCQkJIlNpZ2xhUHJvdiI6ICJUTyIsCgkJCQkiQmVsZmlvcmUiOiAiQTEwOSIKCQkJfSwKCQkJewoJCQkJIkRlbm9taW5hemlvbmUiOiAiQWxhIGRpIFN0dXJhIiwKCQkJCSJSZWdpb25lIjogIlBpZW1vbnRlIiwKCQkJCSJQcm92aW5jaWEiOiAiVG9yaW5vIiwKCQkJCSJTaWdsYVByb3YiOiAiVE8iLAoJCQkJIkJlbGZpb3JlIjogIkExMTciCgkJCX0sCgkJCXsKCQkJCSJEZW5vbWluYXppb25lIjogIkFsYmlhbm8gZCdJdnJlYSIsCgkJCQkiUmVnaW9uZSI6ICJQaWVtb250ZSIsCgkJCQkiUHJvdmluY2lhIjogIlRvcmlubyIsCgkJCQkiU2lnbGFQcm92IjogIlRPIiwKCQkJCSJCZWxmaW9yZSI6ICJBMTU3IgoJCQl9LAoJCQl7CgkJCQkiRGVub21pbmF6aW9uZSI6ICJBbG1lc2UiLAoJCQkJIlJlZ2lvbmUiOiAiUGllbW9udGUiLAoJCQkJIlByb3ZpbmNpYSI6ICJUb3Jpbm8iLAoJCQkJIlNpZ2xhUHJvdi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