5 Replies Last post: May 9, 2008 2:15 AM by Bla  
chandan   3 posts since
Apr 24, 2007
Currently Being Moderated

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

 

]]>

 

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

Sean Voisen KeyContributor 64 posts since
Mar 10, 2005
Currently Being Moderated
May 7, 2007 5:52 PM in response to: chandan
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.

Doug McCall Bronze 17 posts since
Mar 26, 2007
Currently Being Moderated
May 23, 2007 3:24 PM in response to: chandan
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.

 

 

Chase Seibert Bronze 54 posts since
May 18, 2007
Currently Being Moderated
Aug 8, 2007 1:55 PM in response to: Doug McCall
Re: Custom namespace in xiff message

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

Bla Bronze 9 posts since
Aug 20, 2007
Currently Being Moderated
May 9, 2008 2:15 AM in response to: Chase Seibert
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.

More Like This

  • Retrieving data ...