function GetICEDataAverageResult = GetICEDataAverage(obj,ParameterCode,FromYear,ToYear,FromMonth,ToMonth,FromLongitude,ToLongitude,FromLatitude,ToLatitude,FromPressure,ToPressure)
%GetICEDataAverage Get ICES Bottle and low resolution CTD data average
%
%   D = GetICEDataAverage(obj,ParameterCode,FromYear,ToYear,FromMonth,ToMonth,...
%                        FromLongitude,ToLongitude,FromLatitude,ToLatitude,FromPressure,ToPressure)
%
%   Get Bottle and low resolution CTD data average
%
%     Input:
%       ParameterCode = (ParameterCodeEnum)
%            TEMP = Temperature [deg C]
%            PSAL = Salinity [psu]
%            DOXY = Oxygen [O2, ml/l]
%            PHOS = Phosphate Phosphorus [PO4-P, umol/l]
%            TPHS = Total Phosphorus [P, umol/l]
%            AMON = Ammonium [NH4-N, umol/l]
%            NTRI = Nitrite Nitrogen [NO2-N, umol/l]
%            NTRA = Nitrate Nitrogen [NO3-N, umol/l]
%            NTOT = Total Nitrogen [N, umol/l]
%            SLCA = Silicate Silicon [SiO4-Si, umol/l]
%            H2SX = Hydrogen Sulphide Sulphur [H2S-S, umol/l]
%            PHPH = Hydrogen Ion Concentration [H]
%            ALKY = Alkalinity [meq/l]
%            CPHL = Chlorophyll a [ug/l]
%       FromYear      = (int)
%       ToYear        = (int)
%       FromMonth     = (int)
%       ToMonth       = (int)
%       FromLongitude = (double)
%       ToLongitude   = (double)
%       FromLatitude  = (double)
%       ToLatitude    = (double)
%       FromPressure  = (double)
%       ToPressure    = (double)
%   
%     Output:
%       GetICEDataAverageResult = (ArrayOfICEDataAverage)
%
%See also: GetICEData

% Build up the argument lists.
values = { ...
   ParameterCode, ...
   FromYear, ...
   ToYear, ...
   FromMonth, ...
   ToMonth, ...
   FromLongitude, ...
   ToLongitude, ...
   FromLatitude, ...
   ToLatitude, ...
   FromPressure, ...
   ToPressure, ...
   };
names = { ...
   'ParameterCode', ...
   'FromYear', ...
   'ToYear', ...
   'FromMonth', ...
   'ToMonth', ...
   'FromLongitude', ...
   'ToLongitude', ...
   'FromLatitude', ...
   'ToLatitude', ...
   'FromPressure', ...
   'ToPressure', ...
   };
types = { ...
   '{http://ocean.ices.dk/webservices/}ParameterCodeEnum', ...
   '{http://www.w3.org/2001/XMLSchema}int', ...
   '{http://www.w3.org/2001/XMLSchema}int', ...
   '{http://www.w3.org/2001/XMLSchema}int', ...
   '{http://www.w3.org/2001/XMLSchema}int', ...
   '{http://www.w3.org/2001/XMLSchema}double', ...
   '{http://www.w3.org/2001/XMLSchema}double', ...
   '{http://www.w3.org/2001/XMLSchema}double', ...
   '{http://www.w3.org/2001/XMLSchema}double', ...
   '{http://www.w3.org/2001/XMLSchema}double', ...
   '{http://www.w3.org/2001/XMLSchema}double', ...
   };

% Create the message, make the call, and convert the response into a variable.
soapMessage = createSoapMessage( ...
    'http://ocean.ices.dk/webservices/', ...
    'GetICEDataAverage', ...
    values,names,types,'document');
response = callSoapService( ...
    obj.endpoint, ...
    'http://ocean.ices.dk/webservices/GetICEDataAverage', ...
    soapMessage);
GetICEDataAverageResult = parseSoapResponse(response);
