Package org.apache.cactus.internal.client.connector.http

Examples of org.apache.cactus.internal.client.connector.http.HttpClientConnectionHelper


        {
            // Create a helper that will connect to a restricted resource.
            WebConfiguration webConfig = (WebConfiguration) theConfiguration;
            resource = webConfig.getRedirectorURL(theRequest);

            HttpClientConnectionHelper helper =
                new HttpClientConnectionHelper(resource);

            WebRequest request =
                new WebRequestImpl((WebConfiguration) theConfiguration);

            // Make the connection using a default web request.
            connection = helper.connect(request, theConfiguration);

            checkPreAuthResponse(connection);
        }
        catch (Throwable e)
        {
View Full Code Here


            theConfiguration);
   
        try
        {
            // Create a helper that will connect to the security check URL.
            HttpClientConnectionHelper helper =
                new HttpClientConnectionHelper(
                    getSecurityCheckURL(theConfiguration).toString());

            // Configure a web request with the JSESSIONID cookie,
            // the username and the password.
            WebRequest request = getSecurityRequest();
            ((WebRequestImpl) request).setConfiguration(theConfiguration);
            request.addCookie(this.jsessionCookie);
            request.addParameter("j_username", getName(),
                WebRequest.POST_METHOD);
            request.addParameter("j_password", getPassword(),
                WebRequest.POST_METHOD);

            // Make the connection using the configured web request.
            HttpURLConnection connection = helper.connect(request,
                theConfiguration);

            checkAuthResponse(connection);       
        }
        catch (Throwable e)
