Open
Description
I am using the latest version of PushSharp.
When I try to send push messages to BlackBerry, I am getting an XML exception. The exception is below:
System.Xml.XmlException: The 'HR' start tag on line 1 position 1071 does not match the end tag of 'body'. Line 1, position 1132.
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag)
at System.Xml.XmlTextReaderImpl.ParseEndElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Load(Stream stream, LoadOptions options)
at PushSharp.Blackberry.BlackberryPushChannel.SendNotification(INotification notification, SendNotificationCallbackDelegate callback)
My code is as below.
private void SendNotificationViaBlackBerry(Notification notification, string notificationContent, string pushToken, int notificationCount)
{
PushSharp.Blackberry.BlackberryPushChannelSettings settings = new PushSharp.Blackberry.BlackberryPushChannelSettings("<app_id>", "<password>");
push.RegisterBlackberryService(settings, "<app_id>");
PushSharp.Blackberry.BlackberryNotification bNotification = new PushSharp.Blackberry.BlackberryNotification();
bNotification.PpgNotifyRequestedTo = "https://cp1359.pushapi.na.blackberry.com";
PushSharp.Blackberry.BlackberryRecipient recispent = new PushSharp.Blackberry.BlackberryRecipient(pushToken);
recispent.Port = <port>;
bNotification.SourceReference = "<app_id>";
bNotification.Recipients = new List<PushSharp.Blackberry.BlackberryRecipient>() { recispent };
bNotification.Content = new PushSharp.Blackberry.BlackberryMessageContent(notificationContent);
push.QueueNotification(bNotification);
}
Kindly let me know how this can be fixed.