MultivaluedMap<ParameterType, Parameter> types = getParametersInfo(params, ori);
List<Object> pathParams = getPathParamValues(types, params, ori);
int bodyIndex = getBodyIndex(types, ori);
UriBuilder builder = getCurrentBuilder().clone();
if (isRoot) {
addNonEmptyPath(builder, ori.getClassResourceInfo().getURITemplate().getValue());
}
addNonEmptyPath(builder, ori.getURITemplate().getValue());
handleMatrixes(types, params, builder);
handleQueries(types, params, builder);
URI uri = builder.buildFromEncoded(pathParams.toArray()).normalize();
MultivaluedMap<String, String> headers = getHeaders();
MultivaluedMap<String, String> paramHeaders = new MetadataMap<String, String>();
handleHeaders(paramHeaders, types, params);
handleCookies(paramHeaders, types, params);