List<Entry> attributes = new ArrayList<Entry>();
attributes.add(new Name("foo"));
attributes.add(new OperationalStringEntry("bar"));
if(versions!=null) {
for(String version : versions)
attributes.add(new VersionEntry(version));
}
return new ServiceItem(sid, new Object(), attributes.toArray(new Entry[attributes.size()]));
}