I am studying JAX-R
S and created a simple project with the following class:
Webservice Code
@Path("generic")
public class GenericResource {
@Inject
private MeuServico servico;
@GET
@Produces("text/plain")
public String getText() {
return servico.getText();
}
}
Service
@Stateless
public class MeuServico {
public String getTExtt() {
return "Teste";
}
}
I'm getting NullPointerException
on the line of return servico.getText();
Does anyone know what it can be?