Hi Paul,

Depending on how you have the servlet configured I would embed this
into the Servlet URL instead. (that way your API is kind of
protected).

Use the Constants interface to load the Version from a properties
file.

-== foo/package/ClientConfiguration.properties ==-
version=1.0

-== declare the interface ==-
interface foo.package.ClientConfiguration extends Constants {
   @DefaultStringValue("99.9999")
   String version();
}

-== servlet declaration ==-
    <servlet-mapping>
        <servlet-name>MyRPCService</servlet-name>
        <url-pattern>
            /foo.package.Something/service/*
        </url-pattern>
    </servlet-mapping>

-== usage ==-
ClientConfiguration clientConfig = (ClientConfiguration )
GWT.create(ClientConfiguration .class);
endpoint.setServiceEntryPoint(GWT.getModuleBaseURL() + "service/" +
clientConfig.version());


{{  and then in the servlet you can look for the version }}
better still would be to subclass your servlet version differences,
and actually map the right servlet to the right version URL etc etc.

Just a thought...

ramon

On Jan 11, 12:41 pm, Paul Stockley <pstockl...@gmail.com> wrote:
> Is there a way to pass additional data with each RPC call that isn't
> specified in the function parameters? I want to pass a hidden version number
> with each call so I can check it against the server to ensure the client
> isn't running a stale version of the program.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to