Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316416 - Remote communication fails, server receives only hash map.
Summary: Remote communication fails, server receives only hash map.
Status: RESOLVED WORKSFORME
Alias: None
Product: Riena
Classification: RT
Component: communication (show other bugs)
Version: 1.2.0   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 2.0.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-10 02:25 EDT by Dirk Steiner CLA
Modified: 2010-07-02 11:06 EDT (History)
1 user (show)

See Also:


Attachments
Class to be serialized and sent to remote service (3.84 KB, application/octet-stream)
2010-06-10 02:25 EDT, Dirk Steiner CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Steiner CLA 2010-06-10 02:25:32 EDT
Created attachment 171605 [details]
Class to be serialized and sent to remote service

We are using the hessian protocol.

Example:

Try to send instance of class CountryLanguageDTO to service. Service recieves only a hash map, containing all properties and values.

Renmed class CountryLanguageDTO to CountryLangDTO. Now, all works fine; sever recieves the sent instance.

Same problem with class named RateDTO. Other DTOs like UserDTO, GroupDTO etc work fine.
Comment 1 Christian Campo CLA 2010-06-10 09:56:26 EDT
I am unsure about the word "Renmed" :-)

Are you saying that renaming a java class solves a problem that you have in the data serialization ? 

Thats hard to believe but on the other who know what hessian is doing :-).

We need to have a little more info:

- Have you tried to use the Riena 2.0.0.RC4 version ?
- The class has some super classes that you didnt provide, I would need them
- Are you passing the instance as parameter or as a return value (I know it should be the same, but hessian has some tricky corners and distingueshes the two cases)
- I need the interface for the remote service or at least the method signature that you are using where that error occurs.
Comment 2 Christian Campo CLA 2010-06-30 09:10:26 EDT
Unfortunatelly you did not send us all the classes, so we are missing the superclass of CountryLanguageDTO named AbstractCheckable. So I had to reduce a testcase to only use CountryLanguageDTO.

I ran this testcase:

public void testCountryLanguage() {
		final CountryLanguageDTO countryLanguage2 = new CountryLanguageDTO();
		countryLanguage2.setActive(true);
		countryLanguage2.setLastChangeLogin("testssss");
		countryLanguage2.setLanguageId(125L);
		final CountryLanguageDTO countryLanguage = testcasesService.getCountryLanguage(countryLanguage2);
		assertNotNull(countryLanguage);
	}

And while there are not many asserts in it, I could see in the debugger, that the return value contains all the expected values (the service just returns in the input parameter). I also saw in the debugger that the service received the correct input value.

I tested this with Riena 2.0 which contains a newer version of hessian. I highly recommend that you do this tooo.

Please test this again and if it persists with Riena 2.0 please attach AbstractCheckable to this bug and REOPEN this bug. I am closing it until then as WORKSFORME.