Package com.eviware.soapui.impl.actions

Examples of com.eviware.soapui.impl.actions.RestUriDialogHandler


    public NewRestServiceAction() {
        super(messages.get("Title"), messages.get("Description"));
    }

    public void perform(WsdlProject project, Object param) {
        RestUriDialogHandler dialogBuilder = new RestUriDialogHandler();
        RestServiceBuilder serviceBuilder = new RestServiceBuilder();
        XFormDialog dialog = dialogBuilder.buildDialog(messages);
        while (dialog.show()) {
            try {
                String uri = dialogBuilder.getUri();
                if (uri != null) {
                    serviceBuilder.createRestService(project, uri);
                }
                // If there is no exception or error we break out
                break;

            } catch (Exception ex) {
                UISupport.showErrorMessage(ex.getMessage());
                dialogBuilder.resetUriField();
            }
        }
    }
View Full Code Here


    public NewRestResourceActionBase(String title, String description) {
        super(title, description);
    }

    public void perform(T parent, Object param) {
        RestUriDialogHandler dialogBuilder = new RestUriDialogHandler();
        XFormDialog dialog = dialogBuilder.buildDialog(messages);

        if (param instanceof URL) {
            XmlBeansRestParamsTestPropertyHolder params = new XmlBeansRestParamsTestPropertyHolder(null, RestParametersConfig.Factory.newInstance());
            String path = RestUtils.extractParams(param.toString(), params, false);
            dialog.setValue(Form.RESOURCEPATH, path);
        }

        if (dialog.show()) {
            String path = dialogBuilder.getUri();
            RestResource resource = createRestResource(parent, path);
            RestUtils.extractParams(dialog.getValue(Form.RESOURCEPATH), resource.getParams(), false);
            resource.setPath(removeParametersFrom(resource.getPath()));

            createMethodAndRequestFor(resource);
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.actions.RestUriDialogHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.