public MessageTO sendDraft(string pwd, Int32 messageId, Int32 messageOplock)
{
MessageTO result = new MessageTO();
if (String.IsNullOrEmpty(pwd))
{
result.fault = new FaultTO("Missing pwd");
}
else if (messageId <= 0)
{
result.fault = new FaultTO("Must supply a valid message ID");
}
try
{
using (MdoOracleConnection cxn = new MdoOracleConnection(new mdo.DataSource() { ConnectionString = pwd }))
{
SecureMessageDao dao = new SecureMessageDao(cxn);
gov.va.medora.mdo.domain.sm.Message msg = new Message() { Id = messageId, Oplock = messageOplock };
result = new MessageTO(dao.sendDraft(msg));
}
}
catch (Exception exc)
{
result.fault = new FaultTO(exc);
}
return result;
}