{
dialog.setValue( Form.RESOURCENAME, "" );
dialog.setValue( Form.RESOURCEPATH, "" );
}
params = new XmlBeansRestParamsTestPropertyHolder( null, RestParametersConfig.Factory.newInstance() );
if( param instanceof URL )
{
String path = RestUtils.extractParams( param.toString(), params, false );
dialog.setValue( Form.RESOURCEPATH, path );
setNameFromPath( path );
if( paramsTable != null )
paramsTable.refresh();
}
paramsTable = new InternalRestParamsTable( params, ParamLocation.RESOURCE );
dialog.getFormField( Form.PARAMSTABLE ).setProperty( "component", paramsTable );
if( dialog.show() )
{
String path = dialog.getValue( Form.RESOURCEPATH );
try
{
URL url = new URL( path );
path = url.getPath();
}
catch( MalformedURLException e )
{
}
RestResource resource = createRestResource( service, path, dialog );
paramsTable.extractParams( resource.getParams(), ParamLocation.RESOURCE );
// RestMethod method = createRestMethod(resource, dialog);
// paramsTable.extractParams(method.getParams(), ParamLocation.METHOD);
// UISupport.select(method);
// if (dialog.getBooleanValue(Form.CREATEREQUEST)) {
// createRequest(method);
// }
XmlBeansRestParamsTestPropertyHolder methodParams = new XmlBeansRestParamsTestPropertyHolder( null,
RestParametersConfig.Factory.newInstance() );
paramsTable.extractParams( methodParams, ParamLocation.METHOD );
SoapUI.getActionRegistry().getAction( NewRestMethodAction.SOAPUI_ACTION_ID ).perform( resource, methodParams );
}