Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

createClassFromWsdl - Create MATLAB class based on WSDL document

Syntax

createClassFromWsdl(source)

Description

createClassFromWsdl(source) creates a MATLAB class, servicename, based on a service name defined in source. The source argument is a string that specifies a URL, full path, or relative path to a Web Services Description Language (WSDL) document located on a server.createClassFromWsdl creates a class folder, @servicename, in the current folder. The class folder contains a method M-file for each Web service operation, and the display method (display.m) and constructor (servicename.m) for the class.

Examples

Get the methods from the myWebService WSDL document, which specifies two methods. The example does not use an actual WSDL document; therefore, you cannot run it. The example only illustrates how to use the function.

Create the class:

createClassFromWsdl('pathto_myWebService')

MATLAB creates the following in the current folder:

@myWebService
@myWebService/method1.m
@myWebService/method2.m
@myWebService/display.m
@myWebService/myWebService.m
 

Retrieve a student name, given the WSDL document for TestScoreWebService, at http://examplestandardtests.com/scoreswebservice?WSDL. The example does not use an actual WSDL document; therefore, you cannot run it. The example only illustrates how to use the function.

createClassFromWsdl('http://examplestandardtests.com/scoreswebservice?WSDL');
obj = TestScoreWebService;
% Show the methods
methods(obj)
% Retrieve the first student name
students = StudentNames(obj);
students.StudentInfo(1)

MATLAB returns

StudentNameLast: 'Benjamin'
StudentNameFirst: 'Ali'
 

Display the endpoint and WSDL document location:

display('TestScoreWebService')

MATLAB returns

endpoint: 'http://examplestandardtests.com/scoreswebservice'
    wsdl: 'http://examplestandardtests.com/scoreswebservice?WSDL'

See Also

callSoapService | createSoapMessage | parseSoapResponse | xmlread

How To

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS