Package com.eviware.soapui.impl.wsdl.teststeps

Examples of com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep$InternalInterfaceListener


    public static WsdlTestCase makeTestCase() throws SoapUIException {
        return new WsdlTestCase(new WsdlTestSuite(makeWsdlProject(), TestSuiteConfig.Factory.newInstance()), TestCaseConfig.Factory.newInstance(), false);
    }

    public static WsdlTestRequestStep makeTestRequestStep() throws SoapUIException {
        return new WsdlTestRequestStep(makeTestCase(), TestStepConfig.Factory.newInstance(), false);
    }
View Full Code Here


        public void actionPerformed(ActionEvent e) {
            for (int c = 0; c < testCase.getTestStepCount(); c++) {
                TestStep step = testCase.getTestStepAt(c);
                if (step instanceof WsdlTestRequestStep) {
                    WsdlTestRequestStep requestStep = (WsdlTestRequestStep) step;
                    requestStep.getTestRequest().setUsername(form.getComponentValue(USERNAME));
                    requestStep.getTestRequest().setPassword(form.getComponentValue(PASSWORD));
                    requestStep.getTestRequest().setDomain(form.getComponentValue(DOMAIN));
                }
            }

            dialog.setVisible(false);
        }
View Full Code Here

            AbstractHttpRequest<?> wsdlRequest = (AbstractHttpRequest<?>) modelItem;
            if (wsdlRequest.getOperation().getInterface() == this) {
                list.add(wsdlRequest);
            }
        } else if (modelItem instanceof WsdlTestRequestStep) {
            WsdlTestRequestStep testRequestStep = (WsdlTestRequestStep) modelItem;
            WsdlTestRequest testRequest = testRequestStep.getTestRequest();
            if (testRequest != null && testRequest.getOperation() != null
                    && testRequest.getOperation().getInterface() == this) {
                list.add(testRequest);
            }
        } else if (modelItem instanceof WsdlMockResponse) {
View Full Code Here

        WsdlTestCase testCase = (WsdlTestCase) runContext.getTestCase();
        if (testStep instanceof WsdlTestRequestStep && testCase.getWsrmEnabled()) {
            if (wsrmMap == null) {
                wsrmMap = new HashMap<String, WsrmSequence>();
            }
            WsdlTestRequestStep requestStep = (WsdlTestRequestStep) testStep;
            String endpoint = requestStep.getHttpRequest().getEndpoint();
            SoapVersion soapVersion = requestStep.getOperation().getInterface().getSoapVersion();
            if (!wsrmMap.containsKey(endpoint)) {

                WsrmUtils utils = new WsrmUtils(soapVersion);
                WsrmSequence sequence = utils.createSequence(endpoint, soapVersion, testCase.getWsrmVersionNamespace(),
                        testCase.getWsrmAckTo(), testCase.getWsrmExpires(), requestStep.getOperation(), null, null);

                wsrmMap.put(endpoint, sequence);
            }

            WsrmSequence sequence = wsrmMap.get(endpoint);
            WsdlRequest wsdlRequest = requestStep.getHttpRequest();

            wsdlRequest.getWsrmConfig().setVersion(testCase.getWsrmVersion());
            wsdlRequest.getWsrmConfig().setSequenceIdentifier(sequence.getIdentifier());
            wsdlRequest.getWsrmConfig().setLastMessageId(sequence.incrementLastMsgNumber());
            wsdlRequest.getWsrmConfig().setUuid(sequence.getUuid());
View Full Code Here

        }
        ;

        String name = dialogValues.get(STEP_NAME);

        WsdlTestRequestStep testStep = (WsdlTestRequestStep) testCase.insertTestStep(
                WsdlTestRequestStepFactory.createConfig(mockResponse.getMockOperation().getOperation(), name), position);

        if (testStep == null) {
            return null;
        }

        if (enabled) {
            if (dialogValues.getBoolean(ADD_SOAP_RESPONSE_ASSERTION)) {
                testStep.getTestRequest().addAssertion(SoapResponseAssertion.ID);
            }

            if (dialogValues.getBoolean(ADD_SCHEMA_ASSERTION)) {
                testStep.getTestRequest().addAssertion(SchemaComplianceAssertion.ID);
            }

            if (dialogValues.getBoolean(ADD_SOAP_FAULT_ASSERTION)) {
                testStep.getTestRequest().addAssertion(NotSoapFaultAssertion.LABEL);
            }
        }

        testStep.getTestRequest().setEndpoint(mockResponse.getMockOperation().getMockService().getLocalEndpoint());

        UISupport.selectAndShow(testStep);

        return testStep;
    }
View Full Code Here

        assertThat(contentAfterPropertyExpansion, is(EXPECTED_REQUEST_CONTENT_AFTER_PROPERTY_EXPANSION));
    }


    private SubmitContext createSubmitContext() throws SoapUIException {
        WsdlTestRequestStep requestStep = ModelItemFactory.makeTestRequestStep();
        requestStep.getTestCase().setPropertyValue("StoreType", "shoe_Store");
        SubmitContext context = new WsdlSubmitContext(requestStep);

        context.setProperty(BaseHttpRequestTransport.REQUEST_CONTENT, REQUEST_CONTENT);
        return context;
    }
View Full Code Here

        putValue(Action.SMALL_ICON, UISupport.createImageIcon("/create_request_from_result.gif"));
        putValue(Action.SHORT_DESCRIPTION, "Creates a new request from this result");
    }

    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());
View Full Code Here

            return false;
        }

        String name = dialogValues.get(STEP_NAME);

        WsdlTestRequestStep testStep = (WsdlTestRequestStep) testCase.insertTestStep(
                WsdlTestRequestStepFactory.createConfig(request, name), position);

        if (testStep == null) {
            return false;
        }

        if (dialogValues.getBoolean(COPY_ATTACHMENTS)) {
            request.copyAttachmentsTo(testStep.getTestRequest());
        }

        if (dialogValues.getBoolean(COPY_HTTPHEADERS)) {
            testStep.getTestRequest().setRequestHeaders(request.getRequestHeaders());
        }

        if (bidirectional) {
            if (dialogValues.getBoolean(ADD_SOAP_RESPONSE_ASSERTION)) {
                testStep.getTestRequest().addAssertion(SoapResponseAssertion.ID);
            }

            if (dialogValues.getBoolean(ADD_SCHEMA_ASSERTION)) {
                testStep.getTestRequest().addAssertion(SchemaComplianceAssertion.ID);
            }

            if (dialogValues.getBoolean(ADD_SOAP_FAULT_ASSERTION)) {
                testStep.getTestRequest().addAssertion(NotSoapFaultAssertion.LABEL);
            }
        }

        UISupport.selectAndShow(testStep);
View Full Code Here

    public WsdlTestRequestStepFactory() {
        super(REQUEST_TYPE, "Test Request", "Submits a request and validates its response", "/request.gif");
    }

    public WsdlTestStep buildTestStep(WsdlTestCase testCase, TestStepConfig config, boolean forLoadTest) {
        return new WsdlTestRequestStep(testCase, config, forLoadTest);
    }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep$InternalInterfaceListener

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.