I am learning web services with NetBeans and did a program for stock price calculation. I need to return 2 values to display price and profit/loss.
But i cant able to return two values. I need to return C variable. Please Help!!.
package test;
import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.ejb.Stateless;
@WebService(serviceName = "Gold")
@Stateless()
public class Gold {
int a,c;
@WebMethod(operationName = "hello")
public String hello(@WebParam(name = "name") String txt) {
return "Hello " + txt + " !";
}
@WebMethod(operationName = "Calc")
public int Calc(@WebParam(name = "grams") int grams, @WebParam(name = "time") int time) {
//TODO write your implementation code here:
if(time>11){
a=grams*100;
c=(grams*100-grams*80);
}
else if(time<11)
{
a=grams*80;
c=(grams*80-grams*100);
}
return a;
}
}