Package com.eviware.soapui.model.iface

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


    if( settingResponse )
      return;

    if( evt.getPropertyName().equals( WsdlRequest.RESPONSE_PROPERTY ) )
    {
      Response oldResponse = ( Response )evt.getOldValue();
      Response newResponse = ( Response )evt.getNewValue();

      fireXmlChanged( oldResponse == null ? null : oldResponse.getContentAsString(), newResponse == null ? null
          : newResponse.getContentAsString() );
    }

    if( evt.getPropertyName().equals( WsdlRequest.RESPONSE_CONTENT_PROPERTY ) )
    {
      String oldResponse = ( String )evt.getOldValue();
View Full Code Here


      if( !submitContext.hasProperty( RESPONSE ) )
      {
        createDefaultResponse( submitContext, httpRequest, httpMethod );
      }

      Response response = ( Response )submitContext.getProperty( BaseHttpRequestTransport.RESPONSE );
      StringToStringMap responseProperties = ( StringToStringMap )submitContext
          .getProperty( BaseHttpRequestTransport.RESPONSE_PROPERTIES );

      for( String key : responseProperties.keySet() )
      {
        response.setProperty( key, responseProperties.get( key ) );
      }

      if( httpMethod != null )
      {
        httpMethod.releaseConnection();
View Full Code Here

  {
    String requestContent = ( String )submitContext.getProperty( BaseHttpRequestTransport.REQUEST_CONTENT );

    // check content-type for multiplart
    Header responseContentTypeHeader = httpMethod.getResponseHeader( "Content-Type" );
    Response response = null;

    if( responseContentTypeHeader != null
        && responseContentTypeHeader.getValue().toUpperCase().startsWith( "MULTIPART" ) )
    {
      response = new MimeMessageResponse( httpRequest, httpMethod, requestContent, submitContext );
View Full Code Here

        // submit the request
        WsdlSubmit submit = (WsdlSubmit) request.submit(new WsdlSubmitContext(request), false);

        // wait for the response
        Response response = submit.getResponse();

        // print the response
        String content = response.getContentAsString();
        // System.out.println( content );
        assertNotNull(content);
    }
View Full Code Here

            if (!submitContext.hasProperty(RESPONSE)) {
                createDefaultResponse(submitContext, httpRequest, httpMethod);
            }

            Response response = (Response) submitContext.getProperty(BaseHttpRequestTransport.RESPONSE);
            StringToStringMap responseProperties = (StringToStringMap) submitContext
                    .getProperty(BaseHttpRequestTransport.RESPONSE_PROPERTIES);

            for (String key : responseProperties.keySet()) {
                response.setProperty(key, responseProperties.get(key));
            }

            if (createdContext) {
                submitContext.setProperty(SubmitContext.HTTP_STATE_PROPERTY, null);
            }
View Full Code Here

        if (httpMethod.hasHttpResponse() && httpMethod.getHttpResponse().getEntity() != null) {
            Header h = httpMethod.getHttpResponse().getEntity().getContentType();
            responseContentTypeHeader = h.toString();
        }

        Response response;
        if (responseContentTypeHeader != null && responseContentTypeHeader.toUpperCase().startsWith("MULTIPART")) {
            response = new MimeMessageResponse(httpRequest, httpMethod, requestContent, submitContext);
        } else {
            response = new SinglePartHttpResponse(httpRequest, httpMethod, requestContent, submitContext);
        }
View Full Code Here

    public void filterHttpRequest(SubmitContext context, HttpRequestInterface<?> request) {
    }

    public void afterRequest(SubmitContext context, Request request) {
        // do this for backwards compatibility
        Response response = (Response) context.getProperty(BaseHttpRequestTransport.RESPONSE);
        if (response != null) {
            afterRequest(context, response);
        }

        if (request instanceof AbstractHttpRequestInterface<?>) {
View Full Code Here

            Header[] headers = httpMethod.getHttpResponse().getHeaders("Content-Type");
            if (headers != null && headers.length > 0) {
                responseContentTypeHeader = headers[0];
            }
        }
        Response response = null;
        if (request instanceof WsdlRequest) {
            response = wsdlRequest(context, (WsdlRequest) request, httpMethod, responseContentTypeHeader, requestContent);
        } else if (request instanceof HttpRequestInterface<?>) {
            response = httpRequest(context, (HttpRequestInterface<?>) request, httpMethod, responseContentTypeHeader,
                    requestContent);
View Full Code Here

        return null;
    }

    protected String internalAssertResponse(MessageExchange messageExchange, SubmitContext context)
            throws AssertionException {
        Response response = messageExchange.getResponse();
        long timeTaken = response == null ? messageExchange.getTimeTaken() : response.getTimeTaken();

        // assert!
        if (timeTaken > Long.parseLong(PropertyExpander.expandProperties(context, SLA))) {
            throw new AssertionException(new AssertionError("Response did not meet SLA " + timeTaken + "/" + SLA));
        }
View Full Code Here

            // startSequenceRequest.getWsaConfig().setWsaEnabled(false);
            while (wsdlSubmit.getStatus() != Status.FINISHED) {
                wsdlSubmit.waitUntilFinished();
            }
            Response response = wsdlSubmit.getResponse();
            String responseContent = response.getContentAsString();
            // XmlObject xml = XmlObject.Factory.parse( responseContent );
            XmlObject xml = XmlUtils.createXmlObject(responseContent);
            XmlCursor cursor = xml.newCursor();
            cursor.toFirstContentToken();
            cursor.toFirstChild();
View Full Code Here

TOP

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

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.