Unfortunately version 12.X doesn't support formats other than JSON when custom commands are invoked in this way, but there is a way to do it.
What you can do is create a JSS web app that calls your custom command and returns a value in any format you like. To try this do the following:
- Add a Windows folder called 'Test' underneath the /Public folder in the virtual file-system.
- Set the owner to 'web' (since the web user has JSS enabled).
- Use a text editor to create a file called test.jss and save it in the Windows folder to which /Public/Test is mapped (probably C:\ProgramData\Enterprise Distributed Technologies\Complete FTP\Public\Test).
- Copy the code below into the JSS file and replace 'myFunction' with the name of your function.
- Save the file.
- Open the following URL in your browser: https://localhost/Test/test.jss. You should see the XML that your function returned.
Code:
response.write(system.executeCustomCommand("myFunction"));
response.contentType = "application/xml";
Note that, since the /Public/Test folder doesn't give permissions to 'All users', you'll need to be logged in to be able to call the function. If you'd like provide public access then just grant 'Download' permission for 'All users' for that folder in the Folders panel.