Results 1 to 4 of 4

Thread: Spring HTTP Invoker and HTTP Forwarding Proxy

  1. #1
    Join Date
    Jul 2005
    Posts
    4

    Default Spring HTTP Invoker and HTTP Forwarding Proxy

    Hi,

    I am designing a thick client application that needs to do some simple remoting against a spring-enabled web application. One of the requirements for the client is to support forwarding proxies (similar to how one sets up Internet Explorer). I would like to use Spring's HTTP invoker but I am unclear if this protocol will cause problems with real-world HTTP proxies. My understanding is that these HTTP proxies generally have issues when the body of the HTTP request is not used in the way that they expect (param1=value1&param2=value2).

    In looking at the HTTP request that comes from the HTTP invoker I can see that Spring, is in fact, putting the spring-specific invocation as part of the body.

    Does anyone have any real-world cases of using the HTTP invoker with forwarding proxies?

    Thanks very much!

  2. #2
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    335

    Default

    I've been using HTTP based remoting for a number of years and have never experienced any problems with proxies.

    All requests generated by the HTTP invoker are of type POST which means that any proxy must be passed through to the source server and also that the result will not be cached. I suspect the issues you've heard about are related to GET requests.

    HTH

  3. #3
    Join Date
    Jul 2005
    Posts
    4

    Default

    Thanks for the reply. Actually, I was referring specifically to POST. Even the Google API FAQ mentions that proxies may have issues with SOAP requests. http://www.google.com/apis/api_faq.html#tech9

    A SOAP request can be a POST/GET request and according to them proxies aren't 100% compatible. Ideas why?

  4. #4
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    335

    Default

    I'm unaware of these issues and like I said I've never experienced any issues (all of our remoting requests go through at least 2 proxies).

    Basically, if a proxy caches a POST request it is seriously broken but that's not to say that they don't.... If you were to encounter a proxy that is doing this it would be trivial to hack HttpInvokerProxyFactoryBean so that it generated uncacheable requests:

    Code:
    public class UncacheableHttpInvokerProxyFactoryBean extends HttpInvokerProxyFactoryBean {
    
        private static long requestCounter;	
    
        /**
         * Return a unique URL for every request
         */		
        public String getServiceUrl() {
            return super.getServiceUrl() + '?' + (requestCounter++)
        }
    }

Similar Threads

  1. Spring http invoker: retrieving the application context...?
    By gvl@foundation.be in forum Remoting
    Replies: 1
    Last Post: Jun 21st, 2005, 12:59 AM
  2. Replies: 7
    Last Post: Apr 30th, 2005, 05:31 PM
  3. Replies: 1
    Last Post: Dec 17th, 2004, 04:57 AM
  4. New Remoting Strategy: HTTP Invoker
    By tcollins in forum Remoting
    Replies: 12
    Last Post: Oct 13th, 2004, 04:34 PM
  5. HTTP Invoker server in standalone app
    By murrayd in forum Remoting
    Replies: 0
    Last Post: Oct 1st, 2004, 09:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •