RequestSendMessage for Pesta Server

3 views
Skip to first unread message

Rony Bardavid

unread,
Sep 10, 2009, 9:46:14 AM9/10/09
to pesta-dev
I am using pesta server to build opensocial in my website.
But I don’t think there is shareapps or sendmessage handler on the
project.
Can you help me how to implement a new handler to application? I just
need to know how is the flow of handler.

I will be very happy if you can help me.

Thanks
Roni

Sean Lin

unread,
Sep 10, 2009, 10:17:46 AM9/10/09
to pest...@googlegroups.com
Hi Roni,
You may want to check out the project at http://raya.codeplex.com. The
message sending and app sharing code is there.

Sean
__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4414 (20090910) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


Rony Bardavid

unread,
Sep 10, 2009, 11:05:05 AM9/10/09
to pesta-dev
But i am not using the raya. I have my own website and i am using
pesta server just for open social.
So i think i need to add handler to pesta server not raya.

On 10 ספטמבר, 17:17, "Sean Lin" <seanli...@gmail.com> wrote:
> Hi Roni,
>   You may want to check out the project athttp://raya.codeplex.com. The

Sean Lin

unread,
Sep 10, 2009, 11:59:16 AM9/10/09
to pest...@googlegroups.com
Hi Rony,

Ah ok.

You will need to implement the IMessageService in http://code.google.com/p/pesta/source/browse/#svn/trunk/pesta/pesta/Engine/social/spi

in your database provider, eg. http://code.google.com/p/pesta/source/browse/trunk/pesta/pestaServer/DataAccess/RayaService.cs

The MessageHandler is at http://code.google.com/p/pesta/source/browse/trunk/pesta/pestaServer/Models/social/service/MessageHandler.cs

And it's already registered with the dispatcher in apiController.cs

As for requestShareApp... i'm actually unfamiliar with it, I will need to look into this

FYI,
/social/rest and /social/rpc is handled by restController.cs and rpcController.cs respectively for REST and RPC calls. These route mappings are defined in Global.asax.cs if you're unfamiliar with the MVC model and you want to change these default values.


If you want commit access for pesta let me know.

Hope that helps.

- Sean

Rony Bardavid

unread,
Sep 13, 2009, 3:56:34 AM9/13/09
to pesta-dev
I did what you told but SendMessaging still doesnt work. I used break
points and i saw that the constructer of messagehandler was called
but handlepost or handleput was not called.

What can be the problem.

Thanks

On 10 ספטמבר, 18:59, "Sean Lin" <seanli...@gmail.com> wrote:
> Hi Rony,
>
> Ah ok.
>
> You will need to implement the IMessageService inhttp://code.google.com/p/pesta/source/browse/#svn/trunk/pesta/pesta/E...
>
> in your database provider, eg.http://code.google.com/p/pesta/source/browse/trunk/pesta/pestaServer/...
>
> The MessageHandler is athttp://code.google.com/p/pesta/source/browse/trunk/pesta/pestaServer/...

Sean Lin

unread,
Sep 13, 2009, 4:48:10 AM9/13/09
to pest...@googlegroups.com
Ok, I'll have a look
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4420 (20090912) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4420 (20090912) __________

Sean Lin

unread,
Sep 13, 2009, 6:05:17 AM9/13/09
to pest...@googlegroups.com
What's the request you're trying to post?
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4420 (20090912) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4420 (20090912) __________

Rony Bardavid

unread,
Sep 13, 2009, 6:48:21 AM9/13/09
to pesta-dev
i am using the animated rose application from open social games

The important part of the code is:

function sendMessage(id)
{
var previewUrl = "http://www.hi5.com/friend/apps/
displayAppCanvas.do?appId=29948&view=preview";
var messBody = "<a href='" + ownerProfileUrl + "'
target='_top'>" + ownerDisplayName + "</a> sent Animated Rose to you!
<br />Click <a href='" + previewUrl + "' target='_top'>here</a> to
accept :)";
var selected = document.getElementById
("selImage").innerHTML;

var mess = opensocial.newMessage(messBody);

mess.setField(opensocial.Message.Field.TITLE,
"Animated Rose for you!");
mess.setField(opensocial.Message.Field.TYPE,
opensocial.Message.Type.NOTIFICATION);

var recipients = new Array(1);
recipients[0] = id;

opensocial.requestSendMessage(recipients, mess,
handleSendMessage);

Sean Lin

unread,
Sep 13, 2009, 8:23:29 AM9/13/09
to pest...@googlegroups.com
Hmmm ... ok using the following works

var params = {};
params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.JSON;
params[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.POST;
gadgets.io.makeRequest('http://localhost:8000/social/rest/messages/john.doe', onMessageList, params);

but the function

opensocial.requestSendMessage() does not seem to work

What features do you specify under ModulePrefs?
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4421 (20090913) __________

Sean Lin

unread,
Sep 13, 2009, 10:12:30 AM9/13/09
to pest...@googlegroups.com
Hi Rony,
Ok, from the looks of it, it's not supported by pesta. The following is some information

http://markmail.org/message/evh32a2bypsbxzhn?q=shindig+requestSendMessage

I will implement this into raya in the future if I have time.
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4421 (20090913) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4421 (20090913) __________

Rony Bardavid

unread,
Sep 13, 2009, 10:25:44 AM9/13/09
to pesta-dev
Ok. Please Let me now when you implement this feature
Thanks

On 13 ספטמבר, 17:12, "Sean Lin" <seanli...@gmail.com> wrote:
> Hi Rony,
>   Ok, from the looks of it, it's not supported by pesta. The following is some information
>
> http://markmail.org/message/evh32a2bypsbxzhn?q=shindig+requestSendMes...

Rony Bardavid

unread,
Oct 1, 2009, 11:33:34 AM10/1/09
to pesta-dev
Hi Sean,

I really need to implement this requestsendsms function.
So what i need to know how to impement it.
I created new class for messaging in pesta and also i added handler to
pesta server and some javascript stuffs. But still it doesnt work.
How can i implement please help me.

Thanks
Roni

Sean Lin

unread,
Oct 1, 2009, 12:02:28 PM10/1/09
to pest...@googlegroups.com
Hi Roni,
I will try to look into this as soon as possible when I can find the time.

http://www.hi5networks.com/platform/browser/shindig/trunk/features/src/main/javascript/features/opensocial-current/hi5container.js

didn't help?
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4473 (20091001) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4473 (20091001) __________
Reply all
Reply to author
Forward
0 new messages