Main Content

Access Services That Use WSDL Documents

A WSDL document uses a standard format to describe server operations, arguments, and transactions. The matlab.wsdl.createWSDLClient function creates a MATLAB® class that allows you to use the server APIs.

To use the matlab.wsdl.createWSDLClient function, identify the location of the service WSDL document. The function works with WSDL documents that comply with the WS-I 1.0 standard and use one of these forms: RPC-literal, Document-literal, or Document-literal-wrapped. matlab.wsdl.createWSDLClient does not support RPC-encoded.

You must download supported versions of the OpenJDK® or Oracle® Java® JDK™ and the Apache® CXF programs.

To access a service:

  1. Install and/or locate the Java JDK and Apache CXF programs.

  2. Set the paths to the JDK and CXF programs using the matlab.wsdl.setWSDLToolPath function. Values for the paths are saved across sessions in your user preferences, so you only need to specify them once.

  3. Change the MATLAB current folder to the location where you want to use the files generated from the WSDL document. You must have write-permission for this folder.

  4. Run matlab.wsdl.createWSDLClient, supplying the WSDL document location, which can be a URL or a path to a file.

    The function converts the server APIs to a MATLAB class, and creates a class folder in the current folder. The class folder contains methods for using the server APIs. The function always creates a constructor method that has the same name as the class.

    You only run the matlab.wsdl.createWSDLClient function once. Then you can access the class anytime.

  5. Create an object of the class whenever you want to use the operations of the service.

  6. View information about the class to see what methods (operations) are available for you to use.

  7. Use the methods of the object to run applications on and exchange data with the server.

    MATLAB automatically converts XML data types to MATLAB types, and conversely.

See Also


Related Examples

More About