Date: Jun 13, 2013 8:42 AM
Author: Philip  Spratt
Subject: SOAP message input parameters

I am trying to use the Metlin SOAP API and have generated the methods in Matlab using createClassFromWsdl. Unlike the generated SOAP messages from other metabolomics databases, this asks for a single input parameter 'SpectrumMatchRequest' (other than 'obj'). I have only experienced using single vectors as parameters previously, e.g.: 

function xReturn = searchSpectrum(obj,mzs,intensities,unit,tolerance,cutoff,instrumentTypes,ionMode,maxNumResults)


However, this particular SOAP API requires 8 parameters, but only asks for 'SpectrumMatchRequest'. Is there a way of putting all of the parameters into a single object or array, consisting of differing data types?

Please see the auto-generated SOAP message which this issue is regarding:

function result = SpectrumMatch(obj,SpectrumMatchRequest)
%SpectrumMatch(obj,SpectrumMatchRequest)
%
% Input:
% SpectrumMatchRequest = (SpectrumMatchRequest)
%
% Output:
% result = (spectrumLineInfo)

% Build up the argument lists.
values = { ...
SpectrumMatchRequest, ...
};
names = { ...
'SpectrumMatchRequest', ...
};
types = { ...
'SpectrumMatchRequest', ...
};

% Create the message, make the call, and convert the response into a variable.
soapMessage = createSoapMessage( ...
'Metlin', ...
'SpectrumMatch', ...
values,names,types,'rpc');
response = callSoapService( ...
obj.endpoint, ...
'SOAP/Metlin#SpectrumMatch', ...
soapMessage);
result = parseSoapResponse(response);