Page 1 of 1

Serialize

Posted: Tue May 30, 2017 11:21 am
by stevep
Hi alt,

I am looking to accept Sms from in to a web api which may be scheduled at some time in the future. Withing the web api I want to create the Sms using the new builder methods IList Inetlab.SMPP.SMS.ForSubmit() and store each of the SubmitSm's for later submission.

I am thinking to simply extract resulting SubmitSm's and store the bytes to a database and recreate them for sending when their scheduled time is due. I have tried extracting the sm.UserDataPdu.ShortMessage's to a byte array however when I convert them back to a SubmitSm they are not complete.

Is there a simple method to achieve this ?

Steve

Re: Serialize

Posted: Wed May 31, 2017 3:04 pm
by alt
Please try following methods:

Code: Select all

byte[] SubmitSM.Serialize(SubmitSM submit)
SubmitSM SubmitSM.Deserialize(byte[] data)

Re: Serialize

Posted: Thu Jun 01, 2017 11:05 am
by stevep
Awesome, thank you.