Change method return type in rest services