Package com.eviware.soapui.impl.wsdl.submit.transports.http.support.methods

Examples of com.eviware.soapui.impl.wsdl.submit.transports.http.support.methods.ExtendedPostMethod


    InetSocketAddress inetAddress = new InetSocketAddress( sslEndPoint, sslPort );
    HttpServletRequest httpRequest = ( HttpServletRequest )request;
    if( httpRequest.getMethod().equals( "GET" ) )
      postMethod = new ExtendedGetMethod();
    else
      postMethod = new ExtendedPostMethod();

    JProxyServletWsdlMonitorMessageExchange capturedData = new JProxyServletWsdlMonitorMessageExchange( project );
    capturedData.setRequestHost( httpRequest.getRemoteHost() );
    capturedData.setRequestHeader( httpRequest );
    capturedData.setTargetURL( this.prot + inetAddress.getHostName() );
View Full Code Here


{

  @Override
  public void filterWsdlRequest( SubmitContext context, WsdlRequest request )
  {
    ExtendedPostMethod postMethod = ( ExtendedPostMethod )context.getProperty( BaseHttpRequestTransport.HTTP_METHOD );
    String requestContent = ( String )context.getProperty( BaseHttpRequestTransport.REQUEST_CONTENT );

    try
    {
      String content = initWsdlRequest( request, postMethod, requestContent );
View Full Code Here

    ExtendedHttpMethod method;
    HttpServletRequest httpRequest = ( HttpServletRequest )request;
    if( httpRequest.getMethod().equals( "GET" ) )
      method = new ExtendedGetMethod();
    else
      method = new ExtendedPostMethod();

    method.setDecompress( false );

    // for this create ui server and port, properties.
    JProxyServletWsdlMonitorMessageExchange capturedData = new JProxyServletWsdlMonitorMessageExchange( project );
View Full Code Here

   *            If an exception is encountered during URL connection setup.
   */
  protected void internalConnect() throws IOException
  {
    serializationContext.instantiateTypes = false;
    postMethod = new ExtendedPostMethod( url );
    setHttpRequestHeaders();
    actionContext = new ActionContext();
    connected = true;
  }
View Full Code Here

      case TRACE :
        return new ExtendedTraceMethod();
      }
    }

    ExtendedPostMethod extendedPostMethod = new ExtendedPostMethod();

    extendedPostMethod.setAfterRequestInjection( httpRequest.getAfterRequestInjection() );
    return extendedPostMethod;
  }
View Full Code Here

public class WsdlPackagingRequestFilter extends AbstractRequestFilter {

    @Override
    public void filterWsdlRequest(SubmitContext context, WsdlRequest request) {
        ExtendedPostMethod postMethod = (ExtendedPostMethod) context.getProperty(BaseHttpRequestTransport.HTTP_METHOD);
        String requestContent = (String) context.getProperty(BaseHttpRequestTransport.REQUEST_CONTENT);

        try {
            String content = initWsdlRequest(request, postMethod, requestContent);
            if (content != null) {
View Full Code Here

    // FIXME We should do some performance testing of large soapUI project files.
    @Nonnull
    public String sendTestCase(@Nonnull WsdlTestCase testCase, @Nonnull Location location) throws Exception {

        final ExtendedPostMethod post = new ExtendedPostMethod();
        post.setURI(new URI(UPLOAD_URI));

        String locationCode = location.getCode();

        String encodedTestSuiteName = getBase64EncodedString(testCase.getTestSuite().getName().getBytes());
        String encodedTestCaseName = getBase64EncodedString(testCase.getName().getBytes());

        File tempProjectFile = saveTemporaryProject(testCase.getTestSuite().getProject());
        byte[] projectFileData = getBytes(tempProjectFile.getAbsolutePath());
        byte[] zipedProjectFileData = zipBytes(testCase.getTestSuite().getProject().getName(), projectFileData);
        String encodedZipedProjectFile = getBase64EncodedString(zipedProjectFileData);

        String projectPassword = testCase.getTestSuite().getProject().getShadowPassword();
        String encodedProjectPassword = getBase64EncodedString(Strings.nullToEmpty(projectPassword).getBytes());

        String keystoreFilePath = SoapUI.getSettings().getString(SSLSettings.KEYSTORE, "");
        byte[] keystoreFileData = getBytes(keystoreFilePath);
        String encodedKeystoreFile = getBase64EncodedString(keystoreFileData);

        String encodedKeystorePassword = getBase64EncodedString(SoapUI.getSettings()
                .getString(SSLSettings.KEYSTORE_PASSWORD, "").getBytes());

        String requestContent = generateUploadRequestXML(locationCode, encodedTestSuiteName, encodedTestCaseName,
                encodedZipedProjectFile, encodedProjectPassword, encodedKeystoreFile, encodedKeystorePassword);

        byte[] compressedRequestContent = CompressionSupport.compress(CompressionSupport.ALG_GZIP,
                requestContent.getBytes());
        post.setEntity(new ByteArrayEntity(compressedRequestContent));

        Document responseDocument = makeCall(UPLOAD_URI, requestContent);
        String redirectURL = (String) xpath.evaluate(REDIRECT_URL_XPATH_EXPRESSION, responseDocument,
                XPathConstants.STRING);
View Full Code Here

        }
        return tempFile;
    }

    private Document makeCall(String uri, String requestContent) throws Exception {
        final ExtendedPostMethod post = new ExtendedPostMethod();
        post.setURI(new URI(uri));

        post.setEntity(new StringEntity(requestContent));

        // FIXME Should we remove the logging printouts before release? The upload request maybe would be to large?

        log.debug("Sending request to " + uri);
        log.debug(requestContent);

        HttpClientSupport.execute(post);

        byte[] responseBody = post.getResponseBody();

        log.debug("Got response from " + uri);
        log.debug(new String(responseBody));

        String reponseBodyAsString = new String(responseBody);
View Full Code Here

     *
     * @throws IOException If an exception is encountered during URL connection setup.
     */
    protected void internalConnect() throws IOException {
        serializationContext.instantiateTypes = false;
        postMethod = new ExtendedPostMethod(url);
        setHttpRequestHeaders();
        actionContext = new ActionContext();
        connected = true;
    }
View Full Code Here

        tunnelServlet = new TunnelServlet(project, sslEndPoint, listenerCallBack);
    }

    @Test
    public void shouldSetHttpProtocolVersion_1_1_ToRequest() {
        ExtendedPostMethod extendedPostMethod = new ExtendedPostMethod();
        tunnelServlet.setProtocolversion(extendedPostMethod, HttpVersion.HTTP_1_1.toString());
        Assert.assertEquals("The copied version doesn't match with the provided version string",
                HttpVersion.HTTP_1_1, extendedPostMethod.getProtocolVersion());
    }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.wsdl.submit.transports.http.support.methods.ExtendedPostMethod

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.