有两种不同的 GWT-RPC 服务。
TaxService其中包含方法TaxDto getTax(ProductDto product);ProductService其中包含方法`Double getTotalWithTax(ProductDto product);
我想从我怎么做这个调用getTax()方法?getTotalWithTax()
要getTax()在服务器端调用,请创建一个TaxServiceImp可访问的实例getTotalWithTax(ProductDto product);从那里调用方法。
public class ProductService Impl extends XsrfProtectedServiceServlet{
TaxServiceImp taxServImpInstance = new TaxServiceImp();
Double getTotalWithTax(ProductDto product){
TaxDto taxDtoInstance = taxServImpInstance.getTax();
//process your data and return what you need
return myDouble;
}
}