* are only sparsely recognized by JAX-WS / JAXB.
*/
final class SugarCrmXmlHelper {
public static SelectFields createSelectFields(Column ... columns) {
final SelectFields selectFields = new SelectFields();
selectFields.setArrayType("xsd:string[]");
final Document document;
try {
document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
} catch (ParserConfigurationException e) {
throw new IllegalStateException(e);
}
final List<Object> fieldList = selectFields.getAny();
for (Column column : columns) {
final String fieldName = column.getName();
final Element elem = document.createElement("v");
elem.appendChild(document.createTextNode(fieldName));