필터 지우기
필터 지우기

Authorization error using webread in matlab

조회 수: 3 (최근 30일)
Shahd Ewawi
Shahd Ewawi 2016년 4월 5일
I'm trying to read a value from REST Server using the following code:
url = 'http://localhost:8011/wbsvc-simple-query.xqy';
options = weboptions('Username','admin','Password','admin', 'ContentType','text');
doc_count = webread(url, options);
Although I've added the username and password, but still I don;t have access to the url 'http://localhost:8011/wbsvc-simple-query.xqy' and I got this error:
Error using readContentFromWebService (line 37)
The server returned the message: "Unauthorized" for URL, 'http://localhost:8011/wbsvc-simple-query.xqy' (with HTTP response code 401).
Error in webread (line 115)
[varargout{1:nargout}] = readContentFromWebService(connection, options);
Error in thesis (line 7)
doc_count = webread(url, options);

답변 (0개)

카테고리

Help CenterFile Exchange에서 Web Services에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by