messageComposer and messages with ReferenceNumber is 0

Post Reply
developerlearn999
Posts: 85
Joined: Thu Jun 20, 2019 9:34 am

messageComposer and messages with ReferenceNumber is 0

Post 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!
alt
Site Admin
Posts: 992
Joined: Tue Apr 25, 2006 9:45 am

Re: messageComposer and messages with ReferenceNumber is 0

Post 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.
developerlearn999
Posts: 85
Joined: Thu Jun 20, 2019 9:34 am

Re: messageComposer and messages with ReferenceNumber is 0

Post by developerlearn999 »

Thanks its more clear now
developerlearn999
Posts: 85
Joined: Thu Jun 20, 2019 9:34 am

Re: messageComposer and messages with ReferenceNumber is 0

Post 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?
alt
Site Admin
Posts: 992
Joined: Tue Apr 25, 2006 9:45 am

Re: messageComposer and messages with ReferenceNumber is 0

Post by alt »

did you try:

Code: Select all

var parts = builder.Create(_client);
or

Code: Select all

 _client.Submit(builder);
developerlearn999
Posts: 85
Joined: Thu Jun 20, 2019 9:34 am

Re: messageComposer and messages with ReferenceNumber is 0

Post 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
alt
Site Admin
Posts: 992
Joined: Tue Apr 25, 2006 9:45 am

Re: messageComposer and messages with ReferenceNumber is 0

Post 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.
Post Reply