如何在 Matlab 中使用 RESTful Web 服务
我有一个数据提供程序,它提供基于 Web 的 RESTful 界面。我正在尝试将这些数据导入 Matlab。界面相对简单,但我仍在寻找有这方面经验的人?该服务本身不提供 SOAP/WSDL,但 Matlab 可以轻松使用。供应商有一个“适配器”,您可以将其安装在计算机上(基本上是带有某种“插件”的 Appache/Tomcat 安装),以充当提供这些服务的中介,但由于多种原因,这将是在我的公司成立非常困难。
I have a data provider that provides a web-based RESTful interface. I'm trying to get that data into Matlab. The interface is relatively simple, but I'm still looking for anyone out there that has any experience with this? The service does not natively provide SOAP/WSDL, which Matlab can use easily. The vendor has an "adapter" that that you can install on a machine (basically an Appache/Tomcat installation with a sort of "plugin") to act as an intermediary that DOES provide those services, but for lots of reasons, it would be very difficult to get set up in my company.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果 RESTful 接口返回 JSON,看起来就像安装一个小插件一样简单:
http://www.mathworks.com /matlabcentral/fileexchange/20565
和((几乎)直接来自该插件的自述文件):
我想通过 SOAP 或其他任何方式实现 RESTful 接口是件好事不需要过多的机械来处理它。我确信如果接口不返回 JSON,那么您可以解析类似的内容。
If the RESTful interface returns JSON, it looks like it's as easy as installing a little plugin:
http://www.mathworks.com/matlabcentral/fileexchange/20565
and ((almost) direct from the readme of that plugin):
I guess that's a nice thing about RESTful interfaces over SOAP or whatever is that you don't need excessive machinery to deal with it. I'm sure if the interface isn't returning JSON it will be something similar you can parse.
MATLAB R2014b 可以本地执行此操作: http://uk.mathworks.com/help/ matlab/ref/webread.html
例如:
MATLAB R2014b can do this natively: http://uk.mathworks.com/help/matlab/ref/webread.html
For example: