Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

parseSoapResponse - Convert response string from SOAP server into MATLAB types

Syntax

parseSoapResponse(response)

Description

parseSoapResponse(response) extracts data from response a string returned by a SOAP server from the callSoapService function, and converts it to appropriate MATLAB classes (types).

Examples

This example uses parseSoapResponse in conjunction with other SOAP functions to retrieve information about books from a library database, specifically, the author's name for a given book title.

% Create the message:
message = createSoapMessage(...
'urn:LibraryCatalog',... 
'getAuthor',... 
{'In the Fall'},...
{'nameToLookUp'},...
{'{http://www.w3.org/2001/XMLSchema}string'},...
'rpc');
%
% Send the message to the service and get the response:
response = callSoapService(...
'http://test/soap/services/LibraryCatalog',...
'urn:LibraryCatalog#getAuthor',...
message)
%
% Extract MATLAB data from the response
author = parseSoapResponse(response)

MATLAB returns:

author = Kate Alvin

where author is a char class (type).

See Also

callSoapService, createClassFromWsdl, createSoapMessage, urlread, xmlread

Using Web Services with MATLAB in the MATLAB External Interfaces documentation

  


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