Package com.eviware.soapui.model.iface

Examples of com.eviware.soapui.model.iface.MessageExchange


  {
    boolean throwException = false;
    for( String url : urls )
    {
      HttpTestRequestStep httpRequest = createHttpRequest( ( WsdlTestStep )testStep, url );
      MessageExchange messageExchange2 = ( MessageExchange )httpRequest.run( ( TestCaseRunner )securityTestRunner,
          ( SecurityTestRunContext )context );

      for( String value : parameterExposureCheckConfig.getParameterExposureStringsList() )
      {
        value = context.expand( value );// property expansion support
        String match = SecurityScanUtil.contains( context, new String( messageExchange2.getRawResponseData() ),
            value, false );
        if( match != null )
        {
          String shortValue = value.length() > 25 ? value.substring( 0, 22 ) + "... " : value;
          String message = "XSS content sent in request '" + shortValue + "' is exposed in response on link "
View Full Code Here


    private Component buildContent() {
        contentPanel = new JPanel(new BorderLayout());

        contentEditor = SyntaxEditorUtil.createDefaultJsonSyntaxTextArea();
        MessageExchange me = messageExchangeModelItem.getMessageExchange();
        if (me != null) {
            setEditorContent(me);
        }

        RTextScrollPane scrollPane = new RTextScrollPane(contentEditor);
View Full Code Here

                        "Runs this assertion script against the last messageExchange with a mock testContext");
            }

            public void actionPerformed(ActionEvent event) {
                TestStep testStep = getAssertable().getTestStep();
                MessageExchange exchange = null;

                if (testStep instanceof WsdlTestRequestStep) {
                    exchange = new WsdlResponseMessageExchange(((WsdlTestRequestStep) testStep).getTestRequest());
                } else if (testStep instanceof RestTestRequestStepInterface) {
                    exchange = new RestResponseMessageExchange(((RestRequestInterface) ((RestTestRequestStepInterface) testStep).getTestRequest()));
View Full Code Here

                    parameters.put(scp.getLabel(), fuzzed);
                    updateRequestProperty(testStep, scp.getName(), fuzzed);
                }
            }

            MessageExchange message = (MessageExchange) testStep.run((TestCaseRunner) runner, context);
            createMessageExchange(parameters, message, context);
        }
    }
View Full Code Here

                    parameters.remove(scp.getLabel());
                }

            }

            MessageExchange message = (MessageExchange) testStep.run((TestCaseRunner) securityTestRunner, context);
            createMessageExchange(clearNullValues(parameters), message, context);

        } catch (Exception e) {
            SoapUI.logError(e);
            hasNext = false;
View Full Code Here

    @Override
    protected void execute(SecurityTestRunner runner, TestStep testStep, SecurityTestRunContext context) {
        try {
            StringToStringMap paramsUpdated = update(testStep, context);
            MessageExchange message = (MessageExchange) testStep.run((TestCaseRunner) runner, context);
            createMessageExchange(paramsUpdated, message, context);
        } catch (XmlException e) {
            SoapUI.logError(e, "[XPathInjectionSecurityScan]XPath seems to be invalid!");
            reportSecurityScanException("Property value is not XML or XPath is wrong!");
        } catch (Exception e) {
View Full Code Here

        return false;
    }

    private static boolean checkIfJMS(MessageExchangeModelItem messageExchange) {
        try {
            MessageExchange me = ((MessageExchangeModelItem) messageExchange).getMessageExchange();
            if (me != null) {
                StringToStringMap strmap = me.getProperties();
                if (strmap != null && strmap.containsKey("Endpoint")) {
                    String r = me.getProperty("Endpoint");
                    return r != null && r.startsWith(JMSEndpoint.JMS_ENDPIONT_PREFIX);
                } else {
                    return false;
                }
            } else {
View Full Code Here

    public MessageExchange getMessageExchange() {
        return messageExchange;
    }

    public void setMessageExchange(MessageExchange messageExchange) {
        MessageExchange oldExchange = this.messageExchange;
        this.messageExchange = messageExchange;

        notifyPropertyChanged(MESSAGE_EXCHANGE, oldExchange, messageExchange);
    }
View Full Code Here

        setEditable(false);
    }

    public void updateXml() {
        try {
            MessageExchange messageExchange = messageExchangeModelItem.getMessageExchange();
            DefaultXmlDocument defaultXmlDocument = getDocument();

            if (messageExchange != null && messageExchange.getOperation() != null) {
                defaultXmlDocument.setTypeSystem(messageExchange.getOperation().getInterface().getDefinitionContext()
                        .getInterfaceDefinition().getSchemaTypeSystem());
            }

            defaultXmlDocument.setDocumentContent(new DocumentContent(null, messageExchange == null ? null : messageExchange.getRequestContentAsXml()));
        } catch (Throwable e) {
            SoapUI.logError(e);
        }
    }
View Full Code Here

        }
    }

    public void updateXml() {
        try {
            MessageExchange messageExchange = messageExchangeModelItem.getMessageExchange();
            DefaultXmlDocument defaultXmlDocument = getDocument();

            if (messageExchange != null && messageExchange.getOperation() != null) {
                defaultXmlDocument.setTypeSystem(messageExchange.getOperation().getInterface().getDefinitionContext()
                        .getInterfaceDefinition().getSchemaTypeSystem());
            }

            defaultXmlDocument.setDocumentContent(new DocumentContent(null, messageExchange == null ? null : messageExchange.getResponseContentAsXml()));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.model.iface.MessageExchange

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.