calling my XData server --> Unsupported media type: application/x-www-form-urlencoded

Because you were trying to use other components for HTTP requests. Sparkle is the equivalent for them, to perform low-level HTTP to any HTTP server. For XData servers, TXDataClient is recommended as its higher-level.

I don't think it would. Most of your questions are described in the documentation in a very detailed way. Wizards are usually useful for saving coding time, not for learning. If to get something work you need to write 100 lines repeatedly, then ok, a wizard is useful. But if to get something work all you need is to understand how to use and then write a couple of lines, I don't see a point.

I think your main mistake was trying to invoke a XData server using a low level HTTP client. I don't know why you followed that path. When using Delphi, you should use TXDataClient. That's actually absolutely one significant XData feature, that is not seen in almost any other REST API framework out there, either in Delphi or any other language.

Once you have your service contract and your service implementation, you just invoke it from the client using TXDataClient as described here: TXDataClient | TMS XData documentation

So your method call would be something like

List := Client.IService<ISomeServiceOfYours>.myservice(Quote1, Quote2, Quote3, Quote4, NumVariants);

That's all about it.

Yup, that works, and it's a LOT simpler. I wonder why Holger isn't using this approach in his XData tutorials since they are built around XData? ;)

1 Like


All of the issues I was having with my client-side apps interacting with my XData service could have been avoided if I simply stuck to using the TXDataClient instead of every other HTTP Client component I could find. Holger did use it, but somehow I got misdirected and went off into the weeds.


If you're using an XData-based service, use the TXDataClient component on the client side to talk with it.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.