Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

createClassFromWsdl

Create MATLAB class based on WSDL document

createClassFromWsdl will be removed in a future release. Use matlab.wsdl.createWSDLClient instead.

Syntax

  • createClassFromWsdl(source)
    example

Description

example

createClassFromWsdl(source) creates a MATLAB® class based on the service name defined in source.

createClassFromWsdl creates a class folder, @servicename, in the current folder. The class folder contains:

  • A method file for each Web service operation.

  • A display method, display.m.

  • A constructor, servicename.m.

Examples

collapse all

Display Standardized Test Scores

This example illustrates how to use the function. It does not use an actual WSDL document; therefore, you cannot run it. Retrieve information from a database that provides standardized test scores. Assume the WSDL document is located at http://examplestandardtests.com/scoreswebservice?WSDL.

Create the MATLAB class, @TestScoreWebService, in the current folder.

createClassFromWsdl('http://examplestandardtests.com/scoreswebservice?WSDL')
Retrieving document at 'http://examplestandardtests.com/scoreswebservice?WSDL'

Create the service.

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

Display the class methods.

dir @TestScoreWebService
display.m
StudentNames.m
Tests.m
TestScoreWebService.m

Display the calling syntax for the StudentNames function.

help StudentNames
 StudentNames(obj)
 
    Get names of students who took tests
    
      Output:
        Names = (string)

Get the names. MATLAB creates a structure with the names of the test takers.

students = StudentNames(svc)
students = 

    StudentInfo: [125x1 struct]

View the data for the first student.

students.StudentInfo(1)
StudentNameLast: 'Benjamin'
StudentNameFirst: 'Ali'

Related Examples

Input Arguments

collapse all

source — Web Services Description Language (WSDL) documentstring

Web Services Description Language (WSDL) document, specified as a string. The name must include the location of the document, using one of the following:

  • URL

  • Full path

  • Relative path

Example: 'http://examplestandardtests.com/scoreswebservice?WSDL'

Introduced before R2006a

Was this topic helpful?