Reputation: 1623
There is two different GWT-RPC services.
TaxService
which contains method TaxDto getTax(ProductDto product);
ProductService
which contains method `Double getTotalWithTax(ProductDto product);I want to call getTax()
method from getTotalWithTax()
how can I do this?
Upvotes: 0
Views: 481
Reputation: 3639
To call getTax()
on the server side, create an instance of TaxServiceImp
that is accessible to getTotalWithTax(ProductDto product)
; Call the method from there.
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;
}
}
Upvotes: 3