jaz6ix
11-01-2009, 01:01 PM
Hello,
I installed Hessian as a servlet on Glassfish server and got my JavaFX client talking with the servlet using the HelloWord example.
Now, I need to set a Basic Authentication header on the client side. How do I write headers for Hessian?
Here is the working code, but without any custom headers:
public void hello() {
String url = "http://localhost:8080/server-war/BasicService";
HessianProxyFactory factory = new HessianProxyFactory();
try {
BasicAPI basic = (BasicAPI) factory.create(BasicAPI.class, url);
System.out.println("hello(): " + basic.hello());
} catch (Exception e) {}
}
Thank you.
I installed Hessian as a servlet on Glassfish server and got my JavaFX client talking with the servlet using the HelloWord example.
Now, I need to set a Basic Authentication header on the client side. How do I write headers for Hessian?
Here is the working code, but without any custom headers:
public void hello() {
String url = "http://localhost:8080/server-war/BasicService";
HessianProxyFactory factory = new HessianProxyFactory();
try {
BasicAPI basic = (BasicAPI) factory.create(BasicAPI.class, url);
System.out.println("hello(): " + basic.hello());
} catch (Exception e) {}
}
Thank you.