View Full Code Here

        {
            throw new ChainedRuntimeException("setConfiguration() should have "
                + "been called prior to calling getSessionCookie()");
        }
       
        HttpClientConnectionHelper helper =
            new HttpClientConnectionHelper(
                ((WebConfiguration) getConfiguration()).getRedirectorURL(this));

        WebRequestImpl obtainSessionIdRequest = new WebRequestImpl(
            (WebConfiguration) getConfiguration());
           
       
        //Not sure whether I should be adding the service parameter to
        //this request (this) or to the obtainSessionIdRequest
        //seems obvious that it should be the obtainSessionIdRequest
        RequestDirectives directives =
            new RequestDirectives(obtainSessionIdRequest);
        directives.setService(ServiceEnumeration.CREATE_SESSION_SERVICE);

        HttpURLConnection resultConnection;
        try
        {
            resultConnection =
                helper.connect(obtainSessionIdRequest, getConfiguration());
        }
        catch (Throwable e)
        {
            throw new ChainedRuntimeException("Failed to connect to ["
                + ((WebConfiguration) getConfiguration()).getRedirectorURL(this)
View Full Code Here

        {
            throw new ChainedRuntimeException("setConfiguration() should have "
                + "been called prior to calling getSessionCookie()");
        }
       
        HttpClientConnectionHelper helper =
            new HttpClientConnectionHelper(
                ((WebConfiguration) getConfiguration()).getRedirectorURL(this));

        WebRequestImpl obtainSessionIdRequest = new WebRequestImpl(
            (WebConfiguration) getConfiguration());
           
       
        //Not sure whether I should be adding the service parameter to
        //this request (this) or to the obtainSessionIdRequest
        //seems obvious that it should be the obtainSessionIdRequest
        RequestDirectives directives =
            new RequestDirectives(obtainSessionIdRequest);
        directives.setService(ServiceEnumeration.CREATE_SESSION_SERVICE);

        HttpURLConnection resultConnection;
        try
        {
            resultConnection =
                helper.connect(obtainSessionIdRequest, getConfiguration());
        }
        catch (Throwable e)
        {
            throw new ChainedRuntimeException("Failed to connect to ["
                + ((WebConfiguration) getConfiguration()).getRedirectorURL(this)
View Full Code Here

        {
            // Create a helper that will connect to a restricted resource.
            WebConfiguration webConfig = (WebConfiguration) theConfiguration;
            resource = webConfig.getRedirectorURL(theRequest);

            HttpClientConnectionHelper helper =
                new HttpClientConnectionHelper(resource);

            WebRequest request =
                new WebRequestImpl((WebConfiguration) theConfiguration);

            // Make the connection using a default web request.
            connection = helper.connect(request, theConfiguration);

            checkPreAuthResponse(connection);
        }
        catch (Throwable e)
        {
View Full Code Here

            theConfiguration);
   
        try
        {
            // Create a helper that will connect to the security check URL.
            HttpClientConnectionHelper helper =
                new HttpClientConnectionHelper(
                    getSecurityCheckURL(theConfiguration).toString());

            // Configure a web request with the JSESSIONID cookie,
            // the username and the password.
            WebRequest request = getSecurityRequest();
            ((WebRequestImpl) request).setConfiguration(theConfiguration);
            request.addCookie(this.jsessionCookie);
            request.addParameter("j_username", getName(),
                WebRequest.POST_METHOD);
            request.addParameter("j_password", getPassword(),
                WebRequest.POST_METHOD);

            // Make the connection using the configured web request.
            HttpURLConnection connection = helper.connect(request,
                theConfiguration);

            checkAuthResponse(connection);       
        }
        catch (Throwable e)
View Full Code Here

        {
            throw new ChainedRuntimeException("setConfiguration() should have "
                + "been called prior to calling getSessionCookie()");
        }
       
        HttpClientConnectionHelper helper =
            new HttpClientConnectionHelper(
                ((WebConfiguration) getConfiguration()).getRedirectorURL(this));

        WebRequestImpl obtainSessionIdRequest = new WebRequestImpl(
            (WebConfiguration) getConfiguration());
           
       
        //Not sure whether I should be adding the service parameter to
        //this request (this) or to the obtainSessionIdRequest
        //seems obvious that it should be the obtainSessionIdRequest
        RequestDirectives directives =
            new RequestDirectives(obtainSessionIdRequest);
        directives.setService(ServiceEnumeration.CREATE_SESSION_SERVICE);

        HttpURLConnection resultConnection;
        try
        {
            resultConnection =
                helper.connect(obtainSessionIdRequest, getConfiguration());
        }
        catch (Throwable e)
        {
            throw new ChainedRuntimeException("Failed to connect to ["
                + ((WebConfiguration) getConfiguration()).getRedirectorURL(this)
View Full Code Here

        {
            throw new ChainedRuntimeException("setConfiguration() should have "
                + "been called prior to calling getSessionCookie()");
        }
       
        HttpClientConnectionHelper helper =
            new HttpClientConnectionHelper(
                ((WebConfiguration) getConfiguration()).getRedirectorURL(this));

        WebRequestImpl obtainSessionIdRequest = new WebRequestImpl(
            (WebConfiguration) getConfiguration());
           
       
        //Not sure whether I should be adding the service parameter to
        //this request (this) or to the obtainSessionIdRequest
        //seems obvious that it should be the obtainSessionIdRequest
        RequestDirectives directives =
            new RequestDirectives(obtainSessionIdRequest);
        directives.setService(ServiceEnumeration.CREATE_SESSION_SERVICE);

        HttpURLConnection resultConnection;
        try
        {
            resultConnection =
                helper.connect(obtainSessionIdRequest, getConfiguration());
        }
        catch (Throwable e)
        {
            throw new ChainedRuntimeException("Failed to connect to ["
                + ((WebConfiguration) getConfiguration()).getRedirectorURL(this)
View Full Code Here

        {
            // Create a helper that will connect to a restricted resource.
            WebConfiguration webConfig = (WebConfiguration) theConfiguration;
            resource = webConfig.getRedirectorURL(theRequest);

            HttpClientConnectionHelper helper =
                new HttpClientConnectionHelper(resource);

            WebRequest request =
                new WebRequestImpl((WebConfiguration) theConfiguration);

            // Make the connection using a default web request.
            connection = helper.connect(request, theConfiguration);

            checkPreAuthResponse(connection);
        }
        catch (Throwable e)
        {
View Full Code Here

            theConfiguration);
   
        try
        {
            // Create a helper that will connect to the security check URL.
            HttpClientConnectionHelper helper =
                new HttpClientConnectionHelper(
                    getSecurityCheckURL(theConfiguration).toString());

            // Configure a web request with the JSESSIONID cookie,
            // the username and the password.
            WebRequest request = getSecurityRequest();
            ((WebRequestImpl) request).setConfiguration(theConfiguration);
            request.addCookie(this.jsessionCookie);
            request.addParameter("j_username", getName(),
                WebRequest.POST_METHOD);
            request.addParameter("j_password", getPassword(),
                WebRequest.POST_METHOD);

            // Make the connection using the configured web request.
            HttpURLConnection connection = helper.connect(request,
                theConfiguration);

            checkAuthResponse(connection);       
        }
        catch (Throwable e)
View Full Code Here

TOP

Related Classes of org.apache.cactus.internal.client.connector.http.HttpClientConnectionHelper

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.