5 Replies Last post: May 9, 2008 2:15 AM by Tr0n  
Click to view chandan1's profile   3 posts since
Apr 24, 2007

May 4, 2007 6:04 AM

Custom namespace in xiff message

Hi,

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

like

<x xmlns="jabber:x:chandan" type =''question'' status =''queue'' ><composing/><id></id></x>

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
Click to view svoisen's profile Bronze 64 posts since
Mar 10, 2005
May 7, 2007 5:52 PM in response to: chandan1
Re: Custom namespace in xiff message
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.
Click to view dhm116's profile Bronze 17 posts since
Mar 26, 2007
May 23, 2007 3:24 PM in response to: chandan1
Re: Custom namespace in xiff message
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.
Click to view cseibert's profile Bronze 54 posts since
May 18, 2007
Aug 8, 2007 1:55 PM in response to: dhm116
Re: Custom namespace in xiff message
So, you''re saying that the xhtml extension is not working currently in XIFF?
Click to view Tr0n's profile Bronze 9 posts since
Aug 20, 2007
May 9, 2008 2:15 AM in response to: cseibert
Re: Custom namespace in xiff message
Could you guys post an example of such a custom extension and how to use it? It would really be appreciated. :)