def __init__(self, to=None, body=None, typ=None, subject=None, attrs={}, frm=None, payload=[], timestamp=None, xmlns=NS_CLIENT, node=None):
        """ Create message object. You can specify recipient, text of message, type of message
            any additional attributes, sender of the message, any additional payload (f.e. jabber:x:delay element) and namespace in one go.
            Alternatively you can pass in the other XML object as the 'node' parameted to replicate it as message. """
        Protocol.__init__(self, 'message', to=to, typ=typ, attrs=attrs, frm=frm, payload=payload, timestamp=timestamp, xmlns=xmlns, node=node)
        if body: self.setBody(body)
        if subject: self.setSubject(subject)
 Create message object. You can specify recipient, text of message, type of message
            any additional attributes, sender of the message, any additional payload (f.e. jabber:x:delay element) and namespace in one go.
            Alternatively you can pass in the other XML object as the 'node' parameted to replicate it as message. 
chrome-cordova/gcmServer/xmpp/protocol.py