For the quickest reply, please use our new Customer Helpdesk and Feedback platform
 
   
 
Ejabberd
Posted: 12 April 2007 09:50 AM   [ Ignore ]
Newbie
Rank
Total Posts:  5
Joined  2007-04-12

Hi,

I begin with ejabberd and i need to make a web client based on AJAX and DOJO.
I want to know if it’s possible or not for a client to make get or post requests on ejabberd and that the ejabberd answer in JSON ?
I know that i need to write some ejabberd modules to do that but, is it possible to do such a thing?

Maybe i could use another solution but the problem is that the client could not parse easily XMPP. So i may use a servlet which communicate with the client (client-> servlet: post | servlet -> client:JSON) and which listen to the server, using SMACK api, but is it a good way?

Sorry for my poor english :-s , i hope you understand my problem and i thank you to tell me all ideas you could have on that topic.

Profile
 
 
Posted: 13 April 2007 05:31 AM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  3
Joined  2007-04-13

What is the purpose of the web client ?

Profile
 
 
Posted: 13 April 2007 08:15 AM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  5
Joined  2007-04-12

Sorry, i forgot to say that’s for instant messaging.
%-P

Profile
 
 
Posted: 13 April 2007 09:58 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  600
Joined  2006-11-12

Yes, this kind of module can be done. We have done that already in the past.

Profile
 
 
Posted: 13 April 2007 10:03 AM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  5
Joined  2007-04-12

Ok, great. Is this method scalable? Could you indicate how to do such a module or where can i find it ?

Thanks.

Profile
 
 
Posted: 23 April 2007 08:41 AM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  600
Joined  2006-11-12

Yes, this approach is very scalable.
I think however that there is no public module that is close to what you are trying to achieve.

Profile
 
 
Posted: 23 April 2007 01:17 PM   [ Ignore ]   [ # 6 ]
Newbie
Rank
Total Posts:  5
Joined  2007-04-12

ok, thank you .
I tried to connect a javascript web client with httpbinding at http://server:5280/http-bind but the service is unavailable. I’m not sure but maybe it’s a problem of files versions but i don’t manage to use mod_http_binding, or maybe it’s a problem with the requests handlers cause i don’t manage to use the mod_hello in the example.

I have an other question cause i can’t connect with http-polling under firefox.

[Exception... "Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIXMLHttpRequest.send]" nsresult"0xc1f30001 (NS_ERROR_NOT_INITIALIZED)" location"JS frame :: file:///..jsjac/clientJabber/JSJaCHttpPollingConnection.js :: JSJaCHPCConnect :: line 203" datano] 

It seems to be a problem of XMlHttpRequest permission but i don’t understand. Do i have to use a proxy to do http-polling or can i connect my web client and my ejabberd server without proxy?

Thanks for your help.

Nicolas

Profile
 
 
Posted: 26 April 2007 02:25 PM   [ Ignore ]   [ # 7 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  600
Joined  2006-11-12

Hello,

you need to serve the Javascript from the same domain you are doing the polling. On the current stable ejabberd it means that you have to use a proxy.

In the next release, you will be able to host your Javascript directly in ejabberd, mainly for ease of use and performance improvements reasons.

Profile
 
 
Posted: 12 July 2010 04:17 PM   [ Ignore ]   [ # 8 ]
Newbie
Rank
Total Posts:  3
Joined  2010-07-12

This error code can be something about command “open”, may be it just put it wrong sequence. Suggest you to debug step by step, you will see.

Profile
 
 
Posted: 06 October 2010 04:48 PM   [ Ignore ]   [ # 9 ]
Newbie
Rank
Total Posts:  1
Joined  2010-10-06

it’s a nice filling that there are some web masters who are always there to help. yes i am talking about you guys who response for any solution is asked. though i don’t have that much idea about the module is discussed here but i got one thing that cooperation is also here. i have been helped on several issues also. anyway i am really thankful to you.

Profile
 
 
Posted: 19 October 2010 02:21 AM   [ Ignore ]   [ # 10 ]
Newbie
Rank
Total Posts:  1
Joined  2010-10-19

^ ^ that would probably work.

Profile
 
 
Posted: 11 January 2012 06:52 PM   [ Ignore ]   [ # 11 ]
Newbie
Rank
Total Posts:  5
Joined  2012-01-09

I am talking about you guys who response for any solution is asked. though i don’t have that much idea about the module is discussed here but i got one thing that cooperation is also here. i have been helped on several issues also. anyway i am really thankful to you.

Profile