DeliverSm failing during deserializing
Posted: Tue Aug 19, 2014 5:47 pm
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
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