camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tdlage <tdl...@hotmail.com>
Subject RMI response
Date Tue, 26 Mar 2013 23:00:46 GMT
I want to use my route output body to be the response of my rmi service. But
it doesn´t work.

My interface:

public interface HelloService extends Remote {
	public String sayHello(String name) throws RemoteException;
}

My route:

<route>
    <from
uri="rmi://localhost:1099/helloService?remoteInterfaces=com.test.HelloService"/>
    <setBody><simple>Hello ${body.args[0]}</simple></setBody>
</route>


The client:

Registry registry = LocateRegistry.getRegistry("localhost",1099);
HelloService stub = (HelloService) registry.lookup("helloService");
System.out.println("response: " + stub.sayHello("john"));

And response, expected was "Hello john"
response: null


If i change 
<setBody><simple>Hello ${body.args[0]}</simple></setBody>

to 
<to uri="bean:helloServiceImpl"/> 

it works. 

But i don´t want to implement the service as a bean. My route output body
should be the return object of my rmi call.



--
View this message in context: http://camel.465427.n5.nabble.com/RMI-response-tp5729876.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message