Skip to Main Content Skip to Search
Product Documentation

callSoapService - Send SOAP message to endpoint

Syntax

response = callSoapService(endpoint,soapAction,message)

Description

response = callSoapService(endpoint,soapAction,message) sends message, a Sun™ Java™ document object model (DOM), to the soapAction service at endpoint. Create message using createSoapMessage, and extract results from response using parseSoapResponse.

Examples

This example uses callSoapService 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

createClassFromWsdl | createSoapMessage | parseSoapResponse | urlread | xmlread

How To

  


Free MATLAB Interactive Kit

Explore how to use MATLAB to make advancements in engineering and science.


Download free kit

Trials Available

Try the latest version of MATLAB and other MathWorks products.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS