You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2016/07/05 09:53:42 UTC

[5/5] syncope git commit: Removing JAXB in favor of jackson-dataformat-xml: currently the only missing part is XSD in WADL

Removing JAXB in favor of jackson-dataformat-xml: currently the only missing part is XSD in WADL


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/f283ebc0
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/f283ebc0
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/f283ebc0

Branch: refs/heads/2_0_NO_JAXB
Commit: f283ebc0c0b0c6ebac01d5a79ce550eb22db5da5
Parents: e74a10a
Author: Francesco Chicchiricc� <il...@apache.org>
Authored: Fri Jul 1 17:19:47 2016 +0200
Committer: Francesco Chicchiricc� <il...@apache.org>
Committed: Tue Jul 5 11:53:16 2016 +0200

----------------------------------------------------------------------
 .../commands/user/UserSyncopeOperations.java    |   2 +-
 .../client/console/rest/ReportRestClient.java   |   4 +-
 .../client/console/rest/UserRestClient.java     |  11 +-
 .../data/table/BulkActionResultColumn.java      |   9 +-
 client/lib/pom.xml                              |   8 +-
 .../client/lib/SyncopeClientFactoryBean.java    |  61 +++-----
 common/lib/pom.xml                              |  23 ++-
 .../syncope/common/lib/AbstractBaseBean.java    |   9 --
 .../syncope/common/lib/SyncopeConstants.java    |   2 -
 .../syncope/common/lib/info/NumbersInfo.java    |  29 ----
 .../syncope/common/lib/info/PlatformInfo.java   |  55 -------
 .../syncope/common/lib/info/SystemInfo.java     |  12 --
 .../syncope/common/lib/info/package-info.java   |  23 ---
 .../lib/jackson/UnwrappedObjectMapper.java      |  93 ++++++++++++
 .../common/lib/jackson/UnwrappedXmlMapper.java  |  94 ++++++++++++
 .../syncope/common/lib/jaxb/EntityTOType.java   |  63 --------
 .../common/lib/jaxb/GenericMapEntryType.java    |  56 --------
 .../syncope/common/lib/jaxb/GenericMapType.java |  46 ------
 .../common/lib/jaxb/XmlEntityTOAdapter.java     |  66 ---------
 .../common/lib/jaxb/XmlGenericMapAdapter.java   |  49 -------
 .../syncope/common/lib/jaxb/package-info.java   |  23 ---
 .../apache/syncope/common/lib/package-info.java |  22 ---
 .../syncope/common/lib/patch/AbstractPatch.java |   4 -
 .../common/lib/patch/AbstractPatchItem.java     |   5 -
 .../lib/patch/AbstractReplacePatchItem.java     |   4 -
 .../common/lib/patch/AnyObjectPatch.java        |  13 --
 .../syncope/common/lib/patch/AnyPatch.java      |  17 ---
 .../common/lib/patch/AssociationPatch.java      |   4 -
 .../syncope/common/lib/patch/AttrPatch.java     |   4 -
 .../lib/patch/BooleanReplacePatchItem.java      |   5 -
 .../common/lib/patch/DeassociationPatch.java    |  10 --
 .../syncope/common/lib/patch/GroupPatch.java    |  12 --
 .../syncope/common/lib/patch/LongPatchItem.java |   5 -
 .../common/lib/patch/MembershipPatch.java       |  13 --
 .../syncope/common/lib/patch/PasswordPatch.java |  12 --
 .../common/lib/patch/RelationshipPatch.java     |   4 -
 .../lib/patch/ResourceDeassociationPatch.java   |  10 --
 .../syncope/common/lib/patch/StatusPatch.java   |   4 -
 .../common/lib/patch/StringPatchItem.java       |   5 -
 .../lib/patch/StringReplacePatchItem.java       |   7 -
 .../syncope/common/lib/patch/UserPatch.java     |  16 ---
 .../syncope/common/lib/patch/package-info.java  |  23 ---
 .../lib/policy/AbstractAccountRuleConf.java     |   4 -
 .../lib/policy/AbstractPasswordRuleConf.java    |   4 -
 .../common/lib/policy/AbstractPolicyTO.java     |  15 --
 .../common/lib/policy/AccountPolicyTO.java      |  13 --
 .../lib/policy/DefaultAccountRuleConf.java      |  19 ---
 .../lib/policy/DefaultPasswordRuleConf.java     |  19 ---
 .../common/lib/policy/PasswordPolicyTO.java     |  10 --
 .../common/lib/policy/PullPolicySpec.java       |   5 -
 .../syncope/common/lib/policy/PullPolicyTO.java |   5 -
 .../common/lib/policy/PushPolicySpec.java       |   2 -
 .../syncope/common/lib/policy/package-info.java |  23 ---
 .../lib/report/AbstractAnyReportletConf.java    |   3 -
 .../lib/report/AbstractReportletConf.java       |   6 -
 .../common/lib/report/AuditReportletConf.java   |   5 -
 .../common/lib/report/GroupReportletConf.java   |  22 ---
 .../lib/report/ReconciliationReportletConf.java |  14 --
 .../common/lib/report/StaticReportletConf.java  |  10 --
 .../common/lib/report/UserReportletConf.java    |  22 ---
 .../syncope/common/lib/report/package-info.java |  23 ---
 .../syncope/common/lib/search/package-info.java |  23 ---
 .../common/lib/to/AbstractAnnotatedBean.java    |   2 -
 .../lib/to/AbstractProvisioningTaskTO.java      |  12 --
 .../syncope/common/lib/to/AbstractSchemaTO.java |   6 -
 .../common/lib/to/AbstractStartEndBean.java     |   2 -
 .../syncope/common/lib/to/AbstractTaskTO.java   |  13 --
 .../syncope/common/lib/to/AnyObjectTO.java      |  16 ---
 .../org/apache/syncope/common/lib/to/AnyTO.java |  22 ---
 .../syncope/common/lib/to/AnyTypeClassTO.java   |  19 ---
 .../apache/syncope/common/lib/to/AnyTypeTO.java |  10 --
 .../apache/syncope/common/lib/to/AttrTO.java    |  10 --
 .../syncope/common/lib/to/BulkAction.java       |  13 --
 .../syncope/common/lib/to/BulkActionResult.java |  62 ++++----
 .../syncope/common/lib/to/ConnBundleTO.java     |  10 --
 .../common/lib/to/ConnIdObjectClassTO.java      |  10 --
 .../syncope/common/lib/to/ConnInstanceTO.java   |  13 --
 .../syncope/common/lib/to/ConnObjectTO.java     |  10 --
 .../syncope/common/lib/to/ConnPoolConfTO.java   |   4 -
 .../syncope/common/lib/to/DerSchemaTO.java      |   5 -
 .../apache/syncope/common/lib/to/DomainTO.java  |   4 -
 .../apache/syncope/common/lib/to/ErrorTO.java   |  10 --
 .../syncope/common/lib/to/EventCategoryTO.java  |  10 --
 .../apache/syncope/common/lib/to/ExecTO.java    |   4 -
 .../apache/syncope/common/lib/to/GroupTO.java   |  15 --
 .../org/apache/syncope/common/lib/to/JobTO.java |   4 -
 .../apache/syncope/common/lib/to/LoggerTO.java  |   4 -
 .../syncope/common/lib/to/MailTemplateTO.java   |   4 -
 .../syncope/common/lib/to/MappingItemTO.java    |  10 --
 .../apache/syncope/common/lib/to/MappingTO.java |  13 --
 .../syncope/common/lib/to/MembershipTO.java     |  16 ---
 .../syncope/common/lib/to/NotificationTO.java   |  15 --
 .../common/lib/to/NotificationTaskTO.java       |  10 --
 .../apache/syncope/common/lib/to/OrgUnitTO.java |   4 -
 .../common/lib/to/PagedConnObjectTOResult.java  |  10 --
 .../syncope/common/lib/to/PagedResult.java      |  10 --
 .../syncope/common/lib/to/PlainSchemaTO.java    |   5 -
 .../common/lib/to/PropagationStatus.java        |   4 -
 .../common/lib/to/PropagationTaskTO.java        |   4 -
 .../syncope/common/lib/to/ProvisionTO.java      |  13 --
 .../common/lib/to/ProvisioningResult.java       |  14 --
 .../syncope/common/lib/to/PullTaskTO.java       |  14 --
 .../syncope/common/lib/to/PushTaskTO.java       |  14 --
 .../apache/syncope/common/lib/to/RealmTO.java   |  15 --
 .../syncope/common/lib/to/RelationshipTO.java   |   4 -
 .../common/lib/to/RelationshipTypeTO.java       |   4 -
 .../apache/syncope/common/lib/to/ReportTO.java  |  13 --
 .../syncope/common/lib/to/ReportTemplateTO.java |   4 -
 .../syncope/common/lib/to/ResourceTO.java       |  19 ---
 .../apache/syncope/common/lib/to/RoleTO.java    |  13 --
 .../syncope/common/lib/to/SchedTaskTO.java      |   7 -
 .../common/lib/to/SecurityQuestionTO.java       |   4 -
 .../syncope/common/lib/to/TypeExtensionTO.java  |  10 --
 .../apache/syncope/common/lib/to/UserTO.java    |  22 ---
 .../syncope/common/lib/to/VirSchemaTO.java      |   3 -
 .../common/lib/to/WorkflowFormPropertyTO.java   |  11 --
 .../syncope/common/lib/to/WorkflowFormTO.java   |  10 --
 .../syncope/common/lib/to/package-info.java     |  23 ---
 .../syncope/common/lib/types/AnyTypeKind.java   |   2 -
 .../common/lib/types/AttrSchemaType.java        |   2 -
 .../syncope/common/lib/types/AuditElements.java |   3 -
 .../common/lib/types/BulkMembersActionType.java |   3 -
 .../common/lib/types/CipherAlgorithm.java       |   3 -
 .../lib/types/ConflictResolutionAction.java     |   4 +-
 .../common/lib/types/ConnConfPropSchema.java    |  10 --
 .../common/lib/types/ConnConfProperty.java      |  10 --
 .../common/lib/types/ConnectorCapability.java   |   3 -
 .../common/lib/types/EntityViolationType.java   |   3 -
 .../syncope/common/lib/types/JobAction.java     |   3 -
 .../syncope/common/lib/types/JobType.java       |   3 -
 .../syncope/common/lib/types/LoggerLevel.java   |   2 -
 .../syncope/common/lib/types/LoggerType.java    |   2 -
 .../common/lib/types/MailTemplateFormat.java    |   2 -
 .../syncope/common/lib/types/MatchingRule.java  |   5 +-
 .../common/lib/types/PatchOperation.java        |   3 -
 .../syncope/common/lib/types/PolicyType.java    |   3 -
 .../lib/types/PropagationTaskExecStatus.java    |   3 -
 .../syncope/common/lib/types/PullMode.java      |   3 -
 .../lib/types/ReportExecExportFormat.java       |   3 -
 .../common/lib/types/ReportExecStatus.java      |   3 -
 .../common/lib/types/ReportTemplateFormat.java  |   3 -
 .../lib/types/ResourceAssociationAction.java    |   3 -
 .../lib/types/ResourceDeassociationAction.java  |   3 -
 .../common/lib/types/ResourceOperation.java     |   3 -
 .../syncope/common/lib/types/SchemaType.java    |   2 -
 .../common/lib/types/StatusPatchType.java       |   3 -
 .../syncope/common/lib/types/TaskType.java      |   3 -
 .../syncope/common/lib/types/TraceLevel.java    |   3 -
 .../common/lib/types/UnmatchingRule.java        |   3 -
 .../lib/types/WorkflowFormPropertyType.java     |   3 -
 .../syncope/common/lib/types/WorkflowTasks.java |   2 -
 .../syncope/common/lib/types/package-info.java  |  23 ---
 .../apache/syncope/common/lib/AbstractTest.java | 144 +++++++++++++++++++
 .../org/apache/syncope/common/lib/JAXBTest.java |  82 -----------
 .../org/apache/syncope/common/lib/JSONTest.java | 106 +-------------
 .../org/apache/syncope/common/lib/XMLTest.java  |  31 ++++
 .../apache/syncope/core/logic/ReportLogic.java  |   4 +-
 .../apache/syncope/core/logic/TaskLogic.java    |   4 +-
 core/rest-cxf/pom.xml                           |   8 +-
 .../core/rest/cxf/JacksonXMLProvider.java       |  33 +++++
 .../core/rest/cxf/UnwrappedObjectMapper.java    |  93 ------------
 .../rest/cxf/service/AbstractAnyService.java    |  24 ++--
 .../rest/cxf/service/ConnectorServiceImpl.java  |   4 +-
 .../rest/cxf/service/ResourceServiceImpl.java   |   8 +-
 .../core/rest/cxf/service/TaskServiceImpl.java  |  12 +-
 .../src/main/resources/restCXFContext.xml       |  39 ++---
 .../syncope/common/lib/to/CamelMetrics.java     |  12 --
 .../syncope/common/lib/to/CamelRouteTO.java     |   4 -
 .../src/main/resources/jboss/restCXFContext.xml |  41 ++----
 .../apache/syncope/fit/core/ReportITCase.java   |   4 +-
 .../org/apache/syncope/fit/core/UserITCase.java |  29 ++--
 pom.xml                                         |  10 +-
 172 files changed, 563 insertions(+), 2057 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserSyncopeOperations.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserSyncopeOperations.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserSyncopeOperations.java
index cc9101b..f1c2aad 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserSyncopeOperations.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserSyncopeOperations.java
@@ -89,6 +89,6 @@ public class UserSyncopeOperations {
             bulkAction.getTargets().add(String.valueOf(user.getKey()));
         }
         final BulkActionResult bulkResult = userService.bulk(bulkAction).readEntity(BulkActionResult.class);
-        return bulkResult.getResults();
+        return bulkResult.getResultMap();
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/client/console/src/main/java/org/apache/syncope/client/console/rest/ReportRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/ReportRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/ReportRestClient.java
index c51df2c..b0a58ec 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/ReportRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/ReportRestClient.java
@@ -144,13 +144,13 @@ public class ReportRestClient extends BaseRestClient
             case DELETE:
                 for (String target : action.getTargets()) {
                     delete(target);
-                    result.getResults().put(target, BulkActionResult.Status.SUCCESS);
+                    result.add(target, BulkActionResult.Status.SUCCESS);
                 }
                 break;
             case EXECUTE:
                 for (String target : action.getTargets()) {
                     startExecution(target, new Date());
-                    result.getResults().put(target, BulkActionResult.Status.SUCCESS);
+                    result.add(target, BulkActionResult.Status.SUCCESS);
                 }
                 break;
             default:

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/client/console/src/main/java/org/apache/syncope/client/console/rest/UserRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/UserRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/UserRestClient.java
index 68e3a01..835a278 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/UserRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/UserRestClient.java
@@ -19,7 +19,6 @@
 package org.apache.syncope.client.console.rest;
 
 import java.util.List;
-import java.util.Map;
 import javax.ws.rs.core.GenericType;
 import javax.ws.rs.core.Response;
 import org.apache.commons.lang3.StringUtils;
