Hi
I am using v1.1.15.5
I can serialize the DeliverSm however upon deserializing I am receiving:
System.NullReferenceException: Object reference not set to an instance of an object.
at Inetlab.SMPP.PDU.DeliverSm.ReadFromBuffer(SmppBuffer buf, Int32& offset) in E:\Home\My Documents\Visual Studio 2013\Projects\Azure\20140807 SlickSMS\Inetlab.SMPP.Source\Source\VB.NET\PDU\DeliverSm.vb:line 333
at Inetlab.SMPP.PDU.DeliverSm..ctor(SerializationInfo info, StreamingContext context) in E:\Home\My Documents\Visual Studio 2013\Projects\Azure\20140807 SlickSMS\Inetlab.SMPP.Source\Source\VB.NET\PDU\DeliverSm.vb:line 519
at ReadDeliverSmFromXml(XmlReaderDelegator , XmlObjectSerializerReadContext , XmlDictionaryString[] , XmlDictionaryString[] )
at System.Runtime.Serialization.ClassDataContract.ReadXmlValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context)...
Specifically this line in the source:
SourceAddr = buf.ToCString(offset, Client.GetMappedEncoding(DataCodings.Default))
'Client' is Nothing/Null because I have no way of associating the DeliverSm with an active SmppClient owing to me deserializing the DeliverSm from a queue - is there a workaround for this rather than me removing these references to the Client from the code?
My code to deserialize from the queue is: (DeliverSm)dsm = (Microsoft.ServiceBus.Messaging.BrokeredMessage)receivedMessage.GetBody(Of DeliverSm)()
Regards
Nick
DeliverSm failing during deserializing
DeliverSm failing during deserializing
ProcessFlows UK Ltd
http://www.processflows.co.uk/
http://www.processflows.co.uk/
Re: DeliverSm failing during deserializing
I am also facing the similar issue when trying to deserialize. Am I doing something wrong in the below code?
string sPDU = "0000004200000005000000000000000a4E4F52455000010139373135303030303030303000050054455354000400000000000003001369643A313233343536373839";
byte[] message_payload_bytes = System.Text.Encoding.ASCII.GetBytes(sPDU);
DeliverSm deliverSM = DeliverSm.Deserialize(message_payload_bytes);
I am getting the below error,
Index was outside the bounds of the array.
at Inetlab.SMPP.PDU.DeliverSm.CRvxk0OPMh(FDORcP2nblJm3MATP1 , Int32& )
at Inetlab.SMPP.PDU.DeliverSm.RrfxrANwyQ(FDORcP2nblJm3MATP1 , Int32& , SmppClientBase )
at Inetlab.SMPP.PDU.DeliverSm.Deserialize(Byte[] data)
at SmppClientDemo.SmppClientDemo.SmppClientDemo_Load(Object sender, EventArgs e) in c:\Users\hisham\Desktop\Inetlab.SMPP\Demo\CS\SmppClientDemo\SmppClientDemo.cs:line 642
Regards,
Hisham
string sPDU = "0000004200000005000000000000000a4E4F52455000010139373135303030303030303000050054455354000400000000000003001369643A313233343536373839";
byte[] message_payload_bytes = System.Text.Encoding.ASCII.GetBytes(sPDU);
DeliverSm deliverSM = DeliverSm.Deserialize(message_payload_bytes);
I am getting the below error,
Index was outside the bounds of the array.
at Inetlab.SMPP.PDU.DeliverSm.CRvxk0OPMh(FDORcP2nblJm3MATP1 , Int32& )
at Inetlab.SMPP.PDU.DeliverSm.RrfxrANwyQ(FDORcP2nblJm3MATP1 , Int32& , SmppClientBase )
at Inetlab.SMPP.PDU.DeliverSm.Deserialize(Byte[] data)
at SmppClientDemo.SmppClientDemo.SmppClientDemo_Load(Object sender, EventArgs e) in c:\Users\hisham\Desktop\Inetlab.SMPP\Demo\CS\SmppClientDemo\SmppClientDemo.cs:line 642
Regards,
Hisham
Re: DeliverSm failing during deserializing
Hallo Hisham,
This PDU has wrong short message length. It is defined as 19 (HEX 0x13), but actually 12.
The length of entire PDU 0x42 is correct.
This PDU has wrong short message length. It is defined as 19 (HEX 0x13), but actually 12.
The length of entire PDU 0x42 is correct.