use of com.eviware.soapui.impl.rest.support.RestParamsPropertyHolder in project microcks by microcks.
the class SoapUIProjectImporter method buildRequest.
/**
* Build a domain Request from SoapUI RestTestRequest.
*/
private Request buildRequest(RestTestRequest rtr) {
Request request = new Request();
request.setName(rtr.getName());
request.setContent(rtr.getRequestContent());
request.setHeaders(buildHeaders(rtr.getRequestHeaders()));
// Add query parameters only (template are holded by the operation itself.)
RestParamsPropertyHolder paramsHolder = rtr.getParams();
for (int i = 0; i < paramsHolder.getPropertyCount(); i++) {
// if (paramsHolder.getPropertyAt(i).getStyle() == ParameterStyle.QUERY){
Parameter param = new Parameter();
param.setName(paramsHolder.getPropertyAt(i).getName());
param.setValue(paramsHolder.getPropertyAt(i).getValue());
request.addQueryParameter(param);
// }
}
return request;
}
Aggregations