如何在Matlab中使用RESTful Web服务 [英] How to use RESTful webservices in Matlab

查看:663
本文介绍了如何在Matlab中使用RESTful Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个数据提供程序,提供基于Web的RESTful界面.我正在尝试将数据导入Matlab.界面相对简单,但是我仍在寻找任何对此有任何经验的人?该服务本身不提供SOAP/WSDL,而Matlab可以轻松使用.供应商提供了一个适配器",您可以将其安装在机器上(基本上是带有某种插件"的Appache/Tomcat安装),充当DOES提供这些服务的中介,但是出于许多原因,在我的公司很难成立.

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.

推荐答案

如果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):

google_search = 'http://ajax.googleapis.com/....'; 
matlab_results = parse_json(urlread(google_search));

我想这对基于SOAP的RESTful接口是一件好事,或者您不需要过多的机械来处理它.我确定接口是否不返回JSON,这将是您可以解析的类似内容.

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中使用RESTful Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