-
1. Re: Why is a ClientMarshaller running on server side instead of a ServerMarshaller
pmwqld May 28, 2015 11:19 PM (in response to pmwqld)It would help if I could see the contents of ServerMarshallingFactoryImpl but all I have is class files to look at.
-
2. Re: Why is a ClientMarshaller running on server side instead of a ServerMarshaller
pmwqld May 29, 2015 1:05 AM (in response to pmwqld)Finally got ServerMarshallingFactoryImpl generated and found the following in the generated code
final DateMillisClientMarshaller com_xxx_client_shared_domain_dto_DateMillis = new DateMillisClientMarshaller();
marshallers.put("com.xxx.client.shared.domain.dto.DateMillis", com_xxx_client_shared_domain_dto_DateMillis);
clearly this shows this is a bug, when the DateMillisServerMarshaller should be used.
-
3. Re: Why is a ClientMarshaller running on server side instead of a ServerMarshaller
pmwqld May 31, 2015 10:57 PM (in response to pmwqld)Fixed the problem is in MarshallerGeneratorFactory.java
Changed lines 218 to 222 to be
MappingDefinition definition = mappingContext.getDefinitionsFactory().getDefinition(clsName);
final Class<? extends Marshaller> marshallerCls = (target == MarshallerOutputTarget.GWT) ?
definition.getClientMarshallerClass() : definition.getServerMarshallerClass();
instead of the original lines
final Class<? extends Marshaller> marshallerCls = mappingContext.getDefinitionsFactory().getDefinition(clsName)
.getClientMarshallerClass();
Issue raised at https://issues.jboss.org/browse/ERRAI-860