Page 1 of 1

messageComposer and messages with ReferenceNumber is 0

Posted: Tue Dec 03, 2019 12:33 pm
by developerlearn999
i am using an inetlab tester.
the messages are with ReferenceNumber ==0 (se picture)

Image
how does the composer concat the correct parts in this case?

Thanks!

Re: messageComposer and messages with ReferenceNumber is 0

Posted: Wed Dec 04, 2019 3:42 pm
by alt
For MessageComposer ReferenceNumber=0 is same value as any other. It tries to combine the parts with ReferenceNumber =0. It is important that at the same time there is no anther concatenated message with 0 reference number. If it happen,
you could get a message text out of mixed parts from two messages or in worst case an IndexOutOfRangeException.

Therefore, you need to use Create(SmppClientBase) method when you create SMS parts with SMS.ForSubmit builder. It sets next reference number from client.SequenceGenerator for all parts.

If you use Create(EncodingMapper) method instead, ReferenceNumber keeps 0 value.

I hope I have understood your question, if not please provide more information about the issue.

Re: messageComposer and messages with ReferenceNumber is 0

Posted: Thu Dec 05, 2019 9:47 am
by developerlearn999
Thanks its more clear now

Re: messageComposer and messages with ReferenceNumber is 0

Posted: Thu Feb 20, 2020 2:21 pm
by developerlearn999
i tried to do :

Code: Select all

 _client.Submit(builder.Create(EncodingMapper.Default));
but still the Refernece number is 0
should i do something else too?

Re: messageComposer and messages with ReferenceNumber is 0

Posted: Thu Feb 20, 2020 5:11 pm
by alt
did you try:

Code: Select all

var parts = builder.Create(_client);
or

Code: Select all

 _client.Submit(builder);

Re: messageComposer and messages with ReferenceNumber is 0

Posted: Mon Feb 24, 2020 10:06 am
by developerlearn999
i tried

Code: Select all

var parts = builder.Create(_client);
IList<SubmitSmResp> resp = await _client.Submit(builder);
but still the Reference on the server side is 0

Re: messageComposer and messages with ReferenceNumber is 0

Posted: Mon Feb 24, 2020 6:39 pm
by alt
I cannot reproduce your case.
Could you send me library log in Verbose log level? https://docs.inetlab.com/smpp/v2/articles/tracing.html
I need to check what data library sends from your application.