Connecting Matlab and Sharepoint using WSDL

5 vues (au cours des 30 derniers jours)
Michael Völkl
Michael Völkl le 23 Juin 2015
Modifié(e) : zapaiz le 4 Fév 2019
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 commentaire
zapaiz
zapaiz le 22 Jan 2019
Modifié(e) : zapaiz le 4 Fév 2019
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

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by