jcricket/gwt-syncproxy

Server SerializationPolicy being used to client Serialization

Closed this issue · 7 comments

What steps will reproduce the problem?
1. invoke a service with a parameter object that is never returned from the 
server.
2. the client will error when serializing the parameter
3. This may also occour in the opposite case (deserializing a server return 
object that is never supplied as a parameter)

What is the expected output? What do you see instead?
the client should be able to serialize the parameter.  However it does not 
appear in the Serilizer whiteList and does appear in the Desrializer white list

What version of the product are you using? On what operating system?
0.3, Windows

Please provide any additional information below.
We are using the DummySerializationPolicy.

if (true) { //serializationPolicyName == null){


The client should invert the serialization/deserialization flags when using the 
server policy 

Original issue reported on code.google.com by josh.e.p...@gmail.com on 29 Mar 2012 at 1:19

Thanks for the workaround, Josh.  For others reading, the line he commented out 
is in RemoteServiceSyncProxy.

Original comment by rte...@gmail.com on 13 Apr 2012 at 6:24

Here's a patch that resolves the issue.  This creates a new 
SerializationPolicyLoader that switches the ser/deser lists.  This copies a lot 
of code from GWT for what is essentially a one line fix, but I didn't see any 
other way to do it.

Original comment by jarrod.ribble on 13 Apr 2012 at 8:43

Attachments:

Hi

I have applied your patch but I keep getting the error: 
Error while deserialization response

I'm able to get the policy file from my server but I can't deserialize my own 
DTOs so I think it's using the wrong policy file somewhere.
Could anyone help me resolve this error?

Original comment by kevin.ke...@gmail.com on 28 Mar 2013 at 4:28

[deleted comment]
[deleted comment]
This patch is being applied in the AndroidDev branch and will undergo the tests 
in place. Assuming there are not breaks in the testing, it'll be included in 
the upcoming release version 0.4. I don't expect this to cause any problems.

#kevin Couple things to verify: 1) Make sure your DTO's are being whitelisted 
in the policy file. Do a clean-recompile, sometimes GWT just doesn't catch the 
changes, depending on the dev environment. I've run into this on occasion 
(http://stackoverflow.com/questions/138099/how-do-i-add-a-type-to-gwts-serializa
tion-policy-whitelist). 2) A stack trace of where your getting this error from 
might help narrow down the problem. 3) Are you having this problem on a dev 
server, like GAE dev mode? Verify this error is coming from your client, not 
the server-side.

Original comment by p.pr...@blueesoteric.com on 5 Apr 2013 at 7:53

  • Changed state: Started
Patch has been applied to the android dev branch containing the updated 
gwt-syncproxy structure. patch will be released in the jar when issue 3 is 
completed as version 0.4

Original comment by p.pr...@blueesoteric.com on 6 May 2013 at 12:27

  • Changed state: Fixed