Monday, July 29, 2013

Re: rpc call - static methods is not working

sorry correction , at the end I mean the senddomesticdata method 

On Monday, July 29, 2013 2:17:17 PM UTC-5, fedex wrote:
Hi everyone,

I am trying to define a static method in the service interface to make an rpc call. But it doesn't allow me to do so. here I am pasting my code

Client class 

public void sendDomesticData(String product,String dma,String yrmnths,String dist,String metrics) {
String url = GWT.getModuleBaseURL() + "domesticservice";
domesticServiceAsync = (DomesticServiceAsync) GWT
ServiceDefTarget endpoint = (ServiceDefTarget) domesticServiceAsync;
domesticServiceAsync.sendDomesticData(product,dma,yrmnths,dist,metrics,new Domestichandler<Void>() );

public class Domestichandler<Void> implements AsyncCallback<Void> {

public void onFailure(Throwable caught) {
String error = caught.getMessage();

public void onSuccess(Void result) {

public interface DomesticService extends RemoteService {
public  void sendDomesticData(String product,String dma,String yrmnths,String dist,String metrics);


public interface DomesticServiceAsync {
void sendDomesticData(String product,String dma,String yrmnths,String dist,String metrics,AsyncCallback<Void> callback);

server side -

public  void sendDomesticData(String product, String dma,
String yrmnths, String dist, String metrics) {

Basically I am trying to send the values from the front interface to the  server side and I don't want any return value. But the values passed to the server side should be stored globally in the server class so i can access those values in different method. I tried changing all the senddomestic values to static but it won't allow me to do so? why? 

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment