package com.zyeeda.framework.cxf;

import org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.SerializationConfig.Feature;

public class JacksonJsonProvider extends JacksonJaxbJsonProvider {

	public JacksonJsonProvider() {
		ObjectMapper m = this._mapperConfig.getConfiguredMapper();
		if (m == null) {
			m = this._mapperConfig.getDefaultMapper();
		}
		m.getSerializationConfig().setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);
		m.configure(Feature.FAIL_ON_EMPTY_BEANS, false);
	}
	
}

@@ -30,16 +30,54 @@
 cxf;%0D%0A%0D%0A
+import java.text.SimpleDateFormat;%0D%0A%0D%0A
 import o
@@ -171,24 +171,78 @@
 ectMapper;%0D%0A
+import org.codehaus.jackson.map.SerializationConfig;%0D%0A
 import org.c
@@ -587,16 +587,276 @@
 ;%0D%0A%09%09%7D%0D%0A
+%09%09SerializationConfig sc = m.getSerializationConfig().withDateFormat(new SimpleDateFormat(%22yyyy-MM-dd%22));%0D%0A%09%09sc.setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);%0D%0A%09%09sc.set(Feature.FAIL_ON_EMPTY_BEANS, false);%0D%0A%09%09m.setSerializationConfig(sc);%0D%0A%09%09/*%0D%0A
 %09%09m.getS
@@ -990,16 +990,130 @@
 alse);%0D%0A
+%09%09m.setSerializationConfig(m.getSerializationConfig().withDateFormat(new SimpleDateFormat(%22yyyy-MM-dd%22)));%0D%0A%09%09*/%0D%0A
 %09%7D%0D%0A%09%0D%0A%7D

Make CXF serialize date type in pre-defined format.