How to have a formatted xml/json return on web services result

include the highlighted option in the web service call

<requestConfig xsi:type="xsd:string">adxwss.beautify=true</requestConfig>