Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: no support for XML in Delphi Berlin REST Client


This question is answered.


Permlink Replies: 2 - Last Post: Oct 27, 2017 2:47 PM Last Post By: Eitan Arbel
Eitan Arbel

Posts: 508
Registered: 2/24/13
no support for XML in Delphi Berlin REST Client  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 26, 2017 6:57 AM
hi guys,.

i'm a very long timer Delphi user, but i never needed to know about XML, JSON, REST and Web Services.

now i am required to read XML from a web service.

my problem is that i use Delphi Berlin and emb said that the RESTClient and RESTRequest no longer support XML now, only JSON...

i tried to add "application/atom+xml" to the Accept of both RESTClient and RESTRequest, but when i Right-Click the RESTRequest and click the "Execute", i still get the error : "Response content is not a valid JSON".

so how can i make the RESTClient and RESTRequest, work with XML?
or is there another way to read XMLs from Web Services using Delphi Berlin ?

Thanks !
Eli M

Posts: 1,346
Registered: 11/9/13
Re: no support for XML in Delphi Berlin REST Client
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 26, 2017 8:44 PM   in response to: Eitan Arbel in response to: Eitan Arbel
SOAP uses XML. REST uses JSON.

You can just use TNetHTTPClient and make a direct HTTP request.
Eitan Arbel

Posts: 508
Registered: 2/24/13
Re: no support for XML in Delphi Berlin REST Client  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 27, 2017 2:47 PM   in response to: Eli M in response to: Eli M
Thank you very much Eli !
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02