Package com.eviware.soapui.support.types

Examples of com.eviware.soapui.support.types.StringToStringMap


      return headersAndProperties;
    }

    public void afterSubmit( Submit submit, SubmitContext context )
    {
      headersAndProperties = new StringToStringMap();
      JMSResponse jmsResponse = ( JMSResponse )context.getProperty( HermesJmsRequestTransport.JMS_RESPONSE );
      if( jmsResponse instanceof JMSResponse )
      {
        Message message = jmsResponse.getMessageReceive();
        if( message != null )
View Full Code Here


      {
        return getModelItem().getAMFRequest().getResponse().getResponseAMFHeaders();
      }
      else
      {
        return new StringToStringMap();
      }
    }
View Full Code Here

    {
      MessageExchange messageExchange = getModelItem().getMessageExchange();
      if( messageExchange != null )
        return messageExchange.getResponseHeaders().toStringToStringMap();
      else
        return new StringToStringMap();
    }
View Full Code Here

    {
      MessageExchange messageExchange = getModelItem().getMessageExchange();
      if( messageExchange != null && messageExchange.getRequestHeaders() != null )
        return messageExchange.getRequestHeaders().toStringToStringMap();
      else
        return new StringToStringMap();
    }
View Full Code Here

      dialog = builder.buildDialog( builder.buildOkCancelHelpActions( HelpUrls.TESTCASEOPTIONS_HELP_URL ),
          "Specify general options for this TestCase", UISupport.OPTIONS_ICON );
    }

    StringToStringMap values = new StringToStringMap();

    values.put( SEARCH_PROPERTIES, String.valueOf( testCase.getSearchProperties() ) );
    values.put( KEEP_SESSION, String.valueOf( testCase.getKeepSession() ) );
    values.put( FAIL_ON_ERROR, String.valueOf( testCase.getFailOnError() ) );
    values.put( FAIL_TESTCASE_ON_ERROR, String.valueOf( testCase.getFailTestCaseOnErrors() ) );
    values.put( DISCARD_OK_RESULTS, String.valueOf( testCase.getDiscardOkResults() ) );
    values.put( SOCKET_TIMEOUT, String.valueOf( testCase.getSettings().getString( HttpSettings.SOCKET_TIMEOUT, "" ) ) );
    values.put( TESTCASE_TIMEOUT, String.valueOf( testCase.getTimeout() ) );
    values.put( MAXRESULTS, String.valueOf( testCase.getMaxResults() ) );

    values.put( WS_RM_ENABLED, String.valueOf( testCase.getWsrmEnabled() ) );
    values.put( WS_RM_VERSION, String.valueOf( testCase.getWsrmVersion() ) );
    if( testCase.getWsrmAckTo() != null )
      values.put( WS_RM_ACK_TO, String.valueOf( testCase.getWsrmAckTo() ) );
    if( testCase.getWsrmExpires() != 0 )
      values.put( WS_RM_EXPIRES, String.valueOf( testCase.getWsrmExpires() ) );

    values.put( AMF_AUTHORISATION_ENABLE, String.valueOf( testCase.getAmfAuthorisation() ) );
    values.put( AMF_ENDPOINT, String.valueOf( testCase.getAmfEndpoint() ) );
    values.put( AMF_LOGIN, String.valueOf( testCase.getAmfLogin() ) );
    values.put( AMF_PASSWORD, String.valueOf( testCase.getAmfPassword() ) );

    dialog.getFormField( FAIL_TESTCASE_ON_ERROR ).setEnabled(
        !Boolean.parseBoolean( String.valueOf( testCase.getFailOnError() ) ) );

    values = dialog.show( values );

    if( dialog.getReturnValue() == XFormDialog.OK_OPTION )
    {
      try
      {
        testCase.setSearchProperties( Boolean.parseBoolean( values.get( SEARCH_PROPERTIES ) ) );
        testCase.setKeepSession( Boolean.parseBoolean( values.get( KEEP_SESSION ) ) );
        testCase.setDiscardOkResults( Boolean.parseBoolean( values.get( DISCARD_OK_RESULTS ) ) );
        testCase.setFailOnError( Boolean.parseBoolean( values.get( FAIL_ON_ERROR ) ) );
        testCase.setFailTestCaseOnErrors( Boolean.parseBoolean( values.get( FAIL_TESTCASE_ON_ERROR ) ) );
        testCase.setTimeout( Long.parseLong( values.get( TESTCASE_TIMEOUT ) ) );
        testCase.setMaxResults( Integer.parseInt( values.get( MAXRESULTS ) ) );
        testCase.setWsrmEnabled( Boolean.parseBoolean( values.get( WS_RM_ENABLED ) ) );
        testCase.setWsrmVersion( values.get( WS_RM_VERSION ) );
        testCase.setWsrmAckTo( values.get( WS_RM_ACK_TO ) );
        if( values.get( WS_RM_EXPIRES ) != null && values.get( WS_RM_EXPIRES ).length() > 0 )
          testCase.setWsrmExpires( Long.parseLong( values.get( WS_RM_EXPIRES ) ) );

        String timeout = values.get( SOCKET_TIMEOUT );
        if( timeout.trim().length() == 0 )
          testCase.getSettings().clearSetting( HttpSettings.SOCKET_TIMEOUT );
        else
          testCase.getSettings().setString( HttpSettings.SOCKET_TIMEOUT, timeout );

        testCase.setAmfAuthorisation( Boolean.parseBoolean( values.get( AMF_AUTHORISATION_ENABLE ) ) );
        testCase.setAmfEndpoint( values.get( AMF_ENDPOINT ) );
        testCase.setAmfLogin( values.get( AMF_LOGIN ) );
        testCase.setAmfPassword( values.get( AMF_PASSWORD ) );
      }
      catch( Exception e1 )
      {
        UISupport.showErrorMessage( e1.getMessage() );
      }
View Full Code Here

      PropertyMutation allAtOncePropertyMutation = new PropertyMutation();
      TestStep testStepCopy = null;
      XmlObjectTreeModel model = null;
      List<SecurityCheckedParameter> scpList = getParameterHolder().getParameterList();
      StringToStringMap stsmap = new StringToStringMap();
      for( SecurityCheckedParameter scp : scpList )
      {

        if( strategy.equals( StrategyTypeConfig.ONE_BY_ONE ) )
        {
          stsmap = new StringToStringMap();
          model = SecurityScanUtil.getXmlObjectTreeModel( testStep, scp );
          testStepCopy = SecurityTestRunnerImpl.cloneTestStepForSecurityScan( ( WsdlTestStep )testStep );
        }
        else
        {
          if( model == null )
          {
            model = SecurityScanUtil.getXmlObjectTreeModel( testStep, scp );
          }
          if( testStepCopy == null )
          {
            testStepCopy = SecurityTestRunnerImpl.cloneTestStepForSecurityScan( ( WsdlTestStep )testStep );
          }
        }

        // if parameter is xml
        if( scp.isChecked() && scp.getXpath().trim().length() > 0 )
        {
          XmlTreeNode[] treeNodes = null;

          treeNodes = model.selectTreeNodes( context.expand( scp.getXpath() ) );

          if( treeNodes.length > 0 )
          {
            XmlTreeNode mynode = treeNodes[0];

            // work only for simple types
            if( mynode.isLeaf() )
            {
              mynode.setValue( 1, value );

              if( strategy.equals( StrategyTypeConfig.ONE_BY_ONE ) )
              {
                PropertyMutation oneByOnePropertyMutation = new PropertyMutation();
                oneByOnePropertyMutation.setPropertyName( scp.getName() );
                oneByOnePropertyMutation.setPropertyValue( unescapEscaped( model.getXmlObject().toString() ) );
                stsmap.put( scp.getLabel(), mynode.getNodeText() );
                oneByOnePropertyMutation.setMutatedParameters( stsmap );
                oneByOnePropertyMutation.updateRequestProperty( testStepCopy );
                oneByOnePropertyMutation.setTestStep( testStepCopy );
                oneByOnePropertyMutation.addMutation( context );
              }
              else
              {
                allAtOncePropertyMutation.setPropertyName( scp.getName() );
                allAtOncePropertyMutation.setPropertyValue( unescapEscaped( model.getXmlObject().toString() ) );
                stsmap.put( scp.getLabel(), mynode.getNodeText() );
                allAtOncePropertyMutation.setMutatedParameters( stsmap );
                allAtOncePropertyMutation.updateRequestProperty( testStepCopy );
                allAtOncePropertyMutation.setTestStep( testStepCopy );

              }
            }
          }
        }
        // non xml parameter
        else
        {
          if( strategy.equals( StrategyTypeConfig.ONE_BY_ONE ) )
          {
            PropertyMutation oneByOnePropertyMutation = new PropertyMutation();
            oneByOnePropertyMutation.setPropertyName( scp.getName() );
            oneByOnePropertyMutation.setPropertyValue( value );
            stsmap.put( scp.getLabel(), value );
            oneByOnePropertyMutation.setMutatedParameters( stsmap );
            oneByOnePropertyMutation.updateRequestProperty( testStepCopy );
            oneByOnePropertyMutation.setTestStep( testStepCopy );
            oneByOnePropertyMutation.addMutation( context );
          }
          else
          {
            allAtOncePropertyMutation.setPropertyName( scp.getName() );
            allAtOncePropertyMutation.setPropertyValue( value );
            stsmap.put( scp.getLabel(), value );
            allAtOncePropertyMutation.setMutatedParameters( stsmap );
            allAtOncePropertyMutation.updateRequestProperty( testStepCopy );
            allAtOncePropertyMutation.setTestStep( testStepCopy );
          }
        }
View Full Code Here

  public boolean configure()
  {
    if( dialog == null )
      buildDialog();

    StringToStringMap values = new StringToStringMap();
    values.put( CONTENT, token );
    values.put( IGNORE_CASE, ignoreCase );
    values.put( USE_REGEX, useRegEx );

    values = dialog.show( values );
    if( dialog.getReturnValue() == XFormDialog.OK_OPTION )
    {
      token = values.get( CONTENT );
      ignoreCase = values.getBoolean( IGNORE_CASE );
      useRegEx = values.getBoolean( USE_REGEX );
    }

    setConfiguration( createConfiguration() );
    return true;
  }
View Full Code Here

  {
    strategy = getExecutionStrategy().getStrategy();

    XmlObjectTreeModel model = null;// getXmlObjectTreeModel( testStep );
    List<SecurityCheckedParameter> scpList = getParameterHolder().getParameterList();
    StringToStringMap stsmap = new StringToStringMap();
    for( SecurityCheckedParameter scp : scpList )
    {
      if( scp.isChecked() && scp.getXpath().trim().length() > 0 )
      {
        XmlTreeNode[] treeNodes = null;

        if( strategy.equals( StrategyTypeConfig.ONE_BY_ONE ) )
        {
          stsmap = new StringToStringMap();
          model = SecurityScanUtil.getXmlObjectTreeModel( testStep, scp );
        }
        else
        {
          if( model == null )
          {
            model = SecurityScanUtil.getXmlObjectTreeModel( testStep, scp );
          }

        }
        treeNodes = model.selectTreeNodes( context.expand( scp.getXpath() ) );

        if( treeNodes.length > 0 )
        {
          XmlTreeNode mynode = treeNodes[0];

          if( mynode.isLeaf() )
          {
            if( mynode.getSchemaType() != null && mynode.getSchemaType().getEnumerationValues() != null
                && mynode.getSchemaType().getEnumerationValues().length > 0 )
            {
              EnumerationValues nodeInfo = new EnumerationValues( mynode.getSchemaType().getBaseType()
                  .getShortJavaName() );
              for( XmlAnySimpleType s : mynode.getSchemaType().getEnumerationValues() )
              {
                nodeInfo.addValue( s.getStringValue() );
              }
              updateEnumNodeValue( mynode, nodeInfo );
              stsmap.put( scp.getLabel(), mynode.getNodeText() );
              // addToUpdated( context, scp.getLabel(),
              // mynode.getNodeText() );
              if( strategy.equals( StrategyTypeConfig.ONE_BY_ONE ) )
              {
                PropertyMutation pm = new PropertyMutation();
                pm.setPropertyName( scp.getName() );
                pm.setPropertyValue( model.getXmlObject().toString() );
                stsmap = new StringToStringMap();
                stsmap.put( scp.getLabel(), mynode.getNodeText() );
                pm.setMutatedParameters( stsmap );
                addMutation( context, pm );
              }
            }
            else
View Full Code Here

      pm.setPropertyName( scp.getName() );
      pm.setPropertyValue( model.getXmlObject().toString() );

      if( strategy.equals( StrategyTypeConfig.ONE_BY_ONE ) )
      {
        stsmap = new StringToStringMap();
        stsmap.put( scp.getLabel() + " (" + nodeName + "='" + nodeValue + "') ", value );
        pm.setMutatedParameters( stsmap );
        addMutation( context, pm );
      }
      else
View Full Code Here

  public boolean configure()
  {
    if( dialog == null )
      buildDialog();

    StringToStringMap values = new StringToStringMap();
    values.put( ASSERT_ACTION, assertWsaAction );
    values.put( ASSERT_TO, assertWsaTo );
    // values.put(ASSERT_REPLY_TO, assertWsaReplyTo);
    // values.put(ASSERT_MESSAGE_ID, assertWsaMessageId);
    values.put( ASSERT_RELATES_TO, assertWsaRelatesTo );
    values.put( ASSERT_REPLY_TO_REF_PARAMS, assertReplyToRefParams );
    values.put( ASSERT_FAULT_TO_REF_PARAMS, assertFaultToRefParams );

    values = dialog.show( values );
    if( dialog.getReturnValue() == XFormDialog.OK_OPTION )
    {
      assertWsaAction = values.getBoolean( ASSERT_ACTION );
      assertWsaTo = values.getBoolean( ASSERT_TO );
      // assertWsaReplyTo = values.getBoolean(ASSERT_REPLY_TO);
      // assertWsaMessageId = values.getBoolean(ASSERT_MESSAGE_ID);
      assertWsaRelatesTo = values.getBoolean( ASSERT_RELATES_TO );
      assertReplyToRefParams = values.getBoolean( ASSERT_REPLY_TO_REF_PARAMS );
      assertFaultToRefParams = values.getBoolean( ASSERT_FAULT_TO_REF_PARAMS );
    }

    wsaAssertionConfiguration = new WsaAssertionConfiguration( assertWsaAction, assertWsaTo, false, false,
        assertWsaRelatesTo, assertReplyToRefParams, assertFaultToRefParams );
    setConfiguration( createConfiguration() );
View Full Code Here

TOP

Related Classes of com.eviware.soapui.support.types.StringToStringMap

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.