Click here to Skip to main content
15,124,646 members

Comments by sam_ckp (Top 3 by date)

sam_ckp 10-Jun-11 2:25am View
   
Thanks Resmi, I need to run more than 10 scripts concurrently, is it possible in UWSC or any other tool is available like that ?

if you have any idea then let me know, Thanks :)
sam_ckp 23-Feb-11 7:25am View
   
HI Olivier, i passed the parameters like this..

resp = FireMTURL((LPCSTR)DB_DATA.msisdn, (LPCSTR)msg_send,(LPCSTR) minsat.MT_URL, (LPCSTR)MT_SHORTCODE);

is it right ??
sam_ckp 23-Feb-11 4:18am View
   
CString FireMTURL(CString msisdn,CString mesg,CString MT_URL,CString MT_SHORTCODE)
{
WriteTESTLog("TEST_LOGS_NIGHT",_T("IN AIR BAL functionnnnnnnn------->"));
try
{

/* minsat.MT_URL.Replace("XXXX",msisdn);
minsat.MT_URL.Replace("YYYY",packs.MT_SHORTCODE);
minsat.MT_URL.Replace("ZZZZ",mesg);*/


mesg.Replace('*','%2A'); //replacing special characters in the messagess
mesg.Replace('#','%23');

if(mesg.GetLength()>=158)
{
WriteTESTLog("TEST_LOGS_NIGHT",_T("message greater than 160 characters"));

WriteNXLERRORLOG("MTURL_MAX_STRING",_T("message greater than 160 characters")+_T(packs.PackName));

CString error="";
error.Format("MT_URL_message greater than 160 characters-->%s",packs.PackName);

MessageBox(HWND_DESKTOP,(LPCTSTR)error,(LPCTSTR)minsat.TITLE,MB_OK);

return "MESG_MORE_THAN_160";
}

MT_URL.Replace("XXXX",msisdn);
MT_URL.Replace("YYYY",MT_SHORTCODE);
MT_URL.Replace("ZZZZ",mesg);

System::String^ s;
String ^managed_msisdn = gcnew String(msisdn);
String ^managed_URL = gcnew String(MT_URL);

CString no = managed_msisdn;
CString URL = managed_URL;

WriteTESTLog("TEST_LOGS_NIGHT",_T("MTURL_PRARAMSSSSSS")+_T(no)+_T("------>")+_T(URL)+_T("------")+_T(MT_SHORTCODE)+_T("------")+_T(mesg));

// WriteAIRLOG("PARAM_INFO",_T(no) + _T("#") +_T(URL) + _T("#")+ _T(logpath) + _T("#") + _T(circle));
s=URLFIRECPP::UrlFire::FireUrl(managed_URL);
CString response = s;

WriteTESTLog("TEST_LOGS_NIGHT",_T("MTURL_RESPONSE")+_T("------>")+_T(URL)+_T("------")+_T(response));

WritePSOLog("MT_URL",_T("MTURL_RESPONSE")+_T("------>")+_T(URL)+_T("------")+_T(response));
CString log="";
log.Format("msisdn-->%s#shortcode-->%s#mesg-->%s#url-->%s#response-->%s",no,MT_SHORTCODE,mesg,URL,response);

SendDBcommand("","MT_URL_FIRED",no,log);

if(response== "ok" ||response== "OK" )
{
CString bal = "success";
printf("%s",s);
WriteTESTLog("TEST_LOGS_NIGHT",_T("MTURL_RESPONSE-------->SUCCESS"));

return bal;
}
else
{
CString ret = "error";

WriteTESTLog("TEST_LOGS_NIGHT",_T("MTURL_RESPONSE-------->FAILED"));

return ret;
}
}
catch(CException *ex)
{
char str[1024];
CString error="";
ex->GetErrorMessage(str,1024);
error=str;
error=error + "#FireMTURL";
WriteNXLERRORLOG("ERROR",_T(error));

}
}