简体   繁体   English

Android Rest客户端到Delphi XE2 Datasnap Rest服务器

[英]Android Rest client to Delphi XE2 Datasnap Rest server

I found many examples on Stack Overflow and I just don't know where to start since I have a particular prerequisite: 我在Stack Overflow上找到了许多示例,但由于我有特定的先决条件,所以我不知道从哪里开始:

My Delphi Datasnap Rest server is using ZLibCompression and RSA encryption (in TTransportFilterCollection of DSHTTPWebDispatcher ). 我的Delphi Datasnap Rest服务器使用ZLibCompression和RSA加密(在TTransportFilterCollectionDSHTTPWebDispatcher )。 Is there an Android restful API that can handle those? 是否有Android Restful API可以处理这些问题? Any sample that already implements that? 任何已经实现的示例?

I found this thread Android REST client, Sample? 我找到了该线程Android REST客户端,示例? as a good starting point, both lightweight and well-formed clients are presented but is it enough for me? 作为一个很好的起点,介绍了轻量级客户和格式良好的客户,但这对我来说足够了吗?

Thanks in advance for any hint, sample or library that you could point me to. 在此先感谢您可以向我提出的任何提示,示例或库。

you can use the Android Rest-Client for sending data to a webservice 您可以使用Android Rest-Client将数据发送到Web服务

see my answer in the post Adding body of call to POST using HttpURLConnection 使用HttpURLConnection将呼叫主体添加到POST的帖子中看到我的答案

I just used the proxy generator from Danasnap server TDSProxyGenerator component ( http://yourserver:port/proxy/java_android.zip ) and added this code to my android project... 我只是使用了来自Danasnap服务器TDSProxyGenerator组件( http://yourserver:port/proxy/java_android.zip )的代理生成器,并将此代码添加到我的android项目中...

I had to search for the DSRESTSSLFactory.java file that is not generated by the proxy (but required !!), i found it in a demo from embarcadero, and from that point the communication is entirely handled, all accessible procedures are publicated, and really really simple to use... 我必须搜索不是由代理生成的DSRESTSSLFactory.java文件(但是必需的!!),我在embarcadero的演示中找到了它,从那时起,通信已被完全处理,所有可访问的过程都被公开,并且真的非常简单易用...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM