Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Posts: 1,634
Registered: ‎07-14-2008
My Device: Z10
My Carrier: Fido

Unreliable MessageService Class

I've been getting too many errors when receive email from messgeService.  I just got the following when debugging.  My app never receives the new incoming messages when these errors happen.


DELETE   0x1   
Curl Easy perform 
Curl Easy GetInfo response code 
Curl easy getInfo content_length_download 
Curl Error Code 0 
Response Code 501 
            <title>Error 501: Not Implemented</title>
            <style type="text/css">
              html {background-color: #eee; font-family: sans;}
              body {background-color: #fff; border: 1px solid #ddd; padding: 15px; margin: 15px;}
              pre {background-color: #eee; border: 1px solid #ddd; padding: 5px;}
            <h1>Error 501: Not Implement...
Status Code 4 
Exception String "Error while parsing response." 
ErrorInfo MessageServicePrivate::handleResponse  Error while parsing response. : 4  methodid  EMS::remove 
PIMCoreAccessPool::returnPca  1 
creation of local SMS-MMS account succeeded 
Calling AccountServicePrivate::account for AccountKey = 1391544727 
GET   0x1   
Curl Easy perform 


Posts: 252
Registered: ‎08-17-2012
My Device: BlackBerry Z10 and Q10
My Carrier: Bell

Re: Unreliable MessageService Class

Hi smiley,


Please report this issue in jira: https://www.blackberry.com/jira/secure/Dashboard.jspa. Please add to your ticket a sample project that will help us reproduce the issue.


Did this answer your question? Please accept post as solution.
Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Posts: 24
Registered: ‎05-14-2014
My Device: Blackberry-Z10
My Carrier: Vodafone

Re: Unreliable MessageService Class



I worked out a workaround for this issue.


First you call the downloadmessage() function from messageservice class in place where you want to load the body of the message

messageservice->downloadMessage(accountId, messageId);


This fires the bodydownloaded signal so now you can use a slot function as follows


connect(messageservice,SIGNAL(bodyDownloaded(bb:Smiley Tongueim::account::AccountKey, bb:Smiley Tongueim::message::MessageKey)), SLOT(messageread(bb:Smiley Tongueim::account::AccountKey, bb:Smiley Tongueim::message::MessageKey)));


Now in the messageread() function you can convert it into a QString and it would look as follows



And now you can see the complete body of the message you received. Ofcourse there in sample PIM message example there it does not show it this way. But it works surely you can give it try this way.


This is the way I did it

 In place where you access the message contents.



messageservice->downloadMessage(accountId, messageId);



The SLOT function

void classname::messageread()


qDebug()<<"Message Body";




Give it a try and let me know the result. Make a clean, build and run.