<div dir="ltr"><div>Hi,�<div>All I want is the usage of an interface in the client . can the regular rpc client supply me this&gt;�</div><div><br></div><div>and in another note :�</div><div>I am experiencing problems in creating JsonRpcClient.�</div>
<div>when debugging it - it stays on that line forever (doesnt move to the next line of code)</div><div>when attaching the source I see it uses the primitive call of the RpcClient when it asks�</div><div>system.describe. I dont see it reaches to the server.�</div>
<div>Should I supply something ?�</div><div>here is my client code�</div><div><pre>JsonRpcClient client = null;
Connection conn = null;
Channel ch;
try {
       ConnectionFactory ConnFactory = new ConnectionFactory();
       ConnFactory.setHost(props.getProperty(&quot;Host&quot;));
       ConnFactory.setPort(Integer.parseInt(props.getProperty(&quot;Port&quot;)));
       conn = ConnFactory.newConnection();
       ch = conn.createChannel();
       Channel channel = getServerChannel().getChannel();
       client = new JsonRpcClient(channel, &quot;&quot;, &quot;positions&quot;);
} catch (IOException e) {
    throw new RuntimeException(e);
} catch (JsonRpcException e) {
    throw new RuntimeException(e);
}
return (PositionServerServices) client.createProxy(PositionServerServices.class);
<br></pre><pre>And in the server i am doing 
server = new JsonRpcServer(channel, &quot;PositionsQueue&quot;, PositionServerServices.class, positionServerInternalServices);

(and positionServerInternalServices is my implemntor of the interface. )</pre><pre><br></pre><pre>10x</pre></div><div><br></div><br><div class="gmail_quote">On Wed, Mar 23, 2011 at 12:34 PM, Emile Joubert <span dir="ltr">&lt;<a href="mailto:emile@rabbitmq.com" target="_blank">emile@rabbitmq.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
If JSonRpcClient meets your needs then that is great news. Make sure that the JSON serialisation works for all parameters and return values you may wish to use. The JSON implementation is less general than other Java remoting alternatives, but in keeping with AMQP it does have the advantage of being platform-neutral.<br>


<br>
<br>
Regards<br><font color="#888888">
<br>
Emile</font><div><br>
<br>
<br>
<br>
On 23/03/11 10:00, mysurf mail wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
Do you have a solution that lets me use an interface in the client?<br>
I think I found the JSonRpcClient to be the closest<br>
<br>
On Wed, Mar 23, 2011 at 11:37 AM, Emile Joubert &lt;<a href="mailto:emile@rabbitmq.com" target="_blank">emile@rabbitmq.com</a><br></div><div>
&lt;mailto:<a href="mailto:emile@rabbitmq.com" target="_blank">emile@rabbitmq.com</a>&gt;&gt; wrote:<br>
<br>
 � �Hi,<br>
<br>
<br>
 � �On 23/03/11 08:48, mysurf mail wrote:<br>
<br>
 � � � �Hi,<br>
 � � � �I would like to implement an rpc with rabbitmq.<br>
 � � � �As with other rpc frameworks I would like to use an interface<br>
 � � � �(skeleton)<br>
 � � � �in the client and an interface with implementor on the server .<br>
 � � � �Then I would be able to call the remote methods like they were in my<br>
 � � � �local client.<br>
<br>
 � � � �so far I see RpcClient.stringCall which I will need to parse the<br>
 � � � �string<br>
 � � � �request myself.<br>
<br>
 � � � �Is there any implementation as i described ?<br>
<br>
<br>
 � �I assume you want a Java solution - RpcClient and RpcServer comes<br>
 � �closest to what you need. It should be possible to extend those to<br>
 � �work as you describe though.<br>
<br>
 � �The .net client comes with a WCF two-way implementation that defines<br>
 � �interfaces for messages in the way you describe. See the TwoWayTest<br>
 � �calculator example.<br>
</div></blockquote>
</blockquote></div><br></div></div>