Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use RESTful webservices in Matlab

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.

like image 272
Marc Avatar asked Oct 05 '11 14:10

Marc


1 Answers

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));

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.

like image 196
Mike Dewar Avatar answered Oct 12 '22 10:10

Mike Dewar