Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit 1e22f4d

Browse files
committed
Revert "#391 Database/Element class now has correct type for localname"
This reverts commit 59cd068 Turns out this is an issue in the Manage API - when multiple values exist for a localname, the JSON representation expects an array of strings, while the XML representation expects a single string. Will file a bug with ML.
1 parent f7e7722 commit 1e22f4d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/main/java/com/marklogic/mgmt/api/database/Element.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@ public class Element {
1212
@XmlElement(name = "namespace-uri")
1313
private String namespaceUri;
1414

15-
private String localname;
15+
/**
16+
* As of ML 10.0-2, this won't work for both JSON and XML. When multiple values exist, the Manage API expects the
17+
* JSON representation to be an array of strings, while the XML representation always expects a single value.
18+
*/
19+
@XmlElementWrapper(name = "localname")
20+
private List<String> localname;
1621

1722
public String getNamespaceUri() {
1823
return namespaceUri;
@@ -22,11 +27,11 @@ public void setNamespaceUri(String namespaceUri) {
2227
this.namespaceUri = namespaceUri;
2328
}
2429

25-
public String getLocalname() {
30+
public List<String> getLocalname() {
2631
return localname;
2732
}
2833

29-
public void setLocalname(String localname) {
34+
public void setLocalname(List<String> localname) {
3035
this.localname = localname;
3136
}
3237

0 commit comments

Comments
 (0)