Avi,
Regarding the Accept header causing a problem... many application servers will route requests to an appropriate handled based on the configure response required. I don't have access to the code, but my guess is that there is no handler registered for "application/xml" and therefore you are getting your error.
As for desiring an XML response... a quick google search of "json to xml library <insert language here>" will produce a number of great libraries in your language of choice that you can use to translate the JSON results into XML and vice versa. However, a little further searching shows that there are even libraries that implement "JSONPath" in most common languages, so there may not be a reason to convert the JSON to XML at all.
------------------------------
Jim Crespino
Senior Director, Developer Evangelism
Genesys
https://developer.genesys.com------------------------------
Original Message:
Sent: 05-06-2019 03:40
From: Avraham (Avi) Rozen
Subject: Forcing REST tool to return XML instead of JSON
Thank you Hans for making it clear :-)
Missed this document important note..(not understanding how "Accept" header which is standard header creates error using REST tool)
I hope Genesys will make REST- XML response available next comming versions.
XML advantages -X-Path +language encodings are hard to compete with
------------------------------
Avi Rozen
Harel
Original Message:
Sent: 05-06-2019 02:50
From: Hans-Gerd Sandhagen
Subject: Forcing REST tool to return XML instead of JSON
Hi Avi,
I found this in the Interaction Designer REST API tools dokumentation, CIC REST Implementation:
Provide JSON and array-parsing tools. The tools do not support other formats.
So I think the tools work with JSON format only and don't accept other formats.
------------------------------
---------------------------------------------
Hans-Gerd Sandhagen
Software Developer
Fiebig GmbH
Original Message:
Sent: 05-05-2019 09:08
From: Avraham (Avi) Rozen
Subject: Forcing REST tool to return XML instead of JSON
Hi
I'm getting a correct response using the handler's REST tool .
The problem is that the response is in JSON format all the time ..no matter what
I would like the response to be XML
Trying to add "Accept: application/xml" to headers doesn't work-REST tool fails completely with error 417 ..meaning -mismatch header!
Any ideas?
TNX
#Handlers
------------------------------
Avi Rozen
Harel
------------------------------