public TextTO getNote(string siteId, string noteId)
{
TextTO result = new TextTO();
string msg = MdwsUtils.isAuthorizedConnection(_mySession, siteId);
if (msg != "OK")
{
result.fault = new FaultTO(msg);
}
else if (siteId == "")
{
result.fault = new FaultTO("Missing siteId");
}
else if (noteId == "")
{
result.fault = new FaultTO("Missing noteId");
}
if (result.fault != null)
{
return result;
}
try
{
NoteApi api = new NoteApi();
string s = api.getNoteText(_mySession.ConnectionSet.getConnection(siteId), noteId);
result = new TextTO(s);
}
catch (Exception e)
{
result.fault = new FaultTO(e);
}
return result;
}