public static void registerDefaults(TypeMappingRegistry tmr) {
TypeMapping tm = tmr.getDefaultTypeMapping();
if(!tm.isRegistered(QueryBean.class, RPCConstants.QUERY_QNAME))
tm.register(QueryBean.class,
RPCConstants.QUERY_QNAME,
new BeanSerializerFactory(QueryBean.class,RPCConstants.QUERY_QNAME),
new BeanDeserializerFactory(QueryBean.class,RPCConstants.QUERY_QNAME));
//Adding custom string serialization for non printable characters.
tm.register(String.class,
RPCConstants.STRING_QNAME,