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

Commit

Permalink
Revert "#391 Database/Element class now has correct type for localname"
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rjrudin committed Dec 29, 2019
1 parent f7e7722 commit 1e22f4d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/main/java/com/marklogic/mgmt/api/database/Element.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> localname;

public String getNamespaceUri() {
return namespaceUri;
Expand All @@ -22,11 +27,11 @@ public void setNamespaceUri(String namespaceUri) {
this.namespaceUri = namespaceUri;
}

public String getLocalname() {
public List<String> getLocalname() {
return localname;
}

public void setLocalname(String localname) {
public void setLocalname(List<String> localname) {
this.localname = localname;
}

Expand Down

0 comments on commit 1e22f4d

Please sign in to comment.