Page 1 of 1

Response Problem

Posted: Wed Feb 20, 2008 4:46 pm
by shuriz
Hi alt,

try
{
SubmitSm data = new SubmitSm();
SubmitSmResp resp = client.Submit(data);
client.SubmitText(

SubmitMode.ShortMessage,
byte.Parse(tbSrcAdrTON.Text),
byte.Parse(tbSrcAdrNPI.Text),
tbSrcAdr.Text,
byte.Parse(tbDestAdrTON.Text),
byte.Parse(tbDestAdrNPI.Text),
tbDestAdr.Text,
DataCodings.UCS2,
tbSend.Text);

if (resp.Status == CommandStatus.ESME_ROK)
{
MessageBox.Show(resp.MessageId);
}
else
{
MessageBox.Show(resp.Status.ToString());
}
}
catch (Exception ex) { MessageBox.Show(ex.Message); }

}

After binding to SMSC when i send a first message i gets a messageid but afterwards i get ESME_RMSGQFUL in the messagebox.

Please help me out, Why i cant get messageid each time :(

I also want to tell you that message always sent to mobile and received correctly only problem is that i gets ESME_RMSGQFUL instead of messageid.

With my other application i always gets a messageid. Please help me

Posted: Sat Mar 01, 2008 8:31 am
by alt
try to delete these line from your code
SubmitSm data = new SubmitSm();
SubmitSmResp resp = client.Submit(data);
They mean that you send empty SubmitSm packet.

Posted: Sun Mar 02, 2008 2:23 pm
by shuriz
Hi This is my code

client.SubmitText(

SubmitMode.ShortMessage,
0x05,
0x01,
"SMPP",
0x01,
0x01,
Mobile,
DataCodings.UCS2,
Text);

SubmitSmResp resp = new SubmitSmResp();


if (resp.Status == CommandStatus.ESME_ROK
{
MessageBox.Show(resp.MessageId, "messageid");
}

else
{
MessageBox.Show(resp.Status.ToString(), "else");
}
Can anybody knows how to take a response,this is my code which always shows me empty messagebox bcoz i m doing it wrong :(
Please Help

Posted: Thu Mar 06, 2008 6:17 pm
by alt
SubmitText method returns array of responses. The number of elements depend of text length.

SubmitSmResp[] resp =client.SubmitText(
SubmitMode.ShortMessage,
0x05,
0x01,
"SMPP",
0x01,
0x01,
Mobile,
DataCodings.UCS2,
Text);

if (resp[0].Status == CommandStatus.ESME_ROK
{
MessageBox.Show(resp.MessageId, "messageid");
}
else
{
MessageBox.Show(resp[0].Status.ToString(), "else");
}

Posted: Fri Mar 07, 2008 12:11 pm
by shuriz
Thanks Alt