It seems that the binding.jsonrpc extension code needs to populate the absolute URI upon endpoint publication. I'll take a look at that.

Thanks,
Raymond
--------------------------------------------------
From: "keinmensch" <[email protected]>
Sent: Wednesday, March 10, 2010 6:48 AM
To: <[email protected]>
Subject: Re: two-nodes-two-vms-test failing

Hi again!
First I want to share the cause for my own "two nodes in two VMs"
program failing:
I forgot to include the following prior to starting the client and
server nodes:
String theBindingType = RMIBinding.TYPE.toString();
System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding",
theBindingType);

Of course I have more questions regarding the different types of
bindings I can use between the nodes:  :-)

First, is there any documentation of the format of the client-config.xml
and server-config.xml files?

Second:
I tried to change the binding type from RMIBinding to JSONRPCBinding and
also added the following line in the client-config and server-config.xml
files:
<binding name="sca:binding.jsonrpc" baseURIs="http://localhost:8080
https://localhost:8082"/>
Starting the server is no problem, but when I run the client I run into
the following exception:
Caused by: org.jabsorb.client.ClientError:
java.lang.IllegalArgumentException: URI is not absolute
   at
org.jabsorb.client.TransportRegistry.createSession(TransportRegistry.java:121)
   at
org.apache.tuscany.sca.binding.jsonrpc.provider.JSONRPCClientInvoker.invoke(JSONRPCClientInvoker.java:55)
   at
org.apache.tuscany.sca.core.invocation.impl.JDKInvocationHandler.invoke(JDKInvocationHandler.java:236)
   at
org.apache.tuscany.sca.core.invocation.impl.JDKInvocationHandler.invoke(JDKInvocationHandler.java:106)
   at $Proxy9.sayHello(Unknown Source)
   at
itest.nodes.HelloWorldClientImpl.initialize(HelloWorldClientImpl.java:49)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at
org.apache.tuscany.sca.implementation.java.invocation.MethodEventInvoker.invokeEvent(MethodEventInvoker.java:43)
   ... 13 more
Caused by: java.lang.IllegalArgumentException: URI is not absolute
   at java.net.URI.toURL(URI.java:1080)
   at
org.jabsorb.client.TransportRegistry.createSession(TransportRegistry.java:116)
   ... 23 more
However, if I replace the target attribute in the <reference> in the
client with an uri attribute containing the absolute URI of the service,
things works as expected between the client and server. I don't consider
this a solution, since the point in this case, as far as I understand,
is dynamic discovery using Tribes.
Enough questions for today!
As always, thanks for all the help!
Ivan



Reply via email to