I tried with a composite-level service in the inner composite (Z2) with RMI
binding. The service definition was :
<service name="HelloWorldRmiService" target="HelloWorldServiceComponent">
<interface.java interface="helloworld.HelloWorldRmiService"/>
<rmi:binding.rmi host="localhost" port="1099"
serviceName="HelloWorldRemoteService" />
<reference>HelloWorldRmiServiceComponent</reference>
</service>
The reference to this service from the parent composite (Z1) failed with the
following exception:
java.lang.NullPointerException
at org.apache.tuscany.core.builder.ConnectorImpl.connect(
ConnectorImpl.java:141)
at org.apache.tuscany.core.builder.ConnectorImpl.connect(
ConnectorImpl.java:119)
at
org.apache.tuscany.core.implementation.composite.AbstractCompositeComponent.prepare
(AbstractCompositeComponent.java:241)
at org.apache.tuscany.core.deployer.DeployerImpl.deploy(
DeployerImpl.java:86)
at org.apache.tuscany.core.launcher.LauncherImpl.bootApplication(
LauncherImpl.java:193)
....
However if don't use the RMI binding, I am able to resolve the reference
using the default bindings. I am not sure how to resolve this. Any thoughts
? Is it a limitation that if you have a nested component, then we need to
use the default binding ?
Also in the process I found that the JDKWireService throws an NPE if the
target cannot be resolved. It is so hard to figure out the cause without
debugging. It would be nice to throw a more intutive exception
(TargetNotFoundException ?).
On 9/20/06, Scott Kurz <[EMAIL PROTECTED]> wrote:
Maybe my last phrasing of this question was too confusing, so I'm trying
again. If no one answers this time, I'll give it a try myself by the end
of the week.
=======================================================================================
How is a binding on a service in a nested composite handled?
That is, suppose I deploy top-level composite Z1 which contains component
C1, and that C1 is implemented by composite Z2.
Could I put a WS binding on a composite-level service S of Z2? Would I
need to surface S to the Z1 composite and put a WS binding on the service
surfaced to the Z1-level?
I'd assume I would be able to override the URL the service can be invoked
at
(or some right-hand portion of the URL ) at the Z1 level.
=======================================================================================
Thanks,
Scott
--
Warm regards,
jojo.