Receive AdHocCommandData not totally right, how to handle this?
I sent adhoc command to get user roaster using smack API, here is the returning msg in debug window.
<iq id="0xNP8-4" to="admin@zhengkai.domain/iqtest" from="sess-man@zhengkai.domain" type="result">
<command xmlns="http://jabber.org/protocol/commands" node="http://jabber.org/protocol/admin#get-user-roster" status="completed">
<actions/>
<x xmlns="jabber:x:data" type="result">
<item/>
<field label="The Jabber ID for which to retrieve roster" var="accountjid" type="jid-single">
<value>admin@zhengkai.domain</value>
</field>
</x>
</command>
</iq>
however, I checked the "RAW RECEIVED PACKETS", the packet actually received is :
<iq type="result" from="sess-man@zhengkai.domain" id="0xNP8-4" to="admin@zhengkai.domain/iqtest">
<command node="http://jabber.org/protocol/admin#get-user-roster" status="completed" xmlns="http://jabber.org/protocol/commands">
<x type="result" xmlns="jabber:x:data">
<field type="jid-single" var="accountjid" label="The Jabber ID for which to retrieve roster"><value>admin@zhengkai.domain</value></field> <query xmlns="jabber:iq:roster"><item subscription="none" name="test01" jid="test01@zhengkai.domain"/></query>
</x>
</command>
</iq>
you see, what I want to get, is in the <query/> part, but this part is cut off by the API?
My original xmpp messages as below:
1> request to get admin's roaster list
<iq id="0xNP8-4" to="sess-man@zhengkai.domain" type="set">
<command xmlns="http://jabber.org/protocol/commands" node="http://jabber.org/protocol/admin#get-user-roster"/>
</iq>
2> receive the reply of server
<iq id="0xNP8-4" to="admin@zhengkai.domain/iqtest" from="sess-man@zhengkai.domain" type="result">
<command xmlns="http://jabber.org/protocol/commands" node="http://jabber.org/protocol/admin#get-user-roster" status="executing">
<actions execute="complete">
<complete/>
</actions>
<x xmlns="jabber:x:data" type="form">
<title>Getting a User's Roster</title>
<instructions>Fill out this form to get a user's roster.</instructions>
<field var="FORM_TYPE" type="hidden">
<value>http://jabber.org/protocol/admin</value>
</field>
<field label="The Jabber ID for which to retrieve roster" var="accountjid" type="jid-single">
<value/>
</field>
</x>
</command>
</iq>
3> submit the form to server
<iq id="0xNP8-4" to="sess-man@zhengkai.domain" type="set">
<command xmlns="http://jabber.org/protocol/commands" node="http://jabber.org/protocol/admin#get-user-roster">
<x xmlns="jabber:x:data" type="submit">
<field var="FORM_TYPE" type="hidden">
<value>http://jabber.org/protocol/admin</value>
</field>
<field var="accountjid" type="jid-single">
<value>admin@zhengkai.domain</value>
</field>
</x>
</command>
</iq>
4>result, that's in the begining of the question.
I currently use the method addPacketListener to listen IQ messages.
Is there a way to receive the xml directly in the api?
Or how to get the original return of server but not the cut off one.