Java Reference
In-Depth Information
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
<endpoint-description>
<property
name="objectClass"
value="fancyfoods.offers.SpecialOffer" />
Type of endpoint
to import
<property
name="remote.configs.supported"
value="org.osgi.sca" />
<property
name="service.imported.configs"
value="org.osgi.sca" />
<property
name="org.osgi.sca.bindings">
<list>
<value>{http://fancyfoods}ForeignFood</value>
</list>
</property>
</endpoint-description>
</endpoint-descriptions>
This is similar to the remote services configuration file you defined in listing 10.5. But
the details of the configuration are different, because you're using a different remote
services implementation. You set the
service.imported.configs
property to
org.osgi.sca
. Instead of providing lookup information for the service directly, as you
did in listing 10.5, you provide a reference to an
SCA
binding
by specifying a
org.osgi.sca.bindings
property.
The
SCA
bindings are set in a small
SCA
configuration file, as shown in the follow-
ing listing.
Pointer to endpoint
configuration
Listing 10.8
The SCA configuration for a WSDL binding of a remote service
<scact:sca-config
targetNamespace="http://fancyfoods"
xmlns:scact="http://www.osgi.org/xmlns/scact/v1.0.0"
xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912">
<sca:binding.ws
name="ForeignFood"
uri="http://localhost:8081/foreignfood" />
</scact:sca-config>
Finally, you'll need to add two extra headers to your manifest, so that
SCA
can find the
remote services and
SCA
configuration files:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: fancyfoods.remote.config.sca
Bundle-Version: 1.0.0
Import-Package: fancyfoods.food;version="[1.0.0,2.0.0)",
fancyfoods.offers;version="[1.0.0,2.0.0)"
Remote-Service: OSGI-INF/remote-service/*.xml
SCA-Configuration: OSGI-INF/sca-config/food-config.xml






