syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [4/6] syncope git commit: Initial work
Date Tue, 05 Jul 2016 09:41:21 GMT
http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnIdObjectClassTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnIdObjectClassTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnIdObjectClassTO.java
index be1b6d6..7ba6f2d 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnIdObjectClassTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnIdObjectClassTO.java
@@ -18,11 +18,8 @@
  */
 package org.apache.syncope.common.lib.to;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
 import java.util.ArrayList;
 import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.lib.AbstractBaseBean;
@@ -68,9 +65,6 @@ public class ConnIdObjectClassTO extends AbstractBaseBean {
         this.auxiliary = auxiliary;
     }
 
-    @XmlElementWrapper(name = "attributes")
-    @XmlElement(name = "attribute")
-    @JsonProperty("attributes")
     public List<String> getAttributes() {
         return attributes;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnInstanceTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnInstanceTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnInstanceTO.java
index 4f91355..d8181b9 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnInstanceTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnInstanceTO.java
@@ -19,7 +19,6 @@
 package org.apache.syncope.common.lib.to;
 
 import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
 import java.util.Collections;
 import java.util.EnumSet;
 import java.util.HashMap;
@@ -27,8 +26,6 @@ import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 import javax.ws.rs.PathParam;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.lib.AbstractBaseBean;
@@ -104,9 +101,6 @@ public class ConnInstanceTO extends AbstractBaseBean implements EntityTO {
         this.version = version;
     }
 
-    @XmlElementWrapper(name = "conf")
-    @XmlElement(name = "property")
-    @JsonProperty("conf")
     public Set<ConnConfProperty> getConf() {
         return this.conf;
     }
@@ -123,9 +117,6 @@ public class ConnInstanceTO extends AbstractBaseBean implements EntityTO {
         return Collections.unmodifiableMap(result);
     }
 
-    @XmlElementWrapper(name = "capabilities")
-    @XmlElement(name = "capability")
-    @JsonProperty("capabilities")
     public Set<ConnectorCapability> getCapabilities() {
         return capabilities;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnObjectTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnObjectTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnObjectTO.java
index 09784c8..11a443b 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnObjectTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnObjectTO.java
@@ -19,14 +19,11 @@
 package org.apache.syncope.common.lib.to;
 
 import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.LinkedHashSet;
 import java.util.Map;
 import java.util.Set;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.lib.AbstractBaseBean;
@@ -39,9 +36,6 @@ public class ConnObjectTO extends AbstractBaseBean {
 
     private final Set<AttrTO> attrs = new LinkedHashSet<>();
 
-    @XmlElementWrapper(name = "attrs")
-    @XmlElement(name = "attribute")
-    @JsonProperty("attrs")
     public Set<AttrTO> getAttrs() {
         return attrs;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/ErrorTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ErrorTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ErrorTO.java
index f643b88..b733109 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ErrorTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ErrorTO.java
@@ -18,11 +18,8 @@
  */
 package org.apache.syncope.common.lib.to;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
 import java.util.ArrayList;
 import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.lib.AbstractBaseBean;
@@ -56,9 +53,6 @@ public class ErrorTO extends AbstractBaseBean {
         this.type = type;
     }
 
-    @XmlElementWrapper(name = "elements")
-    @XmlElement(name = "element")
-    @JsonProperty("elements")
     public List<String> getElements() {
         return elements;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/EventCategoryTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/EventCategoryTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/EventCategoryTO.java
index 544e204..0b75b02 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/EventCategoryTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/EventCategoryTO.java
@@ -18,11 +18,8 @@
  */
 package org.apache.syncope.common.lib.to;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
 import java.util.ArrayList;
 import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.lib.AbstractBaseBean;
@@ -83,9 +80,6 @@ public class EventCategoryTO extends AbstractBaseBean {
         this.subcategory = subcategory;
     }
 
-    @XmlElementWrapper(name = "events")
-    @XmlElement(name = "event")
-    @JsonProperty("events")
     public List<String> getEvents() {
         return events;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/GroupTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/GroupTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/GroupTO.java
index 0ae0885..49c48ad 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/GroupTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/GroupTO.java
@@ -24,14 +24,10 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import org.apache.commons.collections4.IterableUtils;
 import org.apache.commons.collections4.Predicate;
-import org.apache.syncope.common.lib.jaxb.XmlGenericMapAdapter;
 import org.apache.syncope.common.lib.types.AnyTypeKind;
 
 @XmlRootElement(name = "group")
@@ -48,7 +44,6 @@ public class GroupTO extends AnyTO {
 
     private String udynMembershipCond;
 
-    @XmlJavaTypeAdapter(XmlGenericMapAdapter.class)
     @JsonIgnore
     private final Map<String, String> adynMembershipConds = new HashMap<>();
 
@@ -112,9 +107,6 @@ public class GroupTO extends AnyTO {
         });
     }
 
-    @XmlElementWrapper(name = "typeExtensions")
-    @XmlElement(name = "typeExtension")
-    @JsonProperty("typeExtensions")
     public List<TypeExtensionTO> getTypeExtensions() {
         return typeExtensions;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingItemTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingItemTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingItemTO.java
index c078950..07af8c3 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingItemTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingItemTO.java
@@ -18,11 +18,8 @@
  */
 package org.apache.syncope.common.lib.to;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
 import java.util.ArrayList;
 import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.lib.AbstractBaseBean;
@@ -153,9 +150,6 @@ public class MappingItemTO extends AbstractBaseBean implements EntityTO {
         this.pullJEXLTransformer = pullJEXLTransformer;
     }
 
-    @XmlElementWrapper(name = "mappingItemTransformerClassNames")
-    @XmlElement(name = "className")
-    @JsonProperty("mappingItemTransformerClassNames")
     public List<String> getMappingItemTransformerClassNames() {
         return mappingItemTransformerClassNames;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingTO.java
index a9048c7..7837b3c 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/MappingTO.java
@@ -18,11 +18,8 @@
  */
 package org.apache.syncope.common.lib.to;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
 import java.util.ArrayList;
 import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 import org.apache.commons.collections4.IterableUtils;
@@ -72,9 +69,6 @@ public class MappingTO extends AbstractBaseBean {
                 : addConnObjectKeyItem(connObjectKeyItem);
     }
 
-    @XmlElementWrapper(name = "items")
-    @XmlElement(name = "item")
-    @JsonProperty("items")
     public List<MappingItemTO> getItems() {
         return items;
     }
@@ -87,9 +81,6 @@ public class MappingTO extends AbstractBaseBean {
         return this.items.remove(item);
     }
 
-    @XmlElementWrapper(name = "linkingItems")
-    @XmlElement(name = "item")
-    @JsonProperty("linkingItems")
     public List<MappingItemTO> getLinkingItems() {
         return linkingItems;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/MembershipTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/MembershipTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/MembershipTO.java
index a970dec..04fdf2c 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/MembershipTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/MembershipTO.java
@@ -19,14 +19,11 @@
 package org.apache.syncope.common.lib.to;
 
 import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.lib.types.AnyTypeKind;
@@ -102,9 +99,6 @@ public class MembershipTO extends RelationshipTO implements AttributableTO {
         this.groupName = groupName;
     }
 
-    @XmlElementWrapper(name = "plainAttrs")
-    @XmlElement(name = "attribute")
-    @JsonProperty("plainAttrs")
     @Override
     public Set<AttrTO> getPlainAttrs() {
         return plainAttrs;
@@ -121,9 +115,6 @@ public class MembershipTO extends RelationshipTO implements AttributableTO {
         return Collections.unmodifiableMap(result);
     }
 
-    @XmlElementWrapper(name = "derAttrs")
-    @XmlElement(name = "attribute")
-    @JsonProperty("derAttrs")
     @Override
     public Set<AttrTO> getDerAttrs() {
         return derAttrs;
@@ -140,9 +131,6 @@ public class MembershipTO extends RelationshipTO implements AttributableTO {
         return Collections.unmodifiableMap(result);
     }
 
-    @XmlElementWrapper(name = "virAttrs")
-    @XmlElement(name = "attribute")
-    @JsonProperty("virAttrs")
     @Override
     public Set<AttrTO> getVirAttrs() {
         return virAttrs;

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTO.java
index 428efde..dc9a8a8 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTO.java
@@ -25,13 +25,9 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import javax.ws.rs.PathParam;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import org.apache.syncope.common.lib.AbstractBaseBean;
-import org.apache.syncope.common.lib.jaxb.XmlGenericMapAdapter;
 import org.apache.syncope.common.lib.types.TraceLevel;
 
 @XmlRootElement(name = "notification")
@@ -44,7 +40,6 @@ public class NotificationTO extends AbstractBaseBean implements EntityTO {
 
     private final List<String> events = new ArrayList<>();
 
-    @XmlJavaTypeAdapter(XmlGenericMapAdapter.class)
     @JsonIgnore
     private final Map<String, String> abouts = new HashMap<>();
 
@@ -73,16 +68,10 @@ public class NotificationTO extends AbstractBaseBean implements EntityTO {
         return abouts;
     }
 
-    @XmlElementWrapper(name = "events")
-    @XmlElement(name = "event")
-    @JsonProperty("events")
     public List<String> getEvents() {
         return events;
     }
 
-    @XmlElementWrapper(name = "staticRecipients")
-    @XmlElement(name = "staticRecipient")
-    @JsonProperty("staticRecipients")
     public List<String> getStaticRecipients() {
         return staticRecipients;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTaskTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTaskTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTaskTO.java
index ce74be2..3c381f5 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTaskTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTaskTO.java
@@ -18,11 +18,8 @@
  */
 package org.apache.syncope.common.lib.to;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
 import java.util.HashSet;
 import java.util.Set;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.lib.types.AnyTypeKind;
@@ -78,9 +75,6 @@ public class NotificationTaskTO extends AbstractTaskTO {
         this.anyKey = anyKey;
     }
 
-    @XmlElementWrapper(name = "recipients")
-    @XmlElement(name = "recipient")
-    @JsonProperty("recipients")
     public Set<String> getRecipients() {
         return recipients;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/PagedConnObjectTOResult.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/PagedConnObjectTOResult.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PagedConnObjectTOResult.java
index 33e4c5d..57a7663 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/PagedConnObjectTOResult.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PagedConnObjectTOResult.java
@@ -18,12 +18,9 @@
  */
 package org.apache.syncope.common.lib.to;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
 import java.net.URI;
 import java.util.ArrayList;
 import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.lib.AbstractBaseBean;
@@ -110,9 +107,6 @@ public class PagedConnObjectTOResult extends AbstractBaseBean {
         this.allResultsReturned = allResultsReturned;
     }
 
-    @XmlElementWrapper(name = "result")
-    @XmlElement(name = "item")
-    @JsonProperty("result")
     public List<ConnObjectTO> getResult() {
         return result;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/PagedResult.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/PagedResult.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PagedResult.java
index b17db6d..2d00f39 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/PagedResult.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PagedResult.java
@@ -18,13 +18,10 @@
  */
 package org.apache.syncope.common.lib.to;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.annotation.JsonTypeInfo;
 import java.net.URI;
 import java.util.ArrayList;
 import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.lib.AbstractBaseBean;
@@ -63,9 +60,6 @@ public class PagedResult<T extends AbstractBaseBean> extends AbstractBaseBean {
         this.next = next;
     }
 
-    @XmlElementWrapper(name = "result")
-    @XmlElement(name = "item")
-    @JsonProperty("result")
     @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
     public List<T> getResult() {
         return result;

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/ProvisionTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ProvisionTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ProvisionTO.java
index b7dae9c..d042669 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ProvisionTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ProvisionTO.java
@@ -18,11 +18,8 @@
  */
 package org.apache.syncope.common.lib.to;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
 import java.util.ArrayList;
 import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.lib.AbstractBaseBean;
@@ -73,9 +70,6 @@ public class ProvisionTO extends AbstractBaseBean implements EntityTO {
         this.objectClass = objectClass;
     }
 
-    @XmlElementWrapper(name = "auxClasses")
-    @XmlElement(name = "class")
-    @JsonProperty("auxClasses")
     public List<String> getAuxClasses() {
         return auxClasses;
     }
@@ -96,9 +90,6 @@ public class ProvisionTO extends AbstractBaseBean implements EntityTO {
         this.mapping = mapping;
     }
 
-    @XmlElementWrapper(name = "virSchemas")
-    @XmlElement(name = "virSchema")
-    @JsonProperty("virSchemas")
     public List<String> getVirSchemas() {
         return virSchemas;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/ProvisioningResult.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ProvisioningResult.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ProvisioningResult.java
index 3fe4790..f04ce91 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ProvisioningResult.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ProvisioningResult.java
@@ -23,14 +23,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.annotation.JsonTypeInfo;
 import java.util.ArrayList;
 import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import org.apache.syncope.common.lib.AbstractBaseBean;
-import org.apache.syncope.common.lib.jaxb.XmlEntityTOAdapter;
 
 @XmlRootElement(name = "provisioningResult")
 @XmlType
@@ -38,13 +33,11 @@ public class ProvisioningResult<E extends EntityTO> extends AbstractBaseBean {
 
     private static final long serialVersionUID = 351317476398082746L;
 
-    @XmlJavaTypeAdapter(XmlEntityTOAdapter.class)
     @JsonIgnore
     private E entity;
 
     private final List<PropagationStatus> propagationStatuses = new ArrayList<>();
 
-    @XmlTransient
     @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
     @JsonProperty
     public E getEntity() {
@@ -55,9 +48,6 @@ public class ProvisioningResult<E extends EntityTO> extends AbstractBaseBean {
         this.entity = any;
     }
 
-    @XmlElementWrapper(name = "propagationStatuses")
-    @XmlElement(name = "propagationStatus")
-    @JsonProperty("propagationStatuses")
     public List<PropagationStatus> getPropagationStatuses() {
         return propagationStatuses;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/PullTaskTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/PullTaskTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PullTaskTO.java
index 9aaccf2..8d3d49f 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/PullTaskTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PullTaskTO.java
@@ -26,8 +26,6 @@ import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import org.apache.syncope.common.lib.jaxb.XmlGenericMapAdapter;
 import org.apache.syncope.common.lib.types.PullMode;
 
 @XmlRootElement(name = "pullTask")
@@ -43,7 +41,6 @@ public class PullTaskTO extends AbstractProvisioningTaskTO implements Templatabl
 
     private String destinationRealm;
 
-    @XmlJavaTypeAdapter(XmlGenericMapAdapter.class)
     @JsonIgnore
     private final Map<String, AnyTO> templates = new HashMap<>();
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/PushTaskTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/PushTaskTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PushTaskTO.java
index dd3347a..76d5732 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/PushTaskTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PushTaskTO.java
@@ -26,8 +26,6 @@ import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import org.apache.syncope.common.lib.jaxb.XmlGenericMapAdapter;
 
 @XmlRootElement(name = "pushTask")
 @XmlType
@@ -36,7 +34,6 @@ public class PushTaskTO extends AbstractProvisioningTaskTO {
 
     private static final long serialVersionUID = -2143537546915809018L;
 
-    @XmlJavaTypeAdapter(XmlGenericMapAdapter.class)
     @JsonIgnore
     private final Map<String, String> filters = new HashMap<>();
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/RealmTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/RealmTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/RealmTO.java
index db770e7..949bfa7 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/RealmTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/RealmTO.java
@@ -25,13 +25,9 @@ import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 import javax.ws.rs.PathParam;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import org.apache.syncope.common.lib.AbstractBaseBean;
-import org.apache.syncope.common.lib.jaxb.XmlGenericMapAdapter;
 
 @XmlRootElement(name = "realm")
 @XmlType
@@ -53,7 +49,6 @@ public class RealmTO extends AbstractBaseBean implements EntityTO, TemplatableTO
 
     private final Set<String> actionsClassNames = new HashSet<>();
 
-    @XmlJavaTypeAdapter(XmlGenericMapAdapter.class)
     @JsonIgnore
     private final Map<String, AnyTO> templates = new HashMap<>();
 
@@ -110,9 +105,6 @@ public class RealmTO extends AbstractBaseBean implements EntityTO, TemplatableTO
         this.passwordPolicy = passwordPolicy;
     }
 
-    @XmlElementWrapper(name = "actionsClassNames")
-    @XmlElement(name = "actionsClassName")
-    @JsonProperty("actionsClassNames")
     public Set<String> getActionsClassNames() {
         return actionsClassNames;
     }
@@ -123,9 +115,6 @@ public class RealmTO extends AbstractBaseBean implements EntityTO, TemplatableTO
         return templates;
     }
 
-    @XmlElementWrapper(name = "resources")
-    @XmlElement(name = "resource")
-    @JsonProperty("resources")
     public Set<String> getResources() {
         return resources;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportTO.java
index 73b16f7..7f4f1a2 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportTO.java
@@ -18,13 +18,10 @@
  */
 package org.apache.syncope.common.lib.to;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 import javax.ws.rs.PathParam;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.lib.report.AbstractReportletConf;
@@ -74,9 +71,6 @@ public class ReportTO extends AbstractStartEndBean implements EntityTO {
         this.name = name;
     }
 
-    @XmlElementWrapper(name = "reportletConfs")
-    @XmlElement(name = "reportletConf")
-    @JsonProperty("reportletConfs")
     public List<AbstractReportletConf> getReportletConfs() {
         return reportletConfs;
     }
@@ -89,9 +83,6 @@ public class ReportTO extends AbstractStartEndBean implements EntityTO {
         this.cronExpression = cronExpression;
     }
 
-    @XmlElementWrapper(name = "executions")
-    @XmlElement(name = "execution")
-    @JsonProperty("executions")
     public List<ExecTO> getExecutions() {
         return executions;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/ResourceTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ResourceTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ResourceTO.java
index 9ea0029..b485b4f 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ResourceTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ResourceTO.java
@@ -19,15 +19,12 @@
 package org.apache.syncope.common.lib.to;
 
 import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
 import java.util.ArrayList;
 import java.util.EnumSet;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 import javax.ws.rs.PathParam;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 import org.apache.commons.collections4.IterableUtils;
@@ -197,9 +194,6 @@ public class ResourceTO extends AbstractBaseBean implements EntityTO {
         });
     }
 
-    @XmlElementWrapper(name = "provisions")
-    @XmlElement(name = "provision")
-    @JsonProperty("provisions")
     public List<ProvisionTO> getProvisions() {
         return provisions;
     }
@@ -212,9 +206,6 @@ public class ResourceTO extends AbstractBaseBean implements EntityTO {
         this.orgUnit = orgUnit;
     }
 
-    @XmlElementWrapper(name = "confOverride")
-    @XmlElement(name = "property")
-    @JsonProperty("confOverride")
     public Set<ConnConfProperty> getConfOverride() {
         return confOverride;
     }
@@ -227,9 +218,6 @@ public class ResourceTO extends AbstractBaseBean implements EntityTO {
         this.overrideCapabilities = overrideCapabilities;
     }
 
-    @XmlElementWrapper(name = "capabilitiesOverride")
-    @XmlElement(name = "capability")
-    @JsonProperty("capabilitiesOverride")
     public Set<ConnectorCapability> getCapabilitiesOverride() {
         return capabilitiesOverride;
     }
@@ -242,9 +230,6 @@ public class ResourceTO extends AbstractBaseBean implements EntityTO {
         this.provisioningTraceLevel = provisioningTraceLevel;
     }
 
-    @XmlElementWrapper(name = "propagationActionsClassNames")
-    @XmlElement(name = "propagationActionsClassName")
-    @JsonProperty("propagationActionsClassNames")
     public List<String> getPropagationActionsClassNames() {
         return propagationActionsClassNames;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/RoleTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/RoleTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/RoleTO.java
index cbb8784..33c4bc9 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/RoleTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/RoleTO.java
@@ -18,14 +18,11 @@
  */
 package org.apache.syncope.common.lib.to;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 import javax.ws.rs.PathParam;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.lib.AbstractBaseBean;
@@ -55,16 +52,10 @@ public class RoleTO extends AbstractBaseBean implements EntityTO {
         this.key = key;
     }
 
-    @XmlElementWrapper(name = "entitlements")
-    @XmlElement(name = "entitlement")
-    @JsonProperty("entitlements")
     public Set<String> getEntitlements() {
         return entitlements;
     }
 
-    @XmlElementWrapper(name = "realms")
-    @XmlElement(name = "realm")
-    @JsonProperty("realms")
     public List<String> getRealms() {
         return realms;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/TypeExtensionTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/TypeExtensionTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/TypeExtensionTO.java
index f8dea41..aa2b256 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/TypeExtensionTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/TypeExtensionTO.java
@@ -18,11 +18,8 @@
  */
 package org.apache.syncope.common.lib.to;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
 import java.util.ArrayList;
 import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.lib.AbstractBaseBean;
@@ -45,9 +42,6 @@ public class TypeExtensionTO extends AbstractBaseBean {
         this.anyType = anyType;
     }
 
-    @XmlElementWrapper(name = "auxClasses")
-    @XmlElement(name = "class")
-    @JsonProperty("auxClasses")
     public List<String> getAuxClasses() {
         return auxClasses;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/UserTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/UserTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/UserTO.java
index 4ec8181..8908c2d 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/UserTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/UserTO.java
@@ -19,7 +19,6 @@
 package org.apache.syncope.common.lib.to;
 
 import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
 import java.lang.reflect.Field;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -27,8 +26,6 @@ import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
@@ -90,16 +87,10 @@ public class UserTO extends AnyTO implements GroupableRelatableTO {
         this.password = password;
     }
 
-    @XmlElementWrapper(name = "roles")
-    @XmlElement(name = "role")
-    @JsonProperty("roles")
     public List<String> getRoles() {
         return roles;
     }
 
-    @XmlElementWrapper(name = "dynRoles")
-    @XmlElement(name = "role")
-    @JsonProperty("dynRoles")
     public List<String> getDynRoles() {
         return dynRoles;
     }
@@ -180,9 +171,6 @@ public class UserTO extends AnyTO implements GroupableRelatableTO {
         this.mustChangePassword = mustChangePassword;
     }
 
-    @XmlElementWrapper(name = "relationships")
-    @XmlElement(name = "relationship")
-    @JsonProperty("relationships")
     @Override
     public List<RelationshipTO> getRelationships() {
         return relationships;
@@ -198,9 +186,6 @@ public class UserTO extends AnyTO implements GroupableRelatableTO {
         return Collections.unmodifiableMap(result);
     }
 
-    @XmlElementWrapper(name = "memberships")
-    @XmlElement(name = "membership")
-    @JsonProperty("memberships")
     @Override
     public List<MembershipTO> getMemberships() {
         return memberships;
@@ -218,9 +203,6 @@ public class UserTO extends AnyTO implements GroupableRelatableTO {
         return result;
     }
 
-    @XmlElementWrapper(name = "dynGroups")
-    @XmlElement(name = "role")
-    @JsonProperty("dynGroups")
     @Override
     public List<String> getDynGroups() {
         return dynGroups;

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/WorkflowFormPropertyTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/WorkflowFormPropertyTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/WorkflowFormPropertyTO.java
index 9fa5928..b80aba1 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/WorkflowFormPropertyTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/WorkflowFormPropertyTO.java
@@ -24,9 +24,7 @@ import java.util.HashMap;
 import java.util.Map;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import org.apache.syncope.common.lib.AbstractBaseBean;
-import org.apache.syncope.common.lib.jaxb.XmlGenericMapAdapter;
 import org.apache.syncope.common.lib.types.WorkflowFormPropertyType;
 
 @XmlRootElement(name = "workflowFormProperty")
@@ -51,7 +49,6 @@ public class WorkflowFormPropertyTO extends AbstractBaseBean {
 
     private String datePattern;
 
-    @XmlJavaTypeAdapter(XmlGenericMapAdapter.class)
     @JsonIgnore
     private final Map<String, String> enumValues = new HashMap<>();
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/WorkflowFormTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/WorkflowFormTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/WorkflowFormTO.java
index e6027f1..ed6967d 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/WorkflowFormTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/WorkflowFormTO.java
@@ -19,15 +19,12 @@
 package org.apache.syncope.common.lib.to;
 
 import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.lib.AbstractBaseBean;
@@ -100,9 +97,6 @@ public class WorkflowFormTO extends AbstractBaseBean {
         this.owner = owner;
     }
 
-    @XmlElementWrapper(name = "workflowFormProperties")
-    @XmlElement(name = "workflowFormProperty")
-    @JsonProperty("workflowFormProperties")
     public List<WorkflowFormPropertyTO> getProperties() {
         return properties;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/to/package-info.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/package-info.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/package-info.java
index b02ed8f..3b83c64 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/package-info.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/package-info.java
@@ -16,8 +16,11 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
+@XmlSchema(namespace = SyncopeConstants.NAMESPACE,
+        xmlns = { @XmlNs(prefix = SyncopeConstants.NAMESPACE_PREFIX, namespaceURI = SyncopeConstants.NAMESPACE) }
+)
 package org.apache.syncope.common.lib.to;
 
+import javax.xml.bind.annotation.XmlNs;
 import javax.xml.bind.annotation.XmlSchema;
 import org.apache.syncope.common.lib.SyncopeConstants;

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConnConfPropSchema.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConnConfPropSchema.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConnConfPropSchema.java
index 8b0dbe6..d7e154e 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConnConfPropSchema.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConnConfPropSchema.java
@@ -18,11 +18,8 @@
  */
 package org.apache.syncope.common.lib.types;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
 import java.util.ArrayList;
 import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.lib.AbstractBaseBean;
@@ -105,9 +102,6 @@ public class ConnConfPropSchema extends AbstractBaseBean implements Comparable<C
         this.confidential = confidential;
     }
 
-    @XmlElementWrapper(name = "defaultValues")
-    @XmlElement(name = "defaultValue")
-    @JsonProperty("defaultValues")
     public List<Object> getDefaultValues() {
         return defaultValues;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConnConfProperty.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConnConfProperty.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConnConfProperty.java
index f4d321b..f116d95 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConnConfProperty.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ConnConfProperty.java
@@ -18,11 +18,8 @@
  */
 package org.apache.syncope.common.lib.types;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
 import java.util.ArrayList;
 import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 import org.apache.commons.lang3.ObjectUtils;
@@ -48,9 +45,6 @@ public class ConnConfProperty extends AbstractBaseBean implements Comparable<Con
         this.schema = schema;
     }
 
-    @XmlElementWrapper(name = "values")
-    @XmlElement(name = "value")
-    @JsonProperty("values")
     public List<Object> getValues() {
         return values;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/main/java/org/apache/syncope/common/lib/types/package-info.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/package-info.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/package-info.java
index 80cb87f..36ad508 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/types/package-info.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/package-info.java
@@ -16,8 +16,11 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
+@XmlSchema(namespace = SyncopeConstants.NAMESPACE,
+        xmlns = { @XmlNs(prefix = SyncopeConstants.NAMESPACE_PREFIX, namespaceURI = SyncopeConstants.NAMESPACE) }
+)
 package org.apache.syncope.common.lib.types;
 
+import javax.xml.bind.annotation.XmlNs;
 import javax.xml.bind.annotation.XmlSchema;
 import org.apache.syncope.common.lib.SyncopeConstants;

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/test/java/org/apache/syncope/common/lib/AbstractTest.java
----------------------------------------------------------------------
diff --git a/common/lib/src/test/java/org/apache/syncope/common/lib/AbstractTest.java b/common/lib/src/test/java/org/apache/syncope/common/lib/AbstractTest.java
new file mode 100644
index 0000000..1f6d94f
--- /dev/null
+++ b/common/lib/src/test/java/org/apache/syncope/common/lib/AbstractTest.java
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.util.UUID;
+import org.apache.syncope.common.lib.patch.PasswordPatch;
+import org.apache.syncope.common.lib.patch.StringPatchItem;
+import org.apache.syncope.common.lib.patch.StringReplacePatchItem;
+import org.apache.syncope.common.lib.patch.UserPatch;
+import org.apache.syncope.common.lib.report.UserReportletConf;
+import org.apache.syncope.common.lib.to.AttrTO;
+import org.apache.syncope.common.lib.to.ConnObjectTO;
+import org.apache.syncope.common.lib.to.GroupTO;
+import org.apache.syncope.common.lib.to.PropagationStatus;
+import org.apache.syncope.common.lib.to.ProvisioningResult;
+import org.apache.syncope.common.lib.to.ReportTO;
+import org.apache.syncope.common.lib.to.WorkflowFormPropertyTO;
+import org.apache.syncope.common.lib.types.PatchOperation;
+import org.junit.Test;
+
+public abstract class AbstractTest {
+
+    protected abstract ObjectMapper getObjectMapper();
+
+    protected void map() throws IOException {
+        WorkflowFormPropertyTO prop = new WorkflowFormPropertyTO();
+        prop.getEnumValues().put("key1", "value1");
+        prop.getEnumValues().put("key2", "value2");
+
+        ObjectMapper mapper = getObjectMapper();
+
+        StringWriter writer = new StringWriter();
+        mapper.writeValue(writer, prop);
+
+        WorkflowFormPropertyTO unserializedProp = mapper.readValue(writer.toString(), WorkflowFormPropertyTO.class);
+        assertEquals(prop, unserializedProp);
+    }
+
+    @Test
+    public void reportletConfImplementations() throws IOException {
+        ReportTO report = new ReportTO();
+        report.setName("testReportForCreate");
+        report.getReportletConfs().add(new UserReportletConf("first"));
+        report.getReportletConfs().add(new UserReportletConf("second"));
+
+        ObjectMapper mapper = getObjectMapper();
+
+        StringWriter writer = new StringWriter();
+        mapper.writeValue(writer, report);
+
+        ReportTO actual = mapper.readValue(writer.toString(), ReportTO.class);
+        assertEquals(report, actual);
+    }
+
+    @Test
+    public void patch() throws IOException {
+        UserPatch patch = new UserPatch();
+        patch.setKey(UUID.randomUUID().toString());
+        patch.setUsername(new StringReplacePatchItem.Builder().value("newusername").build());
+        assertNotNull(patch.getUsername().getValue());
+        patch.setPassword(new PasswordPatch.Builder().
+                onSyncope(false).
+                resource("ext1").resource("ext2").
+                value("newpassword").
+                build());
+        assertNotNull(patch.getPassword().getValue());
+        patch.getRoles().add(new StringPatchItem.Builder().operation(PatchOperation.DELETE).value("role").build());
+
+        ObjectMapper mapper = getObjectMapper();
+
+        StringWriter writer = new StringWriter();
+        mapper.writeValue(writer, patch);
+
+        UserPatch actual = mapper.readValue(writer.toString(), UserPatch.class);
+        assertEquals(patch, actual);
+    }
+
+    @Test
+    public void provisioningResult() throws IOException {
+        GroupTO group = new GroupTO();
+        group.setName(UUID.randomUUID().toString());
+        group.setRealm(SyncopeConstants.ROOT_REALM);
+        group.getVirAttrs().add(new AttrTO.Builder().schema("rvirtualdata").value("rvirtualvalue").build());
+        group.getADynMembershipConds().put("USER", "username==a*");
+
+        ProvisioningResult<GroupTO> original = new ProvisioningResult<>();
+        original.setEntity(group);
+
+        PropagationStatus status = new PropagationStatus();
+        status.setFailureReason("failed");
+        ConnObjectTO before = new ConnObjectTO();
+        before.getAttrs().add(new AttrTO.Builder().schema("key").value("value").build());
+        status.setBeforeObj(before);
+        original.getPropagationStatuses().add(status);
+
+        ObjectMapper mapper = getObjectMapper();
+
+        StringWriter writer = new StringWriter();
+        mapper.writeValue(writer, original);
+
+        ProvisioningResult<GroupTO> actual = mapper.readValue(
+                writer.toString(), new TypeReference<ProvisioningResult<GroupTO>>() {
+        });
+        assertEquals(original, actual);
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/test/java/org/apache/syncope/common/lib/JAXBTest.java
----------------------------------------------------------------------
diff --git a/common/lib/src/test/java/org/apache/syncope/common/lib/JAXBTest.java b/common/lib/src/test/java/org/apache/syncope/common/lib/JAXBTest.java
deleted file mode 100644
index a14b878..0000000
--- a/common/lib/src/test/java/org/apache/syncope/common/lib/JAXBTest.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.common.lib;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.util.UUID;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-import org.apache.commons.lang3.exception.ExceptionUtils;
-import org.apache.syncope.common.lib.patch.UserPatch;
-import org.apache.syncope.common.lib.report.UserReportletConf;
-import org.apache.syncope.common.lib.to.AttrTO;
-import org.apache.syncope.common.lib.to.ConnObjectTO;
-import org.apache.syncope.common.lib.to.GroupTO;
-import org.apache.syncope.common.lib.to.PropagationStatus;
-import org.apache.syncope.common.lib.to.ProvisioningResult;
-import org.apache.syncope.common.lib.to.UserTO;
-import org.junit.Test;
-
-public class JAXBTest {
-
-    @Test
-    public void marshal() {
-        try {
-            JAXBContext context = JAXBContext.newInstance(UserTO.class, UserPatch.class, UserReportletConf.class);
-            Marshaller marshaller = context.createMarshaller();
-            marshaller.marshal(new UserTO(), new StringWriter());
-            marshaller.marshal(new UserPatch(), new StringWriter());
-        } catch (Exception e) {
-            fail(ExceptionUtils.getStackTrace(e));
-        }
-    }
-
-    @Test
-    public void provisioningResult() throws JAXBException {
-        JAXBContext context = JAXBContext.newInstance(ProvisioningResult.class);
-        Marshaller marshaller = context.createMarshaller();
-        Unmarshaller unmarshaller = context.createUnmarshaller();
-
-        GroupTO group = new GroupTO();
-        group.setName(UUID.randomUUID().toString());
-        group.setRealm(SyncopeConstants.ROOT_REALM);
-        group.getVirAttrs().add(new AttrTO.Builder().schema("rvirtualdata").value("rvirtualvalue").build());
-        group.getADynMembershipConds().put("USER", "username==a*");
-
-        ProvisioningResult<GroupTO> original = new ProvisioningResult<>();
-        original.setEntity(group);
-
-        PropagationStatus status = new PropagationStatus();
-        status.setFailureReason("failed");
-        status.setBeforeObj(new ConnObjectTO());
-        original.getPropagationStatuses().add(status);
-        
-        StringWriter writer = new StringWriter();
-        marshaller.marshal(original, writer);
-
-        Object actual = unmarshaller.unmarshal(new StringReader(writer.toString()));
-        assertEquals(original, actual);
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/test/java/org/apache/syncope/common/lib/JSONTest.java
----------------------------------------------------------------------
diff --git a/common/lib/src/test/java/org/apache/syncope/common/lib/JSONTest.java b/common/lib/src/test/java/org/apache/syncope/common/lib/JSONTest.java
index 9c5c777..1dc0f09 100644
--- a/common/lib/src/test/java/org/apache/syncope/common/lib/JSONTest.java
+++ b/common/lib/src/test/java/org/apache/syncope/common/lib/JSONTest.java
@@ -18,109 +18,12 @@
  */
 package org.apache.syncope.common.lib;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.util.UUID;
-import org.apache.syncope.common.lib.patch.PasswordPatch;
-import org.apache.syncope.common.lib.patch.StringPatchItem;
-import org.apache.syncope.common.lib.patch.StringReplacePatchItem;
-import org.apache.syncope.common.lib.patch.UserPatch;
-import org.apache.syncope.common.lib.report.UserReportletConf;
-import org.apache.syncope.common.lib.to.AttrTO;
-import org.apache.syncope.common.lib.to.ConnObjectTO;
-import org.apache.syncope.common.lib.to.GroupTO;
-import org.apache.syncope.common.lib.to.PropagationStatus;
-import org.apache.syncope.common.lib.to.ProvisioningResult;
-import org.apache.syncope.common.lib.to.ReportTO;
-import org.apache.syncope.common.lib.to.WorkflowFormPropertyTO;
-import org.apache.syncope.common.lib.types.PatchOperation;
-import org.junit.Test;
-
-public class JSONTest {
-
-    @Test
-    public void map() throws IOException {
-        WorkflowFormPropertyTO prop = new WorkflowFormPropertyTO();
-        prop.getEnumValues().put("key1", "value1");
-        prop.getEnumValues().put("key2", "value2");
-
-        ObjectMapper mapper = new ObjectMapper();
-
-        StringWriter writer = new StringWriter();
-        mapper.writeValue(writer, prop);
-
-        WorkflowFormPropertyTO unserializedProp = mapper.readValue(writer.toString(), WorkflowFormPropertyTO.class);
-        assertEquals(prop, unserializedProp);
-    }
-
-    @Test
-    public void reportletConfImplementations() throws IOException {
-        ReportTO report = new ReportTO();
-        report.setName("testReportForCreate");
-        report.getReportletConfs().add(new UserReportletConf("first"));
-        report.getReportletConfs().add(new UserReportletConf("second"));
-
-        ObjectMapper mapper = new ObjectMapper();
-
-        StringWriter writer = new StringWriter();
-        mapper.writeValue(writer, report);
-
-        ReportTO actual = mapper.readValue(writer.toString(), ReportTO.class);
-        assertEquals(report, actual);
-    }
-
-    @Test
-    public void patch() throws IOException {
-        UserPatch patch = new UserPatch();
-        patch.setKey(UUID.randomUUID().toString());
-        patch.setUsername(new StringReplacePatchItem.Builder().value("newusername").build());
-        assertNotNull(patch.getUsername().getValue());
-        patch.setPassword(new PasswordPatch.Builder().
-                onSyncope(false).
-                resource("ext1").resource("ext2").
-                value("newpassword").
-                build());
-        assertNotNull(patch.getPassword().getValue());
-        patch.getRoles().add(new StringPatchItem.Builder().operation(PatchOperation.DELETE).value("role").build());
-
-        ObjectMapper mapper = new ObjectMapper();
-
-        StringWriter writer = new StringWriter();
-        mapper.writeValue(writer, patch);
-
-        UserPatch actual = mapper.readValue(writer.toString(), UserPatch.class);
-        assertEquals(patch, actual);
-    }
-
-    @Test
-    public void provisioningResult() throws IOException {
-        GroupTO group = new GroupTO();
-        group.setName(UUID.randomUUID().toString());
-        group.setRealm(SyncopeConstants.ROOT_REALM);
-        group.getVirAttrs().add(new AttrTO.Builder().schema("rvirtualdata").value("rvirtualvalue").build());
-        group.getADynMembershipConds().put("USER", "username==a*");
-
-        ProvisioningResult<GroupTO> original = new ProvisioningResult<>();
-        original.setEntity(group);
-
-        PropagationStatus status = new PropagationStatus();
-        status.setFailureReason("failed");
-        status.setBeforeObj(new ConnObjectTO());
-        original.getPropagationStatuses().add(status);
-
-        ObjectMapper mapper = new ObjectMapper();
 
-        StringWriter writer = new StringWriter();
-        mapper.writeValue(writer, original);
+public class JSONTest extends AbstractTest {
 
-        ProvisioningResult<GroupTO> actual = mapper.readValue(
-                writer.toString(), new TypeReference<ProvisioningResult<GroupTO>>() {
-        });
-        assertEquals(original, actual);
+    @Override
+    protected ObjectMapper getObjectMapper() {
+        return new ObjectMapper();
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/common/lib/src/test/java/org/apache/syncope/common/lib/XMLTest.java
----------------------------------------------------------------------
diff --git a/common/lib/src/test/java/org/apache/syncope/common/lib/XMLTest.java b/common/lib/src/test/java/org/apache/syncope/common/lib/XMLTest.java
new file mode 100644
index 0000000..bf148c9
--- /dev/null
+++ b/common/lib/src/test/java/org/apache/syncope/common/lib/XMLTest.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.dataformat.xml.XmlMapper;
+
+public class XMLTest extends AbstractTest {
+
+    @Override
+    protected ObjectMapper getObjectMapper() {
+        XmlMapper mapper = new XmlMapper();
+        mapper.configure(SerializationFeature.WRITE_EMPTY_JSON_ARRAYS, false);
+        return mapper;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/core/rest-cxf/pom.xml
----------------------------------------------------------------------
diff --git a/core/rest-cxf/pom.xml b/core/rest-cxf/pom.xml
index cb4da8a..b6e4430 100644
--- a/core/rest-cxf/pom.xml
+++ b/core/rest-cxf/pom.xml
@@ -79,6 +79,10 @@ under the License.
       <artifactId>jackson-jaxrs-json-provider</artifactId>
     </dependency>
     <dependency>
+      <groupId>com.fasterxml.jackson.jaxrs</groupId>
+      <artifactId>jackson-jaxrs-xml-provider</artifactId>
+    </dependency>
+    <dependency>
       <groupId>com.fasterxml.jackson.module</groupId>
       <artifactId>jackson-module-afterburner</artifactId>
     </dependency>

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/core/rest-cxf/src/main/resources/restCXFContext.xml
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/resources/restCXFContext.xml b/core/rest-cxf/src/main/resources/restCXFContext.xml
index f7714a1..c8ea537 100644
--- a/core/rest-cxf/src/main/resources/restCXFContext.xml
+++ b/core/rest-cxf/src/main/resources/restCXFContext.xml
@@ -36,35 +36,12 @@ under the License.
 
   <context:component-scan base-package="org.apache.syncope.core.rest.cxf.service"/>  
 
-  <bean id="jaxbProvider" class="org.apache.cxf.jaxrs.provider.JAXBElementProvider">
-    <property name="namespacePrefixes">
-      <map>
-        <entry key="http://syncope.apache.org/2.0">
-          <value>syncope</value>
-        </entry>
-      </map>      
-    </property>
-    <property name="depthProperties">
-      <bean id="depthProperties" class="org.apache.cxf.staxutils.DocumentDepthProperties">
-        <property name="innerElementCountThreshold" value="500"/>
-      </bean>
-    </property>
-    <property name="collectionWrapperMap">
-      <map>
-        <entry>
-          <key>
-            <value>org.apache.syncope.common.lib.policy.AbstractPolicyTO</value>
-          </key>
-          <value>policies</value>
-        </entry>
-      </map>
-    </property>
-  </bean>
-
   <bean id="dateParamConverterProvider" class="org.apache.syncope.common.rest.api.DateParamConverterProvider"/>
 
+  <bean id="xmlProvider" class="com.fasterxml.jackson.jaxrs.xml.JacksonXMLProvider"/>
+
   <bean id="jacksonObjectMapper" class="org.apache.syncope.core.rest.cxf.UnwrappedObjectMapper"/>
-  <bean id="jsonProvider" class="com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider">
+  <bean id="jsonProvider" class="com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider">
     <property name="mapper" ref="jacksonObjectMapper"/>
   </bean>
 
@@ -130,7 +107,7 @@ under the License.
     </jaxrs:outInterceptors>
     <jaxrs:providers>
       <ref bean="dateParamConverterProvider"/>
-      <ref bean="jaxbProvider"/>
+      <ref bean="xmlProvider"/>
       <ref bean="jsonProvider"/>
       <ref bean="exceptionMapper"/>
       <ref bean="searchContextProvider"/>

http://git-wip-us.apache.org/repos/asf/syncope/blob/920476b8/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 84cfb94..28fbd43 100644
--- a/pom.xml
+++ b/pom.xml
@@ -518,11 +518,6 @@ under the License.
       </dependency>
       <dependency>
         <groupId>org.apache.cxf</groupId>
-        <artifactId>cxf-rt-databinding-jaxb</artifactId>
-        <version>${cxf.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.cxf</groupId>
         <artifactId>cxf-rt-rs-client</artifactId>
         <version>${cxf.version}</version>
       </dependency>
@@ -658,6 +653,11 @@ under the License.
         <version>${jackson.version}</version>
       </dependency>
       <dependency>
+        <groupId>com.fasterxml.jackson.jaxrs</groupId>
+        <artifactId>jackson-jaxrs-xml-provider</artifactId>
+        <version>${jackson.version}</version>
+      </dependency>
+      <dependency>
         <groupId>com.fasterxml.jackson.module</groupId>
         <artifactId>jackson-module-afterburner</artifactId>
         <version>${jackson.version}</version>


Mime
View raw message