How to consume web service using matlab

4 views (last 30 days)
Hi,
I'm tasked with consuming some web service using matlab, but I have very little experience with web service. I'll formulate my question in bullet points below:
1. I tried using this syntax for reading data: data = webread('MYURLHERE'), but got error message: Undefined function 'webread' for input arguments of type 'char'.
I suspect there's no webread.m file on my computer so I checked using: which webread. It says webread not found. I also checked the file path, but couldn't find the .m file in the matlab folder. Is this normal? Does webread come with the standard matlab installation? I also have the datafeed, database, stats toolbox.
2.the web service is also secured with Kerberos authentication, I think I need to specify my credentials. I'm thinking of using the weboptions function. Is this the right route to go?
Thank you very much, Shen

Accepted Answer

Walter Roberson
Walter Roberson on 1 Sep 2015
webread() is Introduced in R2014b. Before that use urlread() or ulrwrite(). Or find a java package that has the interface you want and use that.
I do not know what would be required for Kerberos authentication.
  2 Comments
Shen Gao
Shen Gao on 2 Sep 2015
Walter - Thanks so much! urlread() worked.
Do you know if there's an equivalent for weboptions() in 2014a (my version of MATLAB)?
Walter Roberson
Walter Roberson on 2 Sep 2015
I am not familiar with the urlread details

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!