@@ -89,7 +88,6 @@ public class UserRestClient extends AbstractAnyRestClient<UserTO, UserPatch> {
         BulkActionResult result;
         synchronized (this) {
             result = new BulkActionResult();
-            Map<String, BulkActionResult.Status> res = result.getResults();
             UserService service = getService(etag, UserService.class);
 
             @SuppressWarnings("unchecked")
@@ -97,14 +95,14 @@ public class UserRestClient extends AbstractAnyRestClient<UserTO, UserPatch> {
                     readEntity(ProvisioningResult.class);
 
             if (statusPatch.isOnSyncope()) {
-                res.put(StringUtils.capitalize(Constants.SYNCOPE),
+                result.add(StringUtils.capitalize(Constants.SYNCOPE),
                         "suspended".equalsIgnoreCase(provisions.getEntity().getStatus())
                         ? BulkActionResult.Status.SUCCESS
                         : BulkActionResult.Status.FAILURE);
             }
 
             for (PropagationStatus status : provisions.getPropagationStatuses()) {
-                res.put(status.getResource(), BulkActionResult.Status.valueOf(status.getStatus().name()));
+                result.add(status.getResource(), BulkActionResult.Status.valueOf(status.getStatus().name()));
             }
             resetClient(UserService.class);
         }
@@ -119,7 +117,6 @@ public class UserRestClient extends AbstractAnyRestClient<UserTO, UserPatch> {
         BulkActionResult result;
         synchronized (this) {
             result = new BulkActionResult();
-            Map<String, BulkActionResult.Status> res = result.getResults();
             UserService service = getService(etag, UserService.class);
 
             @SuppressWarnings("unchecked")
@@ -127,14 +124,14 @@ public class UserRestClient extends AbstractAnyRestClient<UserTO, UserPatch> {
                     readEntity(ProvisioningResult.class);
 
             if (statusPatch.isOnSyncope()) {
-                res.put(StringUtils.capitalize(Constants.SYNCOPE),
+                result.add(StringUtils.capitalize(Constants.SYNCOPE),
                         "active".equalsIgnoreCase(provisions.getEntity().getStatus())
                         ? BulkActionResult.Status.SUCCESS
                         : BulkActionResult.Status.FAILURE);
             }
 
             for (PropagationStatus status : provisions.getPropagationStatuses()) {
-                res.put(status.getResource(), BulkActionResult.Status.valueOf(status.getStatus().name()));
+                result.add(status.getResource(), BulkActionResult.Status.valueOf(status.getStatus().name()));
             }
             resetClient(UserService.class);
         }

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/BulkActionResultColumn.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/BulkActionResultColumn.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/BulkActionResultColumn.java
index 73abd09..0587cdf 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/BulkActionResultColumn.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/BulkActionResultColumn.java
@@ -19,6 +19,7 @@
 package org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table;
 
 import java.lang.reflect.InvocationTargetException;
+import java.util.Map;
 import org.apache.syncope.common.lib.to.BulkActionResult;
 import org.apache.syncope.common.lib.to.BulkActionResult.Status;
 import org.apache.wicket.Component;
@@ -65,14 +66,14 @@ public class BulkActionResultColumn<T, S> extends AbstractColumn<T, S> {
     @Override
     public void populateItem(final Item<ICellPopulator<T>> item, final String componentId, final IModel<T> rowModel) {
         try {
-            final Object id = BeanUtils.getPropertyDescriptor(rowModel.getObject().getClass(), keyFieldName).
+            Object id = BeanUtils.getPropertyDescriptor(rowModel.getObject().getClass(), keyFieldName).
                     getReadMethod().invoke(rowModel.getObject(), new Object[0]);
-            final Status status = results.getResults().containsKey(id.toString())
-                    ? results.getResults().get(id.toString())
+            Map<String, Status> bulkResultMap = results.getResultMap();
+            Status status = bulkResultMap.containsKey(id.toString())
+                    ? bulkResultMap.get(id.toString())
                     : Status.NOT_ATTEMPTED;
 
             item.add(new Label(componentId, new StringResourceModel(status.name(), item, new Model<>(status.name()))));
-
         } catch (BeansException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
             LOG.error("Errore retrieving target id value", e);
         }

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/client/lib/pom.xml
----------------------------------------------------------------------
diff --git a/client/lib/pom.xml b/client/lib/pom.xml
index 134497e..f03a2bf 100644
--- a/client/lib/pom.xml
+++ b/client/lib/pom.xml
@@ -47,10 +47,6 @@ under the License.
       <groupId>org.apache.cxf</groupId>
       <artifactId>cxf-rt-rs-client</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.apache.cxf</groupId>
-      <artifactId>cxf-rt-databinding-jaxb</artifactId>
-    </dependency>
     
     <dependency>
       <groupId>com.fasterxml.jackson.datatype</groupId>
@@ -60,6 +56,10 @@ under the License.
       <groupId>com.fasterxml.jackson.jaxrs</groupId>
       <artifactId>jackson-jaxrs-json-provider</artifactId>
     </dependency>  
+    <dependency>
+      <groupId>com.fasterxml.jackson.jaxrs</groupId>
+      <artifactId>jackson-jaxrs-xml-provider</artifactId>
+    </dependency>
     
     <dependency>
       <groupId>commons-codec</groupId>

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClientFactoryBean.java
----------------------------------------------------------------------
diff --git a/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClientFactoryBean.java b/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClientFactoryBean.java
index 6ea7b4f..7412c45 100644
--- a/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClientFactoryBean.java
+++ b/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClientFactoryBean.java
@@ -18,22 +18,17 @@
  */
 package org.apache.syncope.client.lib;
 
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.datatype.joda.JodaModule;
-import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
+import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
+import com.fasterxml.jackson.jaxrs.xml.JacksonXMLProvider;
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 import javax.ws.rs.core.MediaType;
-import javax.xml.bind.Marshaller;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.cxf.feature.Feature;
 import org.apache.cxf.feature.LoggingFeature;
-import org.apache.cxf.jaxrs.provider.JAXBElementProvider;
-import org.apache.cxf.staxutils.DocumentDepthProperties;
-import org.apache.syncope.common.lib.policy.AbstractPolicyTO;
+import org.apache.syncope.common.lib.jackson.UnwrappedObjectMapper;
+import org.apache.syncope.common.lib.jackson.UnwrappedXmlMapper;
 import org.apache.syncope.common.rest.api.DateParamConverterProvider;
 import org.apache.syncope.common.rest.api.RESTHeaders;
 
@@ -65,9 +60,9 @@ public class SyncopeClientFactoryBean {
         }
     }
 
-    private JacksonJaxbJsonProvider jsonProvider;
+    private JacksonJsonProvider jsonProvider;
 
-    private JAXBElementProvider<?> jaxbProvider;
+    private JacksonXMLProvider xmlProvider;
 
     private RestClientExceptionMapper exceptionMapper;
 
@@ -81,30 +76,12 @@ public class SyncopeClientFactoryBean {
 
     private RestClientFactoryBean restClientFactoryBean;
 
-    protected JacksonJaxbJsonProvider defaultJsonProvider() {
-        ObjectMapper objectMapper = new ObjectMapper();
-        objectMapper.registerModule(new JodaModule());
-        objectMapper.configure(com.fasterxml.jackson.databind.SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
-        return new JacksonJaxbJsonProvider(objectMapper, JacksonJaxbJsonProvider.DEFAULT_ANNOTATIONS);
+    protected JacksonJsonProvider defaultJsonProvider() {
+        return new JacksonJsonProvider(new UnwrappedObjectMapper(), JacksonJsonProvider.BASIC_ANNOTATIONS);
     }
 
-    @SuppressWarnings({ "rawtypes" })
-    protected JAXBElementProvider<?> defaultJAXBProvider() {
-        JAXBElementProvider<?> defaultJAXBProvider = new JAXBElementProvider();
-
-        DocumentDepthProperties depthProperties = new DocumentDepthProperties();
-        depthProperties.setInnerElementCountThreshold(500);
-        defaultJAXBProvider.setDepthProperties(depthProperties);
-
-        Map<String, Object> marshallerProperties = new HashMap<>();
-        marshallerProperties.put(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
-        defaultJAXBProvider.setMarshallerProperties(marshallerProperties);
-
-        Map<String, String> collectionWrapperMap = new HashMap<>();
-        collectionWrapperMap.put(AbstractPolicyTO.class.getName(), "policies");
-        defaultJAXBProvider.setCollectionWrapperMap(collectionWrapperMap);
-
-        return defaultJAXBProvider;
+    protected JacksonXMLProvider defaultXMLProvider() {
+        return new JacksonXMLProvider(new UnwrappedXmlMapper(), JacksonXMLProvider.BASIC_ANNOTATIONS);
     }
 
     protected RestClientExceptionMapper defaultExceptionMapper() {
@@ -132,7 +109,7 @@ public class SyncopeClientFactoryBean {
 
         List<Object> providers = new ArrayList<>(4);
         providers.add(new DateParamConverterProvider());
-        providers.add(getJaxbProvider());
+        providers.add(getXMLProvider());
         providers.add(getJsonProvider());
         providers.add(getExceptionMapper());
         defaultRestClientFactoryBean.setProviders(providers);
@@ -140,24 +117,24 @@ public class SyncopeClientFactoryBean {
         return defaultRestClientFactoryBean;
     }
 
-    public JacksonJaxbJsonProvider getJsonProvider() {
+    public JacksonJsonProvider getJsonProvider() {
         return jsonProvider == null
                 ? defaultJsonProvider()
                 : jsonProvider;
     }
 
-    public void setJsonProvider(final JacksonJaxbJsonProvider jsonProvider) {
+    public void setJsonProvider(final JacksonJsonProvider jsonProvider) {
         this.jsonProvider = jsonProvider;
     }
 
-    public JAXBElementProvider<?> getJaxbProvider() {
-        return jaxbProvider == null
-                ? defaultJAXBProvider()
-                : jaxbProvider;
+    public JacksonXMLProvider getXMLProvider() {
+        return xmlProvider == null
+                ? defaultXMLProvider()
+                : xmlProvider;
     }
 
-    public SyncopeClientFactoryBean setJaxbProvider(final JAXBElementProvider<?> jaxbProvider) {
-        this.jaxbProvider = jaxbProvider;
+    public SyncopeClientFactoryBean setXMLProvider(final JacksonXMLProvider xmlProvider) {
+        this.xmlProvider = xmlProvider;
         return this;
     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/pom.xml
----------------------------------------------------------------------
diff --git a/common/lib/pom.xml b/common/lib/pom.xml
index 7f6106d..05e5e7d 100644
--- a/common/lib/pom.xml
+++ b/common/lib/pom.xml
@@ -50,9 +50,18 @@ under the License.
 
     <dependency>
       <groupId>com.fasterxml.jackson.core</groupId>
-      <artifactId>jackson-annotations</artifactId>
+      <artifactId>jackson-databind</artifactId>
     </dependency>
-    
+    <dependency>
+      <groupId>com.fasterxml.jackson.dataformat</groupId>
+      <artifactId>jackson-dataformat-xml</artifactId>      
+    </dependency>
+
+    <dependency>
+      <groupId>com.fasterxml.jackson.datatype</groupId>
+      <artifactId>jackson-datatype-joda</artifactId>
+    </dependency>    
+
     <dependency>
       <groupId>org.apache.commons</groupId>
       <artifactId>commons-lang3</artifactId>
@@ -72,16 +81,6 @@ under the License.
     </dependency>
     
     <dependency>
-      <groupId>com.fasterxml.jackson.core</groupId>
-      <artifactId>jackson-databind</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.cxf</groupId>
-      <artifactId>cxf-rt-databinding-jaxb</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <scope>test</scope>

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/AbstractBaseBean.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/AbstractBaseBean.java b/common/lib/src/main/java/org/apache/syncope/common/lib/AbstractBaseBean.java
index bd8b06e..01bc093 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/AbstractBaseBean.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/AbstractBaseBean.java
@@ -19,20 +19,11 @@
 package org.apache.syncope.common.lib;
 
 import java.io.Serializable;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.bind.annotation.XmlType;
 import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.apache.commons.lang3.builder.HashCodeBuilder;
 import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
-import org.apache.syncope.common.lib.to.AbstractTaskTO;
-import org.apache.syncope.common.lib.to.ReportTO;
-import org.apache.syncope.common.lib.to.GroupTO;
-import org.apache.syncope.common.lib.to.UserTO;
 
-@XmlType
-// Reporting here only classes used via PagedResult
-@XmlSeeAlso({ AbstractTaskTO.class, ReportTO.class, GroupTO.class, UserTO.class })
 public abstract class AbstractBaseBean implements Serializable {
 
     private static final long serialVersionUID = 3119542005279892164L;

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeConstants.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeConstants.java b/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeConstants.java
index 1f2febd..5bc7b49 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeConstants.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeConstants.java
@@ -25,8 +25,6 @@ import java.util.regex.Pattern;
 
 public final class SyncopeConstants {
 
-    public static final String NAMESPACE = "http://syncope.apache.org/2.0";
-
     public static final String MASTER_DOMAIN = "Master";
 
     public static final String ROOT_REALM = "/";

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/info/NumbersInfo.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/info/NumbersInfo.java b/common/lib/src/main/java/org/apache/syncope/common/lib/info/NumbersInfo.java
index 293bb55..96db65b 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/info/NumbersInfo.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/info/NumbersInfo.java
@@ -18,25 +18,14 @@
  */
 package org.apache.syncope.common.lib.info;
 
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
 import java.util.HashMap;
 import java.util.Map;
-import javax.xml.bind.annotation.XmlEnum;
-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 = "numbersInfo")
-@XmlType
 public class NumbersInfo extends AbstractBaseBean {
 
     private static final long serialVersionUID = 7691187370598649583L;
 
-    @XmlEnum
-    @XmlType(name = "confItem")
     public enum ConfItem {
 
         RESOURCE(20),
@@ -63,42 +52,30 @@ public class NumbersInfo extends AbstractBaseBean {
 
     private int totalUsers;
 
-    @XmlJavaTypeAdapter(XmlGenericMapAdapter.class)
-    @JsonIgnore
     private final Map<String, Integer> usersByRealm = new HashMap<>();
 
-    @XmlJavaTypeAdapter(XmlGenericMapAdapter.class)
-    @JsonIgnore
     private final Map<String, Integer> usersByStatus = new HashMap<>();
 
     private int totalGroups;
 
-    @XmlJavaTypeAdapter(XmlGenericMapAdapter.class)
-    @JsonIgnore
     private final Map<String, Integer> groupsByRealm = new HashMap<>();
 
     private String anyType1;
 
     private Integer totalAny1;
 
-    @XmlJavaTypeAdapter(XmlGenericMapAdapter.class)
-    @JsonIgnore
     private final Map<String, Integer> any1ByRealm = new HashMap<>();
 
     private String anyType2;
 
     private Integer totalAny2;
 
-    @XmlJavaTypeAdapter(XmlGenericMapAdapter.class)
-    @JsonIgnore
     private final Map<String, Integer> any2ByRealm = new HashMap<>();
 
     private int totalResources;
 
     private int totalRoles;
 
-    @XmlJavaTypeAdapter(XmlGenericMapAdapter.class)
-    @JsonIgnore
     private final Map<ConfItem, Boolean> confCompleteness = new HashMap<>();
 
     public int getTotalUsers() {
@@ -165,32 +142,26 @@ public class NumbersInfo extends AbstractBaseBean {
         this.totalRoles = totalRoles;
     }
 
-    @JsonProperty
     public Map<String, Integer> getUsersByRealm() {
         return usersByRealm;
     }
 
-    @JsonProperty
     public Map<String, Integer> getUsersByStatus() {
         return usersByStatus;
     }
 
-    @JsonProperty
     public Map<String, Integer> getGroupsByRealm() {
         return groupsByRealm;
     }
 
-    @JsonProperty
     public Map<String, Integer> getAny1ByRealm() {
         return any1ByRealm;
     }
 
-    @JsonProperty
     public Map<String, Integer> getAny2ByRealm() {
         return any2ByRealm;
     }
 
-    @JsonProperty
     public Map<ConfItem, Boolean> getConfCompleteness() {
         return confCompleteness;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/info/PlatformInfo.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/info/PlatformInfo.java b/common/lib/src/main/java/org/apache/syncope/common/lib/info/PlatformInfo.java
index 3d21d69..288f484 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/info/PlatformInfo.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/info/PlatformInfo.java
@@ -18,17 +18,10 @@
  */
 package org.apache.syncope.common.lib.info;
 
-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.AbstractBaseBean;
 
-@XmlRootElement(name = "platformInfo")
-@XmlType
 public class PlatformInfo extends AbstractBaseBean {
 
     private static final long serialVersionUID = -7941853999417673827L;
@@ -105,9 +98,6 @@ public class PlatformInfo extends AbstractBaseBean {
         return pwdResetRequiringSecurityQuestions;
     }
 
-    @XmlElementWrapper(name = "connIdLocations")
-    @XmlElement(name = "connIdLocation")
-    @JsonProperty("connIdLocations")
     public Set<String> getConnIdLocations() {
         return connIdLocations;
     }
@@ -148,107 +138,62 @@ public class PlatformInfo extends AbstractBaseBean {
         this.passwordGenerator = passwordGenerator;
     }
 
-    @XmlElementWrapper(name = "entitlements")
-    @XmlElement(name = "entitlement")
-    @JsonProperty("entitlements")
     public Set<String> getEntitlements() {
         return entitlements;
     }
 
-    @XmlElementWrapper(name = "reportletConfs")
-    @XmlElement(name = "reportletConf")
-    @JsonProperty("reportletConfs")
     public Set<String> getReportletConfs() {
         return reportletConfs;
     }
 
-    @XmlElementWrapper(name = "accountRules")
-    @XmlElement(name = "accountRule")
-    @JsonProperty("accountRules")
     public Set<String> getAccountRules() {
         return accountRules;
     }
 
-    @XmlElementWrapper(name = "passwordRules")
-    @XmlElement(name = "passwordRule")
-    @JsonProperty("passwordRules")
     public Set<String> getPasswordRules() {
         return passwordRules;
     }
 
-    @XmlElementWrapper(name = "mappingItemTransformers")
-    @XmlElement(name = "mappingItemTransformer")
-    @JsonProperty("mappingItemTransformers")
     public Set<String> getMappingItemTransformers() {
         return mappingItemTransformers;
     }
 
-    @XmlElementWrapper(name = "taskJobs")
-    @XmlElement(name = "taskJob")
-    @JsonProperty("taskJobs")
     public Set<String> getTaskJobs() {
         return taskJobs;
     }
 
-    @XmlElementWrapper(name = "reconciliationFilterBuilders")
-    @XmlElement(name = "reconciliationFilterBuilder")
-    @JsonProperty("reconciliationFilterBuilders")
     public Set<String> getReconciliationFilterBuilders() {
         return reconciliationFilterBuilders;
     }
 
-    @XmlElementWrapper(name = "logicActions")
-    @XmlElement(name = "logicAction")
-    @JsonProperty("logicActions")
     public Set<String> getLogicActions() {
         return logicActions;
     }
 
-    @XmlElementWrapper(name = "propagationActions")
-    @XmlElement(name = "propagationAction")
-    @JsonProperty("propagationActions")
     public Set<String> getPropagationActions() {
         return propagationActions;
     }
 
-    @XmlElementWrapper(name = "pullActions")
-    @XmlElement(name = "pullAction")
-    @JsonProperty("pullActions")
     public Set<String> getPullActions() {
         return pullActions;
     }
 
-    @XmlElementWrapper(name = "pushActions")
-    @XmlElement(name = "pushAction")
-    @JsonProperty("pushActions")
     public Set<String> getPushActions() {
         return pushActions;
     }
 
-    @XmlElementWrapper(name = "pullCorrelationRules")
-    @XmlElement(name = "pullCorrelationRule")
-    @JsonProperty("pullCorrelationRules")
     public Set<String> getPullCorrelationRules() {
         return pullCorrelationRules;
     }
 
-    @XmlElementWrapper(name = "pushCorrelationRules")
-    @XmlElement(name = "pushCorrelationRule")
-    @JsonProperty("pushCorrelationRules")
     public Set<String> getPushCorrelationRules() {
         return pushCorrelationRules;
     }
 
-    @XmlElementWrapper(name = "validators")
-    @XmlElement(name = "validator")
-    @JsonProperty("validators")
     public Set<String> getValidators() {
         return validators;
     }
 
-    @XmlElementWrapper(name = "notificationRecipientsProviders")
-    @XmlElement(name = "notificationRecipientsProvider")
-    @JsonProperty("notificationRecipientsProviders")
     public Set<String> getNotificationRecipientsProviders() {
         return notificationRecipientsProviders;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/info/SystemInfo.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/info/SystemInfo.java b/common/lib/src/main/java/org/apache/syncope/common/lib/info/SystemInfo.java
index d660451..52eb9fc 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/info/SystemInfo.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/info/SystemInfo.java
@@ -18,16 +18,9 @@
  */
 package org.apache.syncope.common.lib.info;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
-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.queue.CircularFifoQueue;
 import org.apache.syncope.common.lib.AbstractBaseBean;
 
-@XmlRootElement(name = "systemInfo")
-@XmlType
 public class SystemInfo extends AbstractBaseBean {
 
     private static final long serialVersionUID = -352727968865892499L;
@@ -84,15 +77,10 @@ public class SystemInfo extends AbstractBaseBean {
         this.startTime = startTime;
     }
 
-    @XmlElementWrapper(name = "load")
-    @XmlElement(name = "instant")
-    @JsonProperty("load")
     public CircularFifoQueue<LoadInstant> getLoad() {
         return load;
     }
 
-    @XmlRootElement(name = "loadInstant")
-    @XmlType
     public static class LoadInstant extends AbstractBaseBean {
 
         private static final long serialVersionUID = 1700788373758716478L;

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/info/package-info.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/info/package-info.java b/common/lib/src/main/java/org/apache/syncope/common/lib/info/package-info.java
deleted file mode 100644
index fccc6f4..0000000
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/info/package-info.java
+++ /dev/null
@@ -1,23 +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.
- */
-@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
-package org.apache.syncope.common.lib.info;
-
-import javax.xml.bind.annotation.XmlSchema;
-import org.apache.syncope.common.lib.SyncopeConstants;

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/jackson/UnwrappedObjectMapper.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/jackson/UnwrappedObjectMapper.java b/common/lib/src/main/java/org/apache/syncope/common/lib/jackson/UnwrappedObjectMapper.java
new file mode 100644
index 0000000..d34ff8b
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/jackson/UnwrappedObjectMapper.java
@@ -0,0 +1,93 @@
+/*
+ * 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.jackson;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.datatype.joda.JodaModule;
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.Writer;
+import java.util.Map;
+
+/**
+ * Jackson {@link ObjectMapper} that unwraps singleton map values and configure date (de)serialization via Joda.
+ */
+public class UnwrappedObjectMapper extends ObjectMapper {
+
+    private static final long serialVersionUID = -317191546835195103L;
+
+    public UnwrappedObjectMapper() {
+        super();
+
+        registerModule(new JodaModule());
+        configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
+    }
+
+    /**
+     * Unwraps the given value if it implements the Map interface and contains only a single entry, otherwise the
+     * value is returned unmodified.
+     *
+     * @param value the potential Map to unwrap
+     * @return the unwrapped map or the original value
+     */
+    private Object unwrapMap(final Object value) {
+        if (value instanceof Map) {
+            Map<?, ?> map = (Map<?, ?>) value;
+            if (map.size() == 1) {
+                return map.values().iterator().next();
+            }
+        }
+
+        return value;
+    }
+
+    @Override
+    public void writeValue(final JsonGenerator jgen, final Object value) throws IOException {
+        super.writeValue(jgen, unwrapMap(value));
+    }
+
+    @Override
+    public void writeValue(final File resultFile, final Object value) throws IOException {
+        super.writeValue(resultFile, unwrapMap(value));
+    }
+
+    @Override
+    public void writeValue(final OutputStream out, final Object value) throws IOException {
+        super.writeValue(out, unwrapMap(value));
+    }
+
+    @Override
+    public void writeValue(final Writer writer, final Object value) throws IOException {
+        super.writeValue(writer, unwrapMap(value));
+    }
+
+    @Override
+    public byte[] writeValueAsBytes(final Object value) throws JsonProcessingException {
+        return super.writeValueAsBytes(unwrapMap(value));
+    }
+
+    @Override
+    public String writeValueAsString(final Object value) throws JsonProcessingException {
+        return super.writeValueAsString(unwrapMap(value));
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/jackson/UnwrappedXmlMapper.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/jackson/UnwrappedXmlMapper.java b/common/lib/src/main/java/org/apache/syncope/common/lib/jackson/UnwrappedXmlMapper.java
new file mode 100644
index 0000000..7d69301
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/jackson/UnwrappedXmlMapper.java
@@ -0,0 +1,94 @@
+/*
+ * 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.jackson;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.dataformat.xml.XmlMapper;
+import com.fasterxml.jackson.datatype.joda.JodaModule;
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.Writer;
+import java.util.Map;
+
+/**
+ * Jackson {@link XmlMapper} that unwraps singleton map values, configure date (de)serialization via Joda.
+ */
+public class UnwrappedXmlMapper extends XmlMapper {
+
+    private static final long serialVersionUID = -317191546835195103L;
+
+    public UnwrappedXmlMapper() {
+        super();
+
+        registerModule(new JodaModule());
+        configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
+        configure(SerializationFeature.WRITE_EMPTY_JSON_ARRAYS, false);
+    }
+
+    /**
+     * Unwraps the given value if it implements the Map interface and contains only a single entry, otherwise the
+     * value is returned unmodified.
+     *
+     * @param value the potential Map to unwrap
+     * @return the unwrapped map or the original value
+     */
+    private Object unwrapMap(final Object value) {
+        if (value instanceof Map) {
+            Map<?, ?> map = (Map<?, ?>) value;
+            if (map.size() == 1) {
+                return map.values().iterator().next();
+            }
+        }
+
+        return value;
+    }
+
+    @Override
+    public void writeValue(final JsonGenerator jgen, final Object value) throws IOException {
+        super.writeValue(jgen, unwrapMap(value));
+    }
+
+    @Override
+    public void writeValue(final File resultFile, final Object value) throws IOException {
+        super.writeValue(resultFile, unwrapMap(value));
+    }
+
+    @Override
+    public void writeValue(final OutputStream out, final Object value) throws IOException {
+        super.writeValue(out, unwrapMap(value));
+    }
+
+    @Override
+    public void writeValue(final Writer writer, final Object value) throws IOException {
+        super.writeValue(writer, unwrapMap(value));
+    }
+
+    @Override
+    public byte[] writeValueAsBytes(final Object value) throws JsonProcessingException {
+        return super.writeValueAsBytes(unwrapMap(value));
+    }
+
+    @Override
+    public String writeValueAsString(final Object value) throws JsonProcessingException {
+        return super.writeValueAsString(unwrapMap(value));
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/jaxb/EntityTOType.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/jaxb/EntityTOType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/jaxb/EntityTOType.java
deleted file mode 100644
index 95ad262..0000000
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/jaxb/EntityTOType.java
+++ /dev/null
@@ -1,63 +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.jaxb;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import org.apache.syncope.common.lib.to.AnyObjectTO;
-import org.apache.syncope.common.lib.to.GroupTO;
-import org.apache.syncope.common.lib.to.RealmTO;
-import org.apache.syncope.common.lib.to.UserTO;
-
-@XmlSeeAlso({ UserTO.class, GroupTO.class, AnyObjectTO.class, RealmTO.class })
-@XmlAccessorType(XmlAccessType.PROPERTY)
-public class EntityTOType {
-
-    @XmlEnum
-    public enum Type {
-        USER,
-        GROUP,
-        ANY_OBJECT,
-        REALM
-
-    }
-
-    private Type type;
-
-    private Object value;
-
-    public Type getType() {
-        return type;
-    }
-
-    public void setType(final Type type) {
-        this.type = type;
-    }
-
-    public Object getValue() {
-        return value;
-    }
-
-    public void setValue(final Object value) {
-        this.value = value;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/jaxb/GenericMapEntryType.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/jaxb/GenericMapEntryType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/jaxb/GenericMapEntryType.java
deleted file mode 100644
index a418837..0000000
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/jaxb/GenericMapEntryType.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright 2011 John Yeary <jy...@bluelotussoftware.com>.
- * Copyright 2011 Bluelotus Software, LLC.
- *
- * Licensed 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.jaxb;
-
-import java.util.Map;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-
-@XmlAccessorType(XmlAccessType.PROPERTY)
-public class GenericMapEntryType<K, V> {
-
-    private K key;
-
-    private V value;
-
-    public GenericMapEntryType() {
-    }
-
-    public GenericMapEntryType(final Map.Entry<K, V> e) {
-        key = e.getKey();
-        value = e.getValue();
-    }
-
-    @XmlElement
-    public K getKey() {
-        return key;
-    }
-
-    public void setKey(final K key) {
-        this.key = key;
-    }
-
-    @XmlElement
-    public V getValue() {
-        return value;
-    }
-
-    public void setValue(final V value) {
-        this.value = value;
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/jaxb/GenericMapType.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/jaxb/GenericMapType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/jaxb/GenericMapType.java
deleted file mode 100644
index e57a401..0000000
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/jaxb/GenericMapType.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2011 John Yeary <jy...@bluelotussoftware.com>.
- * Copyright 2011 Bluelotus Software, LLC.
- *
- * Licensed 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.jaxb;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-public class GenericMapType<K, V> {
-
-    private final List<GenericMapEntryType<K, V>> entry = new ArrayList<>();
-
-    public GenericMapType() {
-    }
-
-    public GenericMapType(final Map<K, V> map) {
-        for (Map.Entry<K, V> e : map.entrySet()) {
-            entry.add(new GenericMapEntryType<>(e));
-        }
-    }
-
-    public List<GenericMapEntryType<K, V>> getEntry() {
-        return entry;
-    }
-
-    public void setEntry(final List<GenericMapEntryType<K, V>> entry) {
-        this.entry.clear();
-        if (entry != null) {
-            this.entry.addAll(entry);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/jaxb/XmlEntityTOAdapter.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/jaxb/XmlEntityTOAdapter.java b/common/lib/src/main/java/org/apache/syncope/common/lib/jaxb/XmlEntityTOAdapter.java
deleted file mode 100644
index 2374891..0000000
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/jaxb/XmlEntityTOAdapter.java
+++ /dev/null
@@ -1,66 +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.jaxb;
-
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-import org.apache.syncope.common.lib.to.AnyObjectTO;
-import org.apache.syncope.common.lib.to.EntityTO;
-import org.apache.syncope.common.lib.to.GroupTO;
-import org.apache.syncope.common.lib.to.RealmTO;
-import org.apache.syncope.common.lib.to.UserTO;
-
-public class XmlEntityTOAdapter<E extends EntityTO> extends XmlAdapter<EntityTOType, E> {
-
-    @Override
-    @SuppressWarnings("unchecked")
-    public E unmarshal(final EntityTOType v) throws Exception {
-        E result = null;
-
-        switch (v.getType()) {
-            case USER:
-            case GROUP:
-            case ANY_OBJECT:
-            case REALM:
-                result = (E) v.getValue();
-                break;
-
-            default:
-        }
-
-        return result;
-    }
-
-    @Override
-    public EntityTOType marshal(final E v) throws Exception {
-        EntityTOType result = new EntityTOType();
-        if (v instanceof UserTO) {
-            result.setType(EntityTOType.Type.USER);
-        } else if (v instanceof GroupTO) {
-            result.setType(EntityTOType.Type.GROUP);
-        } else if (v instanceof AnyObjectTO) {
-            result.setType(EntityTOType.Type.ANY_OBJECT);
-        } else if (v instanceof RealmTO) {
-            result.setType(EntityTOType.Type.REALM);
-        }
-        result.setValue(v);
-
-        return result;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/jaxb/XmlGenericMapAdapter.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/jaxb/XmlGenericMapAdapter.java b/common/lib/src/main/java/org/apache/syncope/common/lib/jaxb/XmlGenericMapAdapter.java
deleted file mode 100644
index 1855164..0000000
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/jaxb/XmlGenericMapAdapter.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2011 John Yeary <jy...@bluelotussoftware.com>.
- * Copyright 2011 Bluelotus Software, LLC.
- *
- * Licensed 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.jaxb;
-
-import java.util.HashMap;
-import java.util.Map;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-
-public class XmlGenericMapAdapter<K, V> extends XmlAdapter<GenericMapType<K, V>, Map<K, V>> {
-
-    @Override
-    public Map<K, V> unmarshal(final GenericMapType<K, V> v) throws Exception {
-        Map<K, V> map = new HashMap<>();
-
-        for (GenericMapEntryType<K, V> mapEntryType : v.getEntry()) {
-            map.put(mapEntryType.getKey(), mapEntryType.getValue());
-        }
-
-        return map;
-    }
-
-    @Override
-    public GenericMapType<K, V> marshal(final Map<K, V> v) throws Exception {
-        GenericMapType<K, V> mapType = new GenericMapType<>();
-
-        for (Map.Entry<K, V> entry : v.entrySet()) {
-            GenericMapEntryType<K, V> mapEntryType = new GenericMapEntryType<>();
-            mapEntryType.setKey(entry.getKey());
-            mapEntryType.setValue(entry.getValue());
-            mapType.getEntry().add(mapEntryType);
-        }
-
-        return mapType;
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/jaxb/package-info.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/jaxb/package-info.java b/common/lib/src/main/java/org/apache/syncope/common/lib/jaxb/package-info.java
deleted file mode 100644
index a04b95d..0000000
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/jaxb/package-info.java
+++ /dev/null
@@ -1,23 +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.
- */
-@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
-package org.apache.syncope.common.lib.jaxb;
-
-import javax.xml.bind.annotation.XmlSchema;
-import org.apache.syncope.common.lib.SyncopeConstants;

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/package-info.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/package-info.java b/common/lib/src/main/java/org/apache/syncope/common/lib/package-info.java
deleted file mode 100644
index 8eac5d5..0000000
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/package-info.java
+++ /dev/null
@@ -1,22 +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.
- */
-@XmlSchema(namespace = SyncopeConstants.NAMESPACE)
-package org.apache.syncope.common.lib;
-
-import javax.xml.bind.annotation.XmlSchema;

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AbstractPatch.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AbstractPatch.java b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AbstractPatch.java
index bb881a7..841e9b6 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AbstractPatch.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AbstractPatch.java
@@ -18,13 +18,9 @@
  */
 package org.apache.syncope.common.lib.patch;
 
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.lib.AbstractBaseBean;
 import org.apache.syncope.common.lib.types.PatchOperation;
 
-@XmlType
-@XmlSeeAlso({ AbstractPatchItem.class, AttrPatch.class, MembershipPatch.class, RelationshipPatch.class })
 public abstract class AbstractPatch extends AbstractBaseBean {
 
     private static final long serialVersionUID = -4729181508529829580L;

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AbstractPatchItem.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AbstractPatchItem.java b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AbstractPatchItem.java
index ee86a88..9a30049 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AbstractPatchItem.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AbstractPatchItem.java
@@ -18,11 +18,6 @@
  */
 package org.apache.syncope.common.lib.patch;
 
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlType
-@XmlSeeAlso({ AbstractReplacePatchItem.class, LongPatchItem.class, StringPatchItem.class })
 public abstract class AbstractPatchItem<T> extends AbstractPatch {
 
     private static final long serialVersionUID = -8889326446009942028L;

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AbstractReplacePatchItem.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AbstractReplacePatchItem.java b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AbstractReplacePatchItem.java
index 8282427..50c2e26 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AbstractReplacePatchItem.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AbstractReplacePatchItem.java
@@ -18,8 +18,6 @@
  */
 package org.apache.syncope.common.lib.patch;
 
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.lib.types.PatchOperation;
 
 /**
@@ -29,8 +27,6 @@ import org.apache.syncope.common.lib.types.PatchOperation;
  *
  * @param <T> {@code String}, {@code Long} or {@code Boolean}
  */
-@XmlType
-@XmlSeeAlso({ BooleanReplacePatchItem.class, StringReplacePatchItem.class })
 public abstract class AbstractReplacePatchItem<T> extends AbstractPatchItem<T> {
 
     private static final long serialVersionUID = 2027599764019829563L;

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AnyObjectPatch.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AnyObjectPatch.java b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AnyObjectPatch.java
index ddb4ac3..36f5b75 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AnyObjectPatch.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AnyObjectPatch.java
@@ -18,16 +18,9 @@
  */
 package org.apache.syncope.common.lib.patch;
 
-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;
 
-@XmlRootElement(name = "anyObjectPatch")
-@XmlType
 public class AnyObjectPatch extends AnyPatch {
 
     private static final long serialVersionUID = -1644118942622556097L;
@@ -46,16 +39,10 @@ public class AnyObjectPatch extends AnyPatch {
         this.name = name;
     }
 
-    @XmlElementWrapper(name = "relationships")
-    @XmlElement(name = "relationship")
-    @JsonProperty("relationships")
     public Set<RelationshipPatch> getRelationships() {
         return relationships;
     }
 
-    @XmlElementWrapper(name = "memberships")
-    @XmlElement(name = "membership")
-    @JsonProperty("memberships")
     public Set<MembershipPatch> getMemberships() {
         return memberships;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AnyPatch.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AnyPatch.java b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AnyPatch.java
index 0dadbf8..32350ff 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AnyPatch.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AnyPatch.java
@@ -19,17 +19,12 @@
 package org.apache.syncope.common.lib.patch;
 
 import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
 import java.util.HashSet;
 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.XmlType;
 import org.apache.syncope.common.lib.AbstractBaseBean;
 import org.apache.syncope.common.lib.to.AttrTO;
 
-@XmlType
 public abstract class AnyPatch extends AbstractBaseBean implements AttributablePatch {
 
     private static final long serialVersionUID = -7445489774552440544L;
@@ -63,32 +58,20 @@ public abstract class AnyPatch extends AbstractBaseBean implements AttributableP
         this.realm = realm;
     }
 
-    @XmlElementWrapper(name = "auxClasses")
-    @XmlElement(name = "auxClass")
-    @JsonProperty("auxClasses")
     public Set<StringPatchItem> getAuxClasses() {
         return auxClasses;
     }
 
-    @XmlElementWrapper(name = "plainAttrs")
-    @XmlElement(name = "attribute")
-    @JsonProperty("plainAttrs")
     @Override
     public Set<AttrPatch> getPlainAttrs() {
         return plainAttrs;
     }
 
-    @XmlElementWrapper(name = "virAttrs")
-    @XmlElement(name = "attribute")
-    @JsonProperty("virAttrs")
     @Override
     public Set<AttrTO> getVirAttrs() {
         return virAttrs;
     }
 
-    @XmlElementWrapper(name = "resources")
-    @XmlElement(name = "resource")
-    @JsonProperty("resources")
     public Set<StringPatchItem> getResources() {
         return resources;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AssociationPatch.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AssociationPatch.java b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AssociationPatch.java
index 56efe7e..5d47619 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AssociationPatch.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AssociationPatch.java
@@ -19,12 +19,8 @@
 package org.apache.syncope.common.lib.patch;
 
 import javax.ws.rs.PathParam;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.lib.types.ResourceAssociationAction;
 
-@XmlRootElement(name = "associationPatch")
-@XmlType
 public class AssociationPatch extends PasswordPatch {
 
     private static final long serialVersionUID = 6295778399633883767L;

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AttrPatch.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AttrPatch.java b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AttrPatch.java
index f41a054..22beb7b 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AttrPatch.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/AttrPatch.java
@@ -19,12 +19,8 @@
 package org.apache.syncope.common.lib.patch;
 
 import com.fasterxml.jackson.annotation.JsonIgnore;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.lib.to.AttrTO;
 
-@XmlRootElement(name = "attrPatch")
-@XmlType
 public class AttrPatch extends AbstractPatch {
 
     private static final long serialVersionUID = 6881634224246176673L;

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/patch/BooleanReplacePatchItem.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/BooleanReplacePatchItem.java b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/BooleanReplacePatchItem.java
index 9cf1097..481c904 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/BooleanReplacePatchItem.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/BooleanReplacePatchItem.java
@@ -18,11 +18,6 @@
  */
 package org.apache.syncope.common.lib.patch;
 
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "booleanReplacePatchItem")
-@XmlType
 public class BooleanReplacePatchItem extends AbstractReplacePatchItem<Boolean> {
 
     private static final long serialVersionUID = 4013349284181583101L;

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/patch/DeassociationPatch.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/DeassociationPatch.java b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/DeassociationPatch.java
index e5271e0..7f6004c 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/DeassociationPatch.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/DeassociationPatch.java
@@ -18,19 +18,12 @@
  */
 package org.apache.syncope.common.lib.patch;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
 import java.util.ArrayList;
 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.AbstractBaseBean;
 import org.apache.syncope.common.lib.types.ResourceDeassociationAction;
 
-@XmlRootElement(name = "deassociationPatch")
-@XmlType
 public class DeassociationPatch extends AbstractBaseBean {
 
     private static final long serialVersionUID = 6295778399633883767L;
@@ -58,9 +51,6 @@ public class DeassociationPatch extends AbstractBaseBean {
         this.action = action;
     }
 
-    @XmlElementWrapper(name = "resources")
-    @XmlElement(name = "resource")
-    @JsonProperty("resources")
     public List<String> getResources() {
         return resources;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/patch/GroupPatch.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/GroupPatch.java b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/GroupPatch.java
index 29353ff..6849cb9 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/GroupPatch.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/GroupPatch.java
@@ -24,18 +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.to.TypeExtensionTO;
 
-@XmlRootElement(name = "groupPatch")
-@XmlType
 public class GroupPatch extends AnyPatch {
 
     private static final long serialVersionUID = -460284378124440077L;
@@ -48,7 +40,6 @@ public class GroupPatch extends AnyPatch {
 
     private String udynMembershipCond;
 
-    @XmlJavaTypeAdapter(XmlGenericMapAdapter.class)
     @JsonIgnore
     private final Map<String, String> adynMembershipConds = new HashMap<>();
 
@@ -102,9 +93,6 @@ public class GroupPatch extends AnyPatch {
         });
     }
 
-    @XmlElementWrapper(name = "typeExtensions")
-    @XmlElement(name = "typeExtension")
-    @JsonProperty("typeExtensions")
     public List<TypeExtensionTO> getTypeExtensions() {
         return typeExtensions;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/patch/LongPatchItem.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/LongPatchItem.java b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/LongPatchItem.java
index 96c6050..19e3426 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/LongPatchItem.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/LongPatchItem.java
@@ -18,11 +18,6 @@
  */
 package org.apache.syncope.common.lib.patch;
 
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "stringPatchItem")
-@XmlType
 public class LongPatchItem extends AbstractPatchItem<Long> {
 
     private static final long serialVersionUID = 7308597905137875993L;

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/patch/MembershipPatch.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/MembershipPatch.java b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/MembershipPatch.java
index 8487e1f..037ec5f 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/MembershipPatch.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/MembershipPatch.java
@@ -18,17 +18,10 @@
  */
 package org.apache.syncope.common.lib.patch;
 
-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.to.AttrTO;
 
-@XmlRootElement(name = "membershipPatch")
-@XmlType
 public class MembershipPatch extends AbstractPatch implements AttributablePatch {
 
     private static final long serialVersionUID = -6783121761221554433L;
@@ -60,17 +53,11 @@ public class MembershipPatch extends AbstractPatch implements AttributablePatch
         this.group = group;
     }
 
-    @XmlElementWrapper(name = "plainAttrs")
-    @XmlElement(name = "attribute")
-    @JsonProperty("plainAttrs")
     @Override
     public Set<AttrPatch> getPlainAttrs() {
         return plainAttrs;
     }
 
-    @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/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/patch/PasswordPatch.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/PasswordPatch.java b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/PasswordPatch.java
index 93e6b9e..00097a2 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/PasswordPatch.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/PasswordPatch.java
@@ -18,20 +18,11 @@
  */
 package org.apache.syncope.common.lib.patch;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
 import java.util.ArrayList;
 import java.util.Collection;
 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.XmlSeeAlso;
-import javax.xml.bind.annotation.XmlType;
 import org.apache.commons.collections4.CollectionUtils;
 
-@XmlRootElement(name = "passwordPatch")
-@XmlType
-@XmlSeeAlso({ AssociationPatch.class, StatusPatch.class })
 public class PasswordPatch extends StringReplacePatchItem {
 
     private static final long serialVersionUID = 961023537479513071L;
@@ -87,9 +78,6 @@ public class PasswordPatch extends StringReplacePatchItem {
         this.onSyncope = onSyncope;
     }
 
-    @XmlElementWrapper(name = "resources")
-    @XmlElement(name = "resource")
-    @JsonProperty("resources")
     public List<String> getResources() {
         return resources;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/patch/RelationshipPatch.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/RelationshipPatch.java b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/RelationshipPatch.java
index f7925e9..e71d1da 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/RelationshipPatch.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/RelationshipPatch.java
@@ -18,12 +18,8 @@
  */
 package org.apache.syncope.common.lib.patch;
 
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.lib.to.RelationshipTO;
 
-@XmlRootElement(name = "relationshipPatch")
-@XmlType
 public class RelationshipPatch extends AbstractPatch {
 
     private static final long serialVersionUID = 1314175521205206511L;

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/patch/ResourceDeassociationPatch.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/ResourceDeassociationPatch.java b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/ResourceDeassociationPatch.java
index 233d5bd..f907e9f 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/ResourceDeassociationPatch.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/ResourceDeassociationPatch.java
@@ -18,19 +18,12 @@
  */
 package org.apache.syncope.common.lib.patch;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
 import java.util.ArrayList;
 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.AbstractBaseBean;
 import org.apache.syncope.common.lib.types.ResourceDeassociationAction;
 
-@XmlRootElement(name = "resourceDeassociationPatch")
-@XmlType
 public class ResourceDeassociationPatch extends AbstractBaseBean {
 
     private static final long serialVersionUID = -9116268525079837276L;
@@ -70,9 +63,6 @@ public class ResourceDeassociationPatch extends AbstractBaseBean {
         this.action = action;
     }
 
-    @XmlElementWrapper(name = "anyKyes")
-    @XmlElement(name = "key")
-    @JsonProperty("anyKyes")
     public List<String> getAnyKyes() {
         return anyKyes;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/patch/StatusPatch.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/StatusPatch.java b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/StatusPatch.java
index b7d9c1e..66862ed 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/StatusPatch.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/StatusPatch.java
@@ -19,12 +19,8 @@
 package org.apache.syncope.common.lib.patch;
 
 import javax.ws.rs.PathParam;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.lib.types.StatusPatchType;
 
-@XmlRootElement(name = "statusPatch")
-@XmlType
 public class StatusPatch extends PasswordPatch {
 
     private static final long serialVersionUID = 99309988426922612L;

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/patch/StringPatchItem.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/StringPatchItem.java b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/StringPatchItem.java
index d9aacf8..1813df9 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/StringPatchItem.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/StringPatchItem.java
@@ -18,11 +18,6 @@
  */
 package org.apache.syncope.common.lib.patch;
 
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "stringPatchItem")
-@XmlType
 public class StringPatchItem extends AbstractPatchItem<String> {
 
     private static final long serialVersionUID = -4956965404796800689L;

http://git-wip-us.apache.org/repos/asf/syncope/blob/f283ebc0/common/lib/src/main/java/org/apache/syncope/common/lib/patch/StringReplacePatchItem.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/StringReplacePatchItem.java b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/StringReplacePatchItem.java
index b924484..04cf2d0 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/patch/StringReplacePatchItem.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/patch/StringReplacePatchItem.java
@@ -18,13 +18,6 @@
  */
 package org.apache.syncope.common.lib.patch;
 
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "stringReplacePatchItem")
-@XmlType
-@XmlSeeAlso({ PasswordPatch.class })
 public class StringReplacePatchItem extends AbstractReplacePatchItem<String> {
 
     private static final long serialVersionUID = -5631052324901928363L;