Package com.eviware.soapui.impl.wsdl

Examples of com.eviware.soapui.impl.wsdl.WsdlOperation


    }

    private void generateMulipleTestCases(WsdlTestSuite testSuite, WsdlInterface iface, boolean useExisting,
                                          boolean createLoadTest, List<String> operations) {
        for (int i = 0; i < iface.getOperationCount(); i++) {
            WsdlOperation operation = iface.getOperationAt(i);
            if (!operations.contains(operation.getName())) {
                continue;
            }

            WsdlTestCase testCase = testSuite.addNewTestCase(operation.getName() + " TestCase");

            if (useExisting && operation.getRequestCount() > 0) {
                for (int x = 0; x < operation.getRequestCount(); x++) {
                    testCase.addTestStep(WsdlTestRequestStepFactory.createConfig(operation.getRequestAt(x),
                            operation.getName()));
                }
            } else {
                testCase.addTestStep(WsdlTestRequestStepFactory.createConfig(operation, operation.getName()));
            }

            if (createLoadTest) {
                testCase.addNewLoadTest("LoadTest 1");
            }
View Full Code Here


            return testStepConfig;
        }
    }

    public static TestStepConfig createNewTestStep(WsdlMockResponse mockResponse) {
        WsdlOperation operation = mockResponse.getMockOperation().getOperation();
        if (operation == null) {
            UISupport.showErrorMessage("Missing operation for this mock response");
            return null;
        }

        ensureDialog();

        dialog.setValue(CreateForm.INTERFACE, operation.getInterface().getName());
        dialog.setValue(CreateForm.OPERATION, operation.getName());
        dialog.setBooleanValue(CreateForm.CREATE_RESPONSE, false);
        dialog.setIntValue(CreateForm.PORT, mockResponse.getMockOperation().getMockService().getPort());
        dialog.setValue(CreateForm.PATH, mockResponse.getMockOperation().getMockService().getPath());

        return createFromDialog(operation.getInterface().getProject(), mockResponse.getMockOperation().getName() + " - "
                + mockResponse.getName());
    }
View Full Code Here

        if (dialog.show()) {
            String ifaceName = dialog.getValue(Form.INTERFACE);
            String operationName = dialog.getValue(Form.OPERATION);

            WsdlInterface iface = (WsdlInterface) project.getInterfaceByName(ifaceName);
            WsdlOperation operation = iface.getOperationByName(operationName);
            target.setOperation(operation);

            String name = dialog.getValue(Form.NAME).trim();
            if (name.length() > 0 && !target.getName().equals(name)) {
                target.setName(name);
            }

            if (dialog.getBooleanValue(Form.RECREATE_REQUEST)) {
                String req = operation.createRequest(dialog.getBooleanValue(Form.CREATE_OPTIONAL));
                if (req == null) {
                    UISupport.showErrorMessage("Request creation failed");
                    return;
                }
View Full Code Here

    public void actionPerformed(ActionEvent e) {
        WsdlTestRequestStep step = (WsdlTestRequestStep) result.getTestStep();
        String name = UISupport.prompt("Specify name of request", "Create Request", "Result from " + step.getName());

        if (name != null) {
            WsdlOperation operation = (WsdlOperation) step.getTestRequest().getOperation();
            WsdlRequest request = operation.addNewRequest(name);
            request.setRequestContent(result.getRequestContent());
            request.setDomain(result.getDomain());
            request.setEncoding(result.getEncoding());
            request.setEndpoint(result.getEndpoint());
            request.setPassword(result.getPassword());
View Full Code Here

        Object op = UISupport.prompt("Select operation to invoke for request", "New TestRequest", options.toArray());
        if (op != null) {
            int ix = options.indexOf(op);
            if (ix != -1) {
                WsdlOperation operation = (WsdlOperation) operations.get(ix);

                if (dialog == null) {
                    buildDialog();
                }
View Full Code Here

        public WsdlRequestXmlSourceEditor(XmlEditor xmlEditor, WsdlRequest request) {
            super(xmlEditor, request, false);
        }

        protected ValidationError[] validateXml(String xml) {
            WsdlOperation operation = getModelItem().getOperation();
            WsdlValidator validator = new WsdlValidator((operation.getInterface()).getWsdlContext());

            WsdlResponseMessageExchange wsdlResponseMessageExchange = new WsdlResponseMessageExchange(getModelItem());
            wsdlResponseMessageExchange.setRequestContent(xml);
            return validator.assertRequest(wsdlResponseMessageExchange, false);
        }
View Full Code Here

        public WsdlMockRequestXmlSourceEditor(XmlEditor xmlEditor, WsdlMockResponse mockResponse) {
            super(xmlEditor, mockResponse, false);
        }

        protected ValidationError[] validateXml(String xml) {
            WsdlOperation operation = getModelItem().getMockOperation().getOperation();

            if (operation == null) {
                return new ValidationError[]{new AssertionError("Missing operation for MockResponse")};
            }

            WsdlValidator validator = new WsdlValidator((operation.getInterface()).getWsdlContext());
            WsdlMockResultMessageExchange messageExchange =
                    new WsdlMockResultMessageExchange((WsdlMockResult) getModelItem().getMockResult(), getModelItem());
            return validator.assertRequest(messageExchange, false);
        }
View Full Code Here

            if (getModelItem() instanceof WsdlTestRequest) {
                WsdlTestRequest testRequest = (WsdlTestRequest) getModelItem();
                testRequest.assertResponse(new WsdlTestRunContext(testRequest.getTestStep()));
            }

            WsdlOperation operation = getModelItem().getOperation();
            WsdlValidator validator = new WsdlValidator((operation.getInterface()).getWsdlContext());

            return validator.assertResponse(new WsdlResponseMessageExchange(getModelItem()), false);
        }
View Full Code Here

            getValidateXmlAction().setEnabled(getModelItem().getMockOperation().getOperation().isBidirectional());
        }

        protected ValidationError[] validateXml(String xml) {
            WsdlOperation operation = getModelItem().getMockOperation().getOperation();
            if (operation == null) {
                return new ValidationError[]{new AssertionError("Missing operation for MockResponse")};
            }

            WsdlValidator validator = new WsdlValidator((operation.getInterface()).getWsdlContext());
            return validator.assertResponse(new WsdlMockResponseMessageExchange(getModelItem()), false);
        }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.wsdl.WsdlOperation

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.