diff --git a/src/main/java/com/marklogic/mgmt/api/database/Element.java b/src/main/java/com/marklogic/mgmt/api/database/Element.java index 56adff36..5d6af88e 100644 --- a/src/main/java/com/marklogic/mgmt/api/database/Element.java +++ b/src/main/java/com/marklogic/mgmt/api/database/Element.java @@ -12,7 +12,12 @@ public class Element { @XmlElement(name = "namespace-uri") private String namespaceUri; - private String localname; + /** + * As of ML 10.0-2, this won't work for both JSON and XML. When multiple values exist, the Manage API expects the + * JSON representation to be an array of strings, while the XML representation always expects a single value. + */ + @XmlElementWrapper(name = "localname") + private List localname; public String getNamespaceUri() { return namespaceUri; @@ -22,11 +27,11 @@ public void setNamespaceUri(String namespaceUri) { this.namespaceUri = namespaceUri; } - public String getLocalname() { + public List getLocalname() { return localname; } - public void setLocalname(String localname) { + public void setLocalname(List localname) { this.localname = localname; }