function addAttachmentReturn = addAttachment(obj,in0,in1,in2)
%addAttachment(obj,in0,in1,in2)
%
%     Input:
%       in0 = (string)
%       in1.comment = (string)
%       in1.contentType = (string)
%       in1.created = (dateTime)
%       in1.creator = (string)
%       in1.fileName = (string)
%       in1.fileSize = (long)
%       in1.id = (long)
%       in1.pageId = (long)
%       in1.title = (string)
%       in1.url = (string)
%       in2 = (base64Binary)
%   
%     Output:
%       addAttachmentReturn.comment = (string)
%       addAttachmentReturn.contentType = (string)
%       addAttachmentReturn.created = (dateTime)
%       addAttachmentReturn.creator = (string)
%       addAttachmentReturn.fileName = (string)
%       addAttachmentReturn.fileSize = (long)
%       addAttachmentReturn.id = (long)
%       addAttachmentReturn.pageId = (long)
%       addAttachmentReturn.title = (string)
%       addAttachmentReturn.url = (string)

% Build up the argument lists.
values = { ...
   in0, ...
   in1, ...
   in2, ...
   };
names = { ...
   'in0', ...
   'in1', ...
   'in2', ...
   };
types = { ...
   '{http://www.w3.org/2001/XMLSchema}string', ...
   '', ...
   'base64Binary', ...
   };

% Create the message, make the call, and convert the response into a variable.
soapMessage = createSoapMessage( ...
    'http://soap.rpc.confluence.atlassian.com', ...
    'addAttachment', ...
    values,names,types,'rpc');
response = callSoapService( ...
    obj.endpoint, ...
    '', ...
    soapMessage);
addAttachmentReturn = parseSoapResponse(response);
