I'm relatively new to Spring and I'm having some issues using the HttpInvoker within an applet. Okay, I'm new to applets as well. I did several searches of this site and I did not find anyone else expressing these specific concerns, so I apologize in advance if this has already been addressed...
I am using Spring 1.2RC2. I see 1.2 final has just be released, and I'll start working with that soon. I am currently prototyping a system we'd like to put into production. This is a server (webapp) that fields requests from an applet using the Spring HttpInvoker remoting technology. The application server is JRun 3.1 (yeah, I know it's old), authentication is required (security constraints defined, authentication does occur), and this will all run over HTTPS with a loadbalancer in tow. Both a load balancer cookie and the JRun session cookie must be present in the request in order for it to reach the server code.
Currently, I'm just using plain old HTTP. In my first attempt, I had <applet> parameters generated by a JSP that provided cookie names and values. I used HttpClient (3.0) in the Applet provide the cookies with each request, and things seemed fine.
In the real world, the client browser may well be configured to use a proxy. I did this so I could check out the network traffic using Ethereal (server and client running on my PC, localhost). While I could see the expected HTTP traffic in getting the applet loaded, I never saw the HttpInvoker calls. Then it dawned on me that perhaps the proxy is not being used for those.
I spent some time reading about the Java Plug-in (1.4.2_07), which is installed in the browser (IE). The Sun pages talk about how the plug-in can access the cookies cached by the browser. And, how it can also obtain the proxy settings. It also talks about working over HTTPS. Hmm, that sounds just perfect.
So, how can I take advantage of this using the vanilla HttpInvoker in Spring? While I had to define a CommonsHttpInvokerRequestExecutor bean and an HttpClient instance for using the HTTP client stuff, it seems now I don't have to define anything other than the HttpInvokerProxyFactoryBean for each service interface I wish to invoke. In theory, then, should not the applet then make use of the Java plug-in functionality when making HTTP requests? Does the Spring HttpInvoker somehow bypass it?
When I try to run this way, I get the I/O stream corrupted exception, which is probably because the client is receiving a login page for authentication rather than a serialized Java object.
Thanks for any helpful suggestions. Perhaps this just cannot be done?