From: Glen A. <gle...@gm...> - 2011-01-09 05:59:18
|
Yes it does Norman. Thanks to a nice stackoverflow user, I have found out the problem. The app engine client does not respond to messages that do not specify the type. Changing this line xmppClient.send(xmpp.Message(operator, msg)) to this line xmppClient.send(xmpp.Message(operator, msg, typ='chat')) So glad to get this working. Cheers Glen Arrowsmith http://garrows.com On Sun, Jan 9, 2011 at 2:04 AM, Norman Rasmussen <no...@ra...>wrote: > Does sending from Google Talk to app engine work? > > On Fri, Jan 7, 2011 at 3:59 AM, Glen Arrowsmith <gle...@gm... > > wrote: > >> Hello List, >> First of all, thank you for this awesome library. >> >> However, I seem to be having trouble using the xmpppy client when sending >> messages to the app engine's xmpp client. I am not getting any errors. The >> messages just aren't arriving there. Sending messages from app engine's >> client to the sl4a client works. Sending messages to and from google talk's >> client to and from the sl4a client works as well. >> Any help would be greatly appreciated. >> >> import xmpp, time >> _SERVER = 'talk.google.com', 5223 >> commandByXMPP() >> def commandByXMPP(): >> global xmppUsername >> xmppUsername = 'gar...@gm...' >> global xmppPassword >> xmppPassword = 'obscured' >> global xmppClient >> global operator >> operator = "cel...@ap..." >> jid = xmpp.protocol.JID(xmppUsername) >> xmppClient = xmpp.Client(jid.getDomain(), debug=[]) >> xmppClient.connect(server=_SERVER) >> xmppClient.RegisterHandler('message', XMPP_message_cb) >> auth = xmppClient.auth(jid.getNode(), xmppPassword, 'botty') >> xmppClient.sendInitPresence() >> start=time.time() >> i=0 >> outputToOperator("starting") >> while time.time()-start<15: >> print "tick" >> xmppClient.Process(1) >> i=i+1 >> if i % 10 == 0: >> outputToOperator("hello") >> outputToOperator("exiting") >> >> def XMPP_message_cb(session, message): >> jid = xmpp.protocol.JID(message.getFrom()) >> command = message.getBody() >> print command >> >> def outputToOperator(msg): >> print "Outputting "+msg+" to " + operator >> xmppClient.send(xmpp.Message(operator, msg)) >> >> >> >> ------------------------------------------------------------------------------ >> Gaining the trust of online customers is vital for the success of any >> company >> that requires sensitive data to be transmitted over the Web. Learn how >> to >> best implement a security strategy that keeps consumers' information >> secure >> and instills the confidence they need to proceed with transactions. >> http://p.sf.net/sfu/oracle-sfdevnl >> _______________________________________________ >> Xmpppy-devel mailing list >> Xmp...@li... >> https://lists.sourceforge.net/lists/listinfo/xmpppy-devel >> >> > > > -- > - Norman Rasmussen > - Email: no...@ra... > - Home page: http://norman.rasmussen.co.za/ > > > ------------------------------------------------------------------------------ > Gaining the trust of online customers is vital for the success of any > company > that requires sensitive data to be transmitted over the Web. Learn how to > best implement a security strategy that keeps consumers' information secure > and instills the confidence they need to proceed with transactions. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Xmpppy-devel mailing list > Xmp...@li... > https://lists.sourceforge.net/lists/listinfo/xmpppy-devel > > |