powered by Jive Software

How to create custom iq result

Hi,
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' />
      <myterms>
         <item>
            <name>testName</name>                       <properties>
                  <property>
                     <name>property name</name>
                     <value>558</value>
                  </property>
                  <property>
                     <name>property name 2</name>
                     <value>560</value>
                  </property>
               </properites>
         </item>
      </myterms>
</iq>

I am using Smack-3.2.2,

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

Thanks