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=‘osgi_server@grid_server.org’ to=‘osgi_client@grid_server.org’> <query xmlns=‘grid:iq:bundle_list’>
<list name=‘bundles’>
<bundle><url>http://www.myserver.org/bundles/bundle_1.jar
<bundle><url>http://www.myserver.org/bundles/bundle_2.jar
</list> </query>
</iq>

so how to define the IQProvider?

It seems that Smack can’t recognize the nest object, and here is the parser code found in PacketParserUtils.java:

##PacketParserUtils.java:
public static Object parseWithIntrospection(String elementName,
Class objectClass, XmlPullParser parser) throws Exception {
boolean done = false;
Object object = objectClass.newInstance();
while (!done) {
int eventType = parser.next();
if (eventType == XmlPullParser.START_TAG) {
String name = parser.getName();
String stringValue = parser.nextText();
PropertyDescriptor descriptor = new PropertyDescriptor(name,
objectClass);
// 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?

Thanks.