Page 1 of 1

SubmitSM problem

Posted: Tue Aug 28, 2012 6:39 am
by prog019
Dear Alt,

I'm trying to use SubmitSm:

SubmitSm req = new SubmitSm(null,
srcAdrTON,
tbSrcAdrNPI,
srcAddr,
tbDestAdrTON,
tbDestAdrNPI,
dstAddr);
req.DataCoding = coding;
req.ShortMessage = messageText;
......

I get exception "Object reference is null ..." and I found the problem:

Dear Alt,
In SubmitSM class, in ShortMessage property you are using following code:

...ShortMessage = Client.GetMessageBytes(value, this.DataCoding);

And here "Client" == NULL

Please assist, how use SubmitSm?

Thanks in advance.

Re: SubmitSM problem

Posted: Thu Aug 30, 2012 4:43 am
by prog019
Dear Alt,

Please reply.

Re: SubmitSM problem

Posted: Thu Sep 13, 2012 11:44 am
by alt
When you build SubmitSm you can send text in User Data or in MessagePayload TLV parameter.

sm.UserDataPdu.ShortMessage = byteArray;

or

sm.Optional.AddMessagePayload(byteArray);