public Response invoke(Request request) throws IOException {
        Assert.isNotNull(request);

        try {
            open();

            URL resourceUrl = request.getResourceUrl();
            URL originServerUrl = new URL(resourceUrl.getProtocol(), resourceUrl.getHost(), resourceUrl.getPort(), "/"); //$NON-NLS-1$

            URL proxyServerUrl = getProxyServerUrl(originServerUrl);
            if (proxyServerUrl == null && !matchesProxyServerException(originServerUrl)) {
                proxyServerUrl = getDefaultProxyServerUrl();
            }

            IContext context = webDAVFactory.newContext(request.getContext());

            IContext defaultContext = getContext(originServerUrl);
            if (defaultContext == null) {
                defaultContext = getDefaultContext();
            }

            if (defaultContext != null) {
                Enumeration e = defaultContext.keys();
                while (e.hasMoreElements()) {
                    String key = (String) e.nextElement();
                    context.put(key, defaultContext.get(key));
                }
            }

            if (authority != null) {
                authority.authorize(request, null, context, proxyServerUrl, true);
                authority.authorize(request, null, context, proxyServerUrl, false);
            }

            return invoke1(request, context, proxyServerUrl, originServerUrl, 0, 0);
        } finally {
            request.close();
        }
    }
public Response invoke(Request request) throws IOException {
        Assert.isNotNull(request);

        try {
            open();

            URL resourceUrl = request.getResourceUrl();
            URL originServerUrl = new URL(resourceUrl.getProtocol(), resourceUrl.getHost(), resourceUrl.getPort(), "/"); 

            URL proxyServerUrl = getProxyServerUrl(originServerUrl);
            if (proxyServerUrl == null && !matchesProxyServerException(originServerUrl)) {
                proxyServerUrl = getDefaultProxyServerUrl();
            }

            IContext context = webDAVFactory.newContext(request.getContext());

            IContext defaultContext = getContext(originServerUrl);
            if (defaultContext == null) {
                defaultContext = getDefaultContext();
            }

            if (defaultContext != null) {
                Enumeration e = defaultContext.keys();
                while (e.hasMoreElements()) {
                    String key = (String) e.nextElement();
                    context.put(key, defaultContext.get(key));
                }
            }

            if (authority != null) {
                authority.authorize(request, null, context, proxyServerUrl, true);
                authority.authorize(request, null, context, proxyServerUrl, false);
            }

            return invoke1(request, context, proxyServerUrl, originServerUrl, 0, 0);
        } finally {
            request.close();
        }
    }
public Response invoke ( Request request ) throws IOException { Assert . isNotNull ( request ) ; try { open ( ) ; URL resourceUrl = request . getResourceUrl ( ) ; URL originServerUrl = new URL ( resourceUrl . getProtocol ( ) , resourceUrl . getHost ( ) , resourceUrl . getPort ( ) , "/" ) ; //$NON-NLS-1$ URL proxyServerUrl = getProxyServerUrl ( originServerUrl ) ; if ( proxyServerUrl == null && ! matchesProxyServerException ( originServerUrl ) ) { proxyServerUrl = getDefaultProxyServerUrl ( ) ; } IContext context = webDAVFactory . newContext ( request . getContext ( ) ) ; IContext defaultContext = getContext ( originServerUrl ) ; if ( defaultContext == null ) { defaultContext = getDefaultContext ( ) ; } if ( defaultContext != null ) { Enumeration e = defaultContext . keys ( ) ; while ( e . hasMoreElements ( ) ) { String key = ( String ) e . nextElement ( ) ; context . put ( key , defaultContext . get ( key ) ) ; } } if ( authority != null ) { authority . authorize ( request , null , context , proxyServerUrl , true ) ; authority . authorize ( request , null , context , proxyServerUrl , false ) ; } return invoke1 ( request , context , proxyServerUrl , originServerUrl , 0 , 0 ) ; } finally { request . close ( ) ; } }
Sends the given request to the server and returns the server's
response.

@param request the request to send to the server
@return the server's response
@throws IOException if an I/O error occurs. Reasons include:
<ul>
<li>The client is closed.
<li>The client could not connect to the server
<li>An I/O error occurs while communicating with the server
<ul>
Sends the given request to the server and returns the server s response .