Are you decoding the request by hand?

I'm currently using:

RPC.decodeRequest(String, Class<?>, SerializationPolicyProvider)

The SerializationPolicyProvider implementation defines the method:
getSerializationPolicy(String, String);

this provides both the module name and the strong name which you can
then easily use to read in the rpc file and create a
StandardSerialisationPolicy.

If not, the strong name should be included in the reqest string. If
you are decoding by hand (not sure why you would, but whatever floats
your boat) you should be able to pull it out of that.

So the above RPC will use your SerializationPolicyProvider to generate
the policy. it returns an RPCRequest which you can then call
getSerializationPolicy() on and pass the policy instance through to
encodeResponseForSuccess(Method, Object, SerializationPolicy)


Hope that helps.

On Feb 3, 11:11 am, "[email protected]" <[email protected]>
wrote:
> We are using RPC.encodeResponseForSuccess() in our code to serialize
> GWT objects and include them in the page (avoiding an extra round trip
> and simplifying startup logic in some cases).
>
> This is a bit awkward as this (the only public) API requires passing a
> serialization policy, which changes every time our API changes.
>
> We can  load the generated policy ".gwt.rpc" file with
> SerializationPolicyLoader.loadFromStream() easily enough, however this
> file has a strong hash name and therefore we cannot automate this step
> in our build.
>
> Now, I'm aware that we could probably create a linker to accomplish
> this.  But I'm wondering what I'm missing here.  The docs imply that
> we don't need a policy if we use IsSerializable, but I thought that
> this was being deprecated.  Or we could create a no-op policy that
> accepts everything, but I am not sure of all of the security
> implications of that.
>
> Can anyone tell me how they manage this issue?
>
> thanks,
> Pat
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to