Пример #1
0
    public Object construct() {
      HttpClientSupport.SoapUIHttpClient httpClient = HttpClientSupport.getHttpClient();
      try {
        Settings soapuiSettings = SoapUI.getSettings();

        HttpClientSupport.applyHttpSettings(getMethod, soapuiSettings);

        httpResponse = httpClient.execute(getMethod, state);
      } catch (Exception e) {
        return e;
      } finally {
        finished = true;
      }

      return null;
    }
  public void filterRequest(SubmitContext context, WsdlRequest wsdlRequest) {
    TimeablePostMethod postMethod =
        (TimeablePostMethod) context.getProperty(BaseHttpRequestTransport.POST_METHOD);

    //	 set maxsize
    Settings settings = wsdlRequest.getSettings();

    // close connections?
    if (settings.getBoolean(HttpSettings.CLOSE_CONNECTIONS))
      postMethod.setRequestHeader("Connection", "close");

    // max size..
    postMethod.setMaxSize(settings.getLong(HttpSettings.MAX_RESPONSE_SIZE, 0));

    // apply global settings
    HttpClientSupport.applyHttpSettings(postMethod, settings);
  }