Simon,
The service that the reference is wired to is not in the same JVM. At the
moment, the component definition looks like this:
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
targetNamespace="http://osgidistribution"
name="helloworldreference">
<component name="HelloWorldServiceComponent">
<implementation.java class="helloworld.DummyImpl" />
<reference name="helloWorldService">
<interface.java interface="
helloworld.HelloWorldService" />
<binding.ws wsdlElement="
http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/<http://helloworld/#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/>
>
</reference>
</component>
</composite>
I would like to get hold of the proxy corresponding to the reference and add
it to the OSGi registry so that an OSGi bundle which has no knowledge of SCA
can lookup the proxy in its OSGi registry and invoke the service through
this proxy. The OSGi bundle which wants to use this reference is not running
in an SCA runtime. It is running in an OSGi runtime and uses its normal OSGi
registry lookup (with no remote service support) to resolve its references.
We would like to use Tuscany to parse the metadata corresponding to the
reference element above and create a proxy for the remote service which is
then registered with the OSGi registry.
Which code in Tuscany should I look at to create a reference on the fly?
Thank you...
Regards,
Rajini
On 10/5/07, Simon Laws <[EMAIL PROTECTED]> wrote:
>
> On 10/4/07, Rajini Sivaram <[EMAIL PROTECTED]> wrote:
> >
> > Hello,
> >
> > I would like to use Tuscany as a library (rather than a runtime) to
> parse
> > a
> > reference or service definition containing bindings, and obtain a proxy
> to
> > a
> > service.
> >
> > At the moment, I create a composite containing a dummy component with a
> > reference, and then create an SCA domain, add a contribution containing
> > the
> > composite, and then obtain the reference and get a proxy through the
> > runtimeWire. Apart from being very messy, this requires a large number
> of
> > Tuscany modules to be in the classpath.
> >
> > Is there a better way for me to use the modules in Tuscany -
> specifically
> > the bindings modules?
> >
> > Thank you...
> >
> > Regards,
> >
> > Rajini
> >
> Hi Rajini
>
> Is the service you are trying to get a reference to local to the JVM you
> are
> running in?
>
> If yes, what runtime is the component/service running it?
>
> If no, then the tuscany code should already be able to construct a
> reference on the fly for you without you having to go through the process
> of
> creating the dummy component. The code in getService looks in the local
> model and if it can't find the required service creates a unresolved
> reference which will be resolved when you try to use it. This relies on
> using the distributed domain support.
>
> Can you say a bit more about the scenario you are working with?
>
> Regards
>
> Simon
>