}
if (paramInjector instanceof MessageBodyParamInjector)
{
if (hasBodyParam)
{
throw new InternalServerErrorException("Invalid rest method: " + method.toString() + ". Can not receive " +
"more than one parameter through body text", "Can not execute requested service");
}
hasBodyParam = true;
}
}
if (hasBodyParam && hasFormParam)
{
throw new InternalServerErrorException("Invalid rest method: " + method.toString() + ". Can not use both " +
"types on the same method: FormParam and BodyParam", "Can not execute requested service");
}
if ((hasBodyParam || hasFormParam) && httpMethod.equals("GET"))
{
throw new InternalServerErrorException("Invalid rest method: " + method.toString() + ". Can not receive " +
"parameters on body for GET methods.", "Can not execute requested service");
}
}