How to use Smack IQProvider to send a list to another client?

Hi, all.

for example, I want to send the folowwing message:

<iq id=‘003’ type=‘result’ from=‘’ to=‘’> <query xmlns=‘grid:iq:bundle_list’>
<list name=‘bundles’>
</list> </query>

so how to define the IQProvider?

It seems that Smack can’t recognize the nest object, and here is the parser code found in
public static Object parseWithIntrospection(String elementName,
Class objectClass, XmlPullParser parser) throws Exception {
boolean done = false;
Object object = objectClass.newInstance();
while (!done) {
int eventType =;
if (eventType == XmlPullParser.START_TAG) {
String name = parser.getName();
String stringValue = parser.nextText();
PropertyDescriptor descriptor = new PropertyDescriptor(name,
// Load the class type of the property.
Class propertyType = descriptor.getPropertyType();
// Get the value of the property by converting it from a
// String to the correct object type.
Object value = decode(propertyType, stringValue);
// Set the value of the bean.
descriptor.getWriteMethod().invoke(object, value);
} else if (eventType == XmlPullParser.END_TAG) {
if (parser.getName().equals(elementName)) {
done = true;
return object; }

Will anybody tell me how to resolve the problem?