Custom namespace in xiff message

Hi,

I want to add my own name space to the message I want to send to xmpp

like

I have seen the two threads on it, but both of them are not working in as3 version…

http://www.igniterealtime.org/forum/message.jspa?messageID=102152#102152

http://www.igniterealtime.org/forum/message.jspa?messageID=101502#101502

Can any one help me, Urgently…I am very badly stuck in this,

Thanks

What exactly is not working? If your extension class extends Extension and implements the IExtension interface, it should work fine. The easiest example to follow might be the XHTMLExtension class.

Actually the XHTMLExtension class is probably a bad example to follow, as it is not even a valid extension. There 4 things that need changed in this class to allow it to be used as an extension:

  1. Must implement ISerializable

  2. Change the namespace to “http://jabber.org/protocol/xhtml-im” (I was only testing this with a GAIM client, so this might not be necessary)

  3. Support a default parameter-less constructor: public function XHTMLExtension(parent:XMLNode=null)

  4. Implement a serialize and deserialize method

chandan - You should take a look at the RegisterExtension under org.jivesoftware.xiff.data.register. I used this as the starting point to implementing several extensions successfully.

Thanks a lot .

I did the same thing,its now working…

So, you’'re saying that the xhtml extension is not working currently in XIFF?

Could you guys post an example of such a custom extension and how to use it? It would really be appreciated.