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

Examples of com.eviware.soapui.impl.wsdl.panels.teststeps.amf.AMFResponse


    public StringToStringsMap getHeaders()
    {
      if( testStep.getAMFRequest().getResponse() != null )
      {
        AMFResponse response = testStep.getAMFRequest().getResponse();
        return response.getResponseHeaders();
      }
      else
        return new StringToStringsMap();
    }
View Full Code Here


      if( !initAmfRequest( runContext ) )
      {
        throw new SubmitException( "AMF request is not initialised properly !" );
      }
      submit = amfRequest.submit( runContext, false );
      AMFResponse response = submit.getResponse();

      if( submit.getStatus() != Submit.Status.CANCELED )
      {
        if( submit.getStatus() == Submit.Status.ERROR )
        {
          testStepResult.setStatus( TestStepStatus.FAILED );
          testStepResult.addMessage( submit.getError().toString() );

          amfRequest.setResponse( null );
        }
        else if( response == null )
        {
          testStepResult.setStatus( TestStepStatus.FAILED );
          testStepResult.addMessage( "Request is missing response" );

          amfRequest.setResponse( null );
        }
        else
        {
          runContext.setProperty( AssertedXPathsContainer.ASSERTEDXPATHSCONTAINER_PROPERTY, testStepResult );
          amfRequest.setResponse( response );

          testStepResult.setTimeTaken( response.getTimeTaken() );
          testStepResult.setSize( response.getContentLength() );

          switch( amfRequest.getAssertionStatus() )
          {
          case FAILED :
            testStepResult.setStatus( TestStepStatus.FAILED );
            break;
          case VALID :
            testStepResult.setStatus( TestStepStatus.OK );
            break;
          case UNKNOWN :
            testStepResult.setStatus( TestStepStatus.UNKNOWN );
            break;
          }

          testStepResult.setResponse( response, testStepResult.getStatus() != TestStepStatus.FAILED );
        }
      }
      else
      {
        testStepResult.setStatus( TestStepStatus.CANCELED );
        testStepResult.addMessage( "Request was canceled" );
      }

      if( response != null )
        testStepResult.setRequestContent( response.getRequestContent() );
      else
        testStepResult.setRequestContent( amfRequest.getRequestContent() );

      testStepResult.stopTimer();
    }
View Full Code Here

    return amfRequest;
  }

  public void setResponse( AMFResponse response, SubmitContext context )
  {
    AMFResponse oldResponse = amfRequest.getResponse();
    amfRequest.setResponse( response );

    notifyPropertyChanged( RESPONSE_PROPERTY, oldResponse, response );
    assertResponse( context );
  }
View Full Code Here

        try {
            if (!initAmfRequest(runContext)) {
                throw new SubmitException("AMF request is not initialised properly !");
            }
            submit = amfRequest.submit(runContext, false);
            AMFResponse response = submit.getResponse();

            if (submit.getStatus() != Submit.Status.CANCELED) {
                if (submit.getStatus() == Submit.Status.ERROR) {
                    testStepResult.setStatus(TestStepStatus.FAILED);
                    testStepResult.addMessage(submit.getError().toString());

                    amfRequest.setResponse(null);
                } else if (response == null) {
                    testStepResult.setStatus(TestStepStatus.FAILED);
                    testStepResult.addMessage("Request is missing response");

                    amfRequest.setResponse(null);
                } else {
                    runContext.setProperty(AssertedXPathsContainer.ASSERTEDXPATHSCONTAINER_PROPERTY, testStepResult);
                    amfRequest.setResponse(response);

                    testStepResult.setTimeTaken(response.getTimeTaken());
                    testStepResult.setSize(response.getContentLength());

                    switch (amfRequest.getAssertionStatus()) {
                        case FAILED:
                            testStepResult.setStatus(TestStepStatus.FAILED);
                            break;
                        case VALID:
                            testStepResult.setStatus(TestStepStatus.OK);
                            break;
                        case UNKNOWN:
                            testStepResult.setStatus(TestStepStatus.UNKNOWN);
                            break;
                    }

                    testStepResult.setResponse(response, testStepResult.getStatus() != TestStepStatus.FAILED);
                }
            } else {
                testStepResult.setStatus(TestStepStatus.CANCELED);
                testStepResult.addMessage("Request was canceled");
            }

            if (response != null) {
                testStepResult.setRequestContent(response.getRequestContent());
            } else {
                testStepResult.setRequestContent(amfRequest.getRequestContent());
            }

            testStepResult.stopTimer();
View Full Code Here

    public AMFRequest getAMFRequest() {
        return amfRequest;
    }

    public void setResponse(AMFResponse response, SubmitContext context) {
        AMFResponse oldResponse = amfRequest.getResponse();
        amfRequest.setResponse(response);

        notifyPropertyChanged(RESPONSE_PROPERTY, oldResponse, response);
        assertResponse(context);
    }
View Full Code Here

            this.testStep.getAMFRequest().addPropertyChangeListener(AMFRequest.AMF_RESPONSE_PROPERTY, this);
        }

        public StringToStringsMap getHeaders() {
            if (testStep.getAMFRequest().getResponse() != null) {
                AMFResponse response = testStep.getAMFRequest().getResponse();
                return response.getResponseHeaders();
            } else {
                return new StringToStringsMap();
            }
        }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.wsdl.panels.teststeps.amf.AMFResponse

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.