Object Reference not set to an instance (ServiceType)
Posted: Wed Jul 16, 2008 9:56 pm
I am trying to send a message with the demo code. All I did was recompile it. I don't believe I changed anything (compiled it using VS 2008).
Connect now works fine, with the response being:
SmppClient connected
Binding SmppClient for SystemId: portalmms
Sending Data: 0000002c00000009000000003fbff01a706f7274616c6d6d7300396f3774346c6d6d00736d70700034020100
SmppClient bound
Bind result : sytem is 1 with status ESME_ROK
Received Data: 0000001780000009000000003fbff01a31000210000134
But when I try to submit using ShortMessage mode, I get a JIT Debugging window, stating :
System.NullReferenceException: Object reference not set to an instance of an object.
at ALT.SMS.SubmitSm.set_ServiceType(String value)
at ALT.SMS.SubmitSm..ctor(String ServiceType, Byte SrcTon, Byte SrcNpi, String SrcAddr, Byte DestTon, Byte DestNpi, String DestAddr)
at ALT.SMS.SmppClient.SubmitText(SubmitMode mode, Byte SrcTon, Byte SrcNpi, String SrcAddr, Byte DestTon, Byte DestNpi, String DestAddr, DataCodings data_coding, String Text)
at ALT.SMS.ALT.SMS.SmppClientDemo.bSubmit_Click(Object sender, EventArgs e) in C:\Users\carlos\Desktop\Portal MMS\SMPP\VBNet\SmppClientDemo.vb:line 728
I don't get this error with Payload mode, but my carrier doesn't support it and subsequently I get I timeout.
at System.Windows.Forms.Control.OnClick(EventArgs e)
Connect now works fine, with the response being:
SmppClient connected
Binding SmppClient for SystemId: portalmms
Sending Data: 0000002c00000009000000003fbff01a706f7274616c6d6d7300396f3774346c6d6d00736d70700034020100
SmppClient bound
Bind result : sytem is 1 with status ESME_ROK
Received Data: 0000001780000009000000003fbff01a31000210000134
But when I try to submit using ShortMessage mode, I get a JIT Debugging window, stating :
System.NullReferenceException: Object reference not set to an instance of an object.
at ALT.SMS.SubmitSm.set_ServiceType(String value)
at ALT.SMS.SubmitSm..ctor(String ServiceType, Byte SrcTon, Byte SrcNpi, String SrcAddr, Byte DestTon, Byte DestNpi, String DestAddr)
at ALT.SMS.SmppClient.SubmitText(SubmitMode mode, Byte SrcTon, Byte SrcNpi, String SrcAddr, Byte DestTon, Byte DestNpi, String DestAddr, DataCodings data_coding, String Text)
at ALT.SMS.ALT.SMS.SmppClientDemo.bSubmit_Click(Object sender, EventArgs e) in C:\Users\carlos\Desktop\Portal MMS\SMPP\VBNet\SmppClientDemo.vb:line 728
I don't get this error with Payload mode, but my carrier doesn't support it and subsequently I get I timeout.
at System.Windows.Forms.Control.OnClick(EventArgs e)