Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Delphi XE5 RestClient question
Fri, Apr 4 2014 1:49 PMPermanent Link

Uli Becker

Has anyone used TRestClient, TRestRequest, TRestRespone etc. in Delphi
XE5? I would like to use it in an Android app.

It looks quite easy to send a request to an EWB server, get back the
matching JSON and adapt it to a ClientDataSet by using
TRESTResponseDataSetAdapter.

But the whole thing fails if there are strings > 255 in the JSON. In
that case TRESTResponseDataSetAdapter creates a field of fieldtype
ftString in the ClientDataset, which is limited to 255 chars. Looks like
a bug. No help in the Embarcadero NG so far.

Any ideas for a workaround?

Thanks Uli
Mon, Apr 7 2014 7:39 AMPermanent Link

Matthew Jones

> TRestClient

Are you talking about a server or a client? You should of course be able to do both,
but in the EWB context, EWB would be the client to the Delphi server.

/Matthew Jones/
Tue, Apr 8 2014 4:17 AMPermanent Link

Uli Becker

> Are you talking about a server or a client? You should of course be able to do both,
> but in the EWB context, EWB would be the client to the Delphi server.
>
> /Matthew Jones/

I am talking about an EWB server to which I am sending a request from an
Android app written with Delphi XE5 Firemonkey.
Within this app I use the Rest-components and get the JSON formatted
response from EWB server.

Uli
Tue, Apr 8 2014 8:46 AMPermanent Link

Matthew Jones

Ah, okay, not aware of the details of that. But my experience of the SOAP code was
that I could either change the behaviour with events, or I could take the code and
hack it to add suitable events. In your case I'd look at the code and see how it
determines the field type. You may be able to intercept it and specify a memo for
that field.

/Matthew Jones/
Tue, Apr 8 2014 10:10 AMPermanent Link

Uli Becker

Thanks, I'll give that a try again - tried it already, but nothing
happened, maybe I have to recompile a package or so.
Image