Hi,I've done some request/response work with Qpid lately, and I implemented a Hessian layer to make it easier. I'd like to share it here if ever someone find it useful. The source code is available there:
http://github.com/ebourg/qpid-hessianIf you've already worked with Hessian to do RPC over HTTP the principle is almost identical:
1. Create an interface defining the methods exposed: public interface EchoService { String echo(String message); } 2. Implement the interface and extend the HessianEndpoint class (this is the equivalent of the HessianServlet): public class EchoServiceEndpoint extends HessianEndpoint implements EchoService { public String echo(String message) { return message; } } 3. Deploy the endpoint by attaching it to a Qpid session: EchoServiceEndpoint endpoint = new EchoServiceEndpoint(); endpoint.run(session); 4. On the client side, create a proxy of the interface: AMQPHessianProxyFactory factory = new AMQPHessianProxyFactory();EchoService service = factory.create(EchoService.class, "qpid://guest:gu...@localhost/test");
5. The service is ready to be consumed! String echo = service.echo("Hello Qpid!"); Emmanuel Bourg
smime.p7s
Description: S/MIME Cryptographic Signature