There are two primary ways for using Web services in MATLAB®, using the createClassFromWsdl function, or using the SOAP functions. When the Web service you want to use provides a Web Services Description Language (WSDL) document, use the MATLAB createClassFromWsdl function because it provides a more convenient way to work with the service. The createClassFromWsdl function actually uses the SOAP functions, but with it, you do not need to know how to use the SOAP protocol. When the Web service does not provide a WSDL document, use the MATLAB SOAP functions: createSoapMessage, callSoapService, and parseSoapResponse.
If you want to perform similar tasks with different Web services that provide WSDL documents, you might be able to create and use less code by using the SOAP functions instead of the createClassFromWsdl function.
Both the createClassFromWsdl function and the SOAP functions access Web services in the same basic way:
You initiate interaction with the server by sending a request via MATLAB Web service functions. You provide input about the location of the Web service, the operation you want to perform, and any necessary parameters.
From your input, MATLAB constructs the SOAP message and sends it to the server.
When the server receives the request, it performs the processing and sends a SOAP response back to MATLAB.
MATLAB handles the response from the server, extracting data from the SOAP message and converting it for use in MATLAB.