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

Examples of com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequest


        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 )
    {
      WsdlMockResponse mockResponse = ( WsdlMockResponse )modelItem;
View Full Code Here


    protected ValidationError[] validateXml( String xml )
    {
      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() );
View Full Code Here

    return true;
  }

  public JPanel buildOverviewPanel( WsdlTestRequestStep testStep )
  {
    WsdlTestRequest request = testStep.getTestRequest();
    JPropertiesTable<WsdlTestRequest> table = new JPropertiesTable<WsdlTestRequest>( "TestRequest Properties" );

    // basic properties
    table.addProperty( "Name", "name", true );
    table.addProperty( "Description", "description", true );
    table.addProperty( "Message Size", "contentLength", false );
    table.addProperty( "Encoding", "encoding", new String[] { null, "UTF-8", "iso-8859-1" } );
    table.addProperty( "Endpoint", "endpoint", request.getInterface() == null ? new String[0] : request
        .getInterface().getEndpoints() );
    table.addProperty( "Timeout", "timeout", true );
    table.addProperty( "Bind Address", "bindAddress", true );
    table.addProperty( "Follow Redirects", "followRedirects", JPropertiesTable.BOOLEAN_OPTIONS );

    table.addProperty( "Interface", "interfaceName" );
    table.addProperty( "Operation", "operationName" );

    // security / authentication
    table.addProperty( "Username", "username", true );
    table.addPropertyShadow( "Password", "password", true );
    table.addProperty( "Domain", "domain", true );
    table.addProperty( "WSS-Password Type", "wssPasswordType", new String[] { WsdlRequest.PW_TYPE_NONE,
        WsdlRequest.PW_TYPE_TEXT, WsdlRequest.PW_TYPE_DIGEST } );
    table.addProperty( "WSS TimeToLive", "wssTimeToLive", true );

    StringList keystores = new StringList( request.getOperation().getInterface().getProject().getWssContainer()
        .getCryptoNames() );
    keystores.add( 0, null );
    table.addProperty( "SSL Keystore", "sslKeystore", keystores.toStringArray() );

    table.addProperty( "Skip SOAP Action", "skipSoapAction", JPropertiesTable.BOOLEAN_OPTIONS );
View Full Code Here

          {
            WsdlTestRequestStep test = ( WsdlTestRequestStep )testCase.insertTestStep(
                WsdlTestRequestStepFactory.createConfig( me.getOperation(), "Monitor Request " + ( row + 1 ) ),
                -1 );

            WsdlTestRequest request = test.getTestRequest();
            request.setRequestContent( me.getRequestContent() );
            request.setEndpoint( me.getTargetUrl().toString() );
            request.setIncomingWss( incomingRequestWss );

            Attachment[] requestAttachments = me.getRequestAttachments();
            if( requestAttachments != null )
            {
              for( Attachment attachment : requestAttachments )
              {
                request.importAttachment( attachment );
              }
            }
          }
          else
          {

            // if( me.getResponseContentType().contains( "/x-amf" ) )
            // {
            // AMFRequestStepFactory httpRequestStepFactory = new
            // AMFRequestStepFactory();
            // AMFRequestTestStep test = ( AMFRequestTestStep
            // )testCase.insertTestStep( httpRequestStepFactory
            // .createConfig( me, "Monitor Request " + ( row + 1 ) ), -1
            // );
            //
            // AMFRequest request = test.getAMFRequest();
            // // request.setRequestContent( me.getRequestContent() );
            // request.setEndpoint( me.getTargetUrl().toString() );
            // request.setHttpHeaders( me.getRequestHeaders() );
            //
            // }
            // else
            // {
            HttpRequestStepFactory httpRequestStepFactory = new HttpRequestStepFactory();
            HttpTestRequestStep test = ( HttpTestRequestStep )testCase.insertTestStep(
                httpRequestStepFactory.createConfig( me, "Monitor Request " + ( row + 1 ) ), -1 );

            test.getTestRequest().setRequestHeaders( excludeHeaders( me.getRequestHeaders() ) );

            HttpTestRequest request = ( HttpTestRequest )test.getHttpRequest();

            request.setEndpoint( me.getTargetUrl().toString() );
            // request.setIncomingWss( incomingRequestWss );
            String existingMediaType = me.getResponseHeaders().get( "Content-Type", "" );
            if( !StringUtils.isNullOrEmpty( existingMediaType ) )
            {
              request.setMediaType( existingMediaType );
            }
            if( "application/octet-stream".equals( existingMediaType )
                || "application/x-amf".equals( existingMediaType ) )
            {
              request.attachBinaryData( me.getRequestContent().getBytes(), existingMediaType );
            }
            else
            {
              request.setRequestContent( me.getRequestContent() );
              test.getTestRequest().setRequestContent( me.getRequestContent() );
            }
            Attachment[] requestAttachments = me.getRequestAttachments();
            if( requestAttachments != null )
            {
              for( Attachment attachment : requestAttachments )
              {
                request.importAttachment( attachment );
              }
            }
            // }

          }
View Full Code Here

        for( int c = 0; c < testStepCount; c++ )
        {
          WsdlTestStep testStep = ( WsdlTestStep )testCase.getTestStepAt( c );
          if( testStep instanceof WsdlTestRequestStep )
          {
            WsdlTestRequest testRequest = ( ( WsdlTestRequestStep )testStep ).getTestRequest();
            if( testRequest != null && testRequest.getOperation() != null
                && testRequest.getOperation().getInterface() == iface )
            {
              String newRequest = testRequest.getOperation().createRequest( buildOptional );

              if( keepHeaders )
              {
                newRequest = SoapUtils.transferSoapHeaders( testRequest.getRequestContent(), newRequest,
                    iface.getSoapVersion() );
              }

              if( keepExisting )
                newRequest = XmlUtils.transferValues( testRequest.getRequestContent(), newRequest );

              // changed?
              if( !newRequest.equals( testRequest.getRequestContent() ) )
              {
                if( createBackups )
                {
                  ( ( WsdlTestCase )testCase ).importTestStep( testStep,
                      "Backup of [" + testStep.getName() + "]", -1, true ).setDisabled( true );
View Full Code Here

        {
          UISupport.showErrorMessage( "Request creation failed" );
          return;
        }

        WsdlTestRequest request = target.getTestRequest();
        if( dialog.getBooleanValue( Form.KEEP_EXISTING ) )
        {
          req = XmlUtils.transferValues( request.getRequestContent(), req );
        }

        request.setRequestContent( req );
      }
    }
  }
View Full Code Here

                  httpRequest.setUsername( defaults.getUsername() );
                  httpRequest.setPassword( defaults.getPassword() );
                  httpRequest.setDomain( defaults.getDomain() );
                  if( httpRequest instanceof WsdlRequest )
                  {
                    WsdlTestRequest testRequest = ( WsdlTestRequest )httpRequest;
                    testRequest.setWssPasswordType( defaults.getWssType() );
                    testRequest.setWssTimeToLive( defaults.getWssTimeToLive() );
                    testRequest.setOutgoingWss( defaults.getOutgoingWss() );
                    testRequest.setIncomingWss( defaults.getIncomingWss() );
                  }
                }
              }
            }
          }
View Full Code Here

      {
        TestPropertyHolder previousStep = getCurrentTransfer().getSourceStep();

        if( previousStep instanceof WsdlTestRequestStep )
        {
          WsdlTestRequest testRequest = ( ( WsdlTestRequestStep )previousStep ).getTestRequest();
          sourceArea.setText( XmlUtils.declareXPathNamespaces( testRequest.getOperation().getInterface() )
              + sourceArea.getText() );
        }
        else
          UISupport.showErrorMessage( "Property Source is not a Request" );

        TestPropertyHolder nextStep = getCurrentTransfer().getTargetStep();

        if( nextStep instanceof WsdlTestRequestStep )
        {
          WsdlTestRequest testRequest = ( ( WsdlTestRequestStep )nextStep ).getTestRequest();
          targetArea.setText( XmlUtils.declareXPathNamespaces( testRequest.getOperation().getInterface() )
              + targetArea.getText() );
        }
        else
          UISupport.showErrorMessage( "Property Target is not a Request" );
      }
View Full Code Here

                    if (me.getOperation() != null) {
                        WsdlTestRequestStep test = (WsdlTestRequestStep) testCase.insertTestStep(
                                WsdlTestRequestStepFactory.createConfig(me.getOperation(), "Monitor Request " + (row + 1)),
                                -1);

                        WsdlTestRequest request = test.getTestRequest();
                        request.setRequestContent(me.getRequestContent());
                        request.setEndpoint(me.getTargetUrl().toString());
                        request.setIncomingWss(incomingRequestWss);

                        Attachment[] requestAttachments = me.getRequestAttachments();
                        if (requestAttachments != null) {
                            for (Attachment attachment : requestAttachments) {
                                request.importAttachment(attachment);
                            }
                        }
                    } else {
                        HttpRequestStepFactory httpRequestStepFactory = new HttpRequestStepFactory();
                        HttpTestRequestStep test = (HttpTestRequestStep) testCase.insertTestStep(
                                httpRequestStepFactory.createConfig(me, "Monitor Request " + (row + 1)), -1);

                        test.getTestRequest().setRequestHeaders(excludeProxyHeaders(me.getRequestHeaders()));

                        HttpTestRequest request = (HttpTestRequest) test.getHttpRequest();

                        request.setEndpoint(me.getTargetUrl().toString());
                        // request.setIncomingWss( incomingRequestWss );
                        String existingMediaType = me.getResponseHeaders().get("Content-Type", "");
                        if (!StringUtils.isNullOrEmpty(existingMediaType)) {
                            request.setMediaType(existingMediaType);
                        }
                        if ("application/octet-stream".equals(existingMediaType)
                                || "application/x-amf".equals(existingMediaType)) {
                            request.attachBinaryData(me.getRequestContent().getBytes(), existingMediaType);
                        } else {
                            request.setRequestContent(me.getRequestContent());
                            test.getTestRequest().setRequestContent(me.getRequestContent());
                        }
                        Attachment[] requestAttachments = me.getRequestAttachments();
                        if (requestAttachments != null) {
                            for (Attachment attachment : requestAttachments) {
                                request.importAttachment(attachment);
                            }
                        }
                        // }

                    }
View Full Code Here

                                    httpRequest.setUsername(defaults.getUsername());
                                    httpRequest.setPassword(defaults.getPassword());
                                    httpRequest.setDomain(defaults.getDomain());
                                    if (httpRequest instanceof WsdlRequest) {
                                        WsdlTestRequest testRequest = (WsdlTestRequest) httpRequest;
                                        testRequest.setWssPasswordType(defaults.getWssType());
                                        testRequest.setWssTimeToLive(defaults.getWssTimeToLive());
                                        testRequest.setOutgoingWss(defaults.getOutgoingWss());
                                        testRequest.setIncomingWss(defaults.getIncomingWss());
                                    }
                                }
                            }
                        }
                    }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequest

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.