powered by Jive Software

How to create custom iq result

I am creating a small university project, and need some help with it.
What I am doing is, I am sending an < iq /> stanza with xmlns “test:mytest” and in response I want to get the follwoing response.

<iq xmlns='jabber:client' id='df33f' type='result' from='user@server1' to='user@server2'>
   <query xmlns='test:mytest' />
            <name>testName</name>                       <properties>
                     <name>property name</name>
                     <name>property name 2</name>

I am using Smack-3.2.2,

Can anyone please help me, how can I set that response?