External Interfaces Reference |
Create MATLAB object based on WSDL file
Syntax
Description
creates a MATLAB object based on a Web Services Description Language (WSDL) application program interface (API). The createClassFromWsdl('source')
source
argument specifies a URL or path to a WSDL API, which defines Web service methods, arguments, and transactions. It returns the name of the new class.
Based on the WSDL API, the createClassFromWsdl
function creates a new folder in the current directory. The folder contains an M-file for each Web service method. In addition, two default M-files are created: the object's display method (display.m
) and its constructor (servicename.m
).
For example, if myWebService
offers two methods (method1
and method2
), the createClassFromWsdl
function creates
@myWebService
folder in the current directory
method1.m
-- M-file for method1
method2.m
-- M-file for method2
display.m
-- Default M-file for display
method
myWebService.m
-- Default M-file for the myWebService
MATLAB object
Remarks
For more information about WSDL and Web services, see the following resources:
Example
The following example calls a Web service that returns the book price for an International Standard Bibliographic Number (ISBN).
% The createClassFromWsdl function takes the WSDL URL as an % argument. createClassFromWsdl(... 'http://www.xmethods.net/sd/2001/BNQuoteService.wsdl'); bq = BNQuoteService; % getPrice is the web service method. The first argument, % bq, is an instance of the BNQuoteService class. The % second argument, 0735712719, is an ISBN number. getPrice(bq, '0735712719');
See Also
callSoapService
, createSoapMessage
, parseSoapResponse
callSoapService | createSoapMessage |
© 1994-2005 The MathWorks, Inc.