return (RestRequestSpec) spec;
}
public RestRequestBase<I, R> receive(HttpServletRequest request, I resourceId) {
try {
RequestData requestData = RequestData.create(request, spec, gson);
@SuppressWarnings("unchecked")
R requestBody = requestData.hasRequestBody()
? (R) requestData.getRequestBody().getSimpleBody() : null;
return createRequest(requestData.getMethod(), requestData.getHeaders(),
requestData.getUrlParams(), resourceId, requestBody, requestData.isInlined());
} catch (IOException e) {
throw new WebServiceSystemException(e);
} catch (JsonParseException e) {
// Not a Web service request
throw new WebServiceSystemException(e);