Connecting Matlab and Sharepoint using WSDL
조회 수: 7 (최근 30일)
이전 댓글 표시
I'm trying to connect Matlab and MS SharePoint using WSDL. Here's some code connecting to a random WSDL-webservice:
wsdl_link = 'http://www.webservicex.com/globalweather.asmx?wsdl';
matlab.wsdl.setWSDLToolPath('JDK',jdk_path,'CXF',cxf_path)
matlab.wsdl.createWSDLClient(wsdl_link);
This works fine.
Now I want to connect to my companies SharePoint service. For this I change the wsdl link to
wsdl_link = 'https://my-company.osram.com/content/10003824/_vti_bin/lists.asmx?wsdl';
At this point I had some problems with certificates ('https'), but I'm pretty sure that I got ride of these problems. But the code is not working. The long-ish error starts with
Error using
matlab.wsdl.createWSDLClient>extractTypeFromSchemaElement
(line 917)
The element 'GetListResult' in
'schema' is defined with an
anonymous complex type, which is not
supported. Edit the schema to use a
named type.
Now the question: Is this a Matlab problem or a SharePoint problem or a problem with our SharePoint implementation?
댓글 수: 1
zapaiz
2019년 1월 22일
편집: zapaiz
2019년 2월 4일
I'm triyng to access Sharepoint data via Matlab too and I have the same Warning (strangely not error) when creating the WSDL client:
Warning: The element 'GetWebCollectionResult' in 'schema' is defined with an anonymous complex type, which is not supported. References to 'GetWebCollectionResult' may
generate errors. Edit the schema to use a named type.
> In matlab.wsdl.createWSDLClient>extractTypeFromSchemaElement (line 929)
In matlab.wsdl.createWSDLClient>extractParams (line 785)
In matlab.wsdl.createWSDLClient>makeOperation (line 728)
In matlab.wsdl.createWSDLClient>parseWsdl (line 634)
In matlab.wsdl.createWSDLClient (line 254)
In ShP_wsdl_comm_test (line 33)
Using Matlab R2018b, my code is:
% WSDL paths setup
jdk='C:\Program Files\Java\jdk1.8.0_191';
cxf='C:\apache-cxf-3.2.7';
matlab.wsdl.setWSDLToolPath('JDK',jdk,'CXF',cxf);
% Sharepoint web service name
webservicename='Webs';
% My company
sharepoint_url= ['http://MY_COMPANY_SHAREPOINT_URL.org/_vti_bin/' webservicename '.asmx?wsdl'];
% Creating WSDL client
wsdl_obj = matlab.wsdl.createWSDLClient(sharepoint_url);
% Add *.jar creted by the client to java dynamic path
javaaddpath(['.\+wsdl\' webservicename '.jar']);
%display WebService characteristics
display(eval(webservicename))
methods(eval(webservicename)) % shows the list of the imported methods
help(eval(webservicename)) % shows the help of the imported methods
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Analog Filters에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!