Configuration Properties
These properties are set on the Service Registration in the OSGi Service Registry.
Service Provider properties
Note: for backwards compatibility old values marked below are still supported.
Property Name |
Data Type |
Example |
Description |
---|---|---|---|
service.exported.interfaces |
String |
|
Denotes the interfaces to be exposed remotely. This is a comma-separated list of fully qualified Java interfaces that should be made available remotely. A special value of |
service.exported.configs (previously:osgi.remote.configuration.type) |
String |
|
Specifies the mechanism for configuring the service exposure. Possible values:
|
org.apache.cxf.ws
configuration type
When the service.exported.configs=org.apache.cxf.ws
(or osgi.remote.configuration.type=pojo
) property is specified, the following properties may also be specified.
Property Name |
Data Type |
Example |
Description |
---|---|---|---|
org.apache.cxf.ws.address |
String |
{{ http://localhost:9090/greeter![]() }} |
The address at which the service with be made available remotely. If this property is not specified, this defaults to {{ http://localhost:9000/fully/qualified/ClassName![]() }}. |
org.apache.cxf.ws.httpservice.context |
String |
|
When this property is specified, the OSGi HTTP Service is used to expose the service, rather than a dedicated Jetty HTTP Server. This property doesn't allow the specification of a port number, as this is provided by the HTTP Service. The Distributed OSGi distributions come with Pax-Web, for which configuration information can be found here: http://wiki.ops4j.org/display/paxweb/Configuration![]() , however other OSGi HTTP Service implementations are potentially configured differently. |
Service Consumer properties
On client side proxies, typically the same properties are set as on set service provider side. There are some additional properties too. Since the client-side proxy is registered by the DOSGi implementation, all these properties are read-only.
Property Name |
Data Type |
Example |
Description |
---|---|---|---|
service.imported |
boolean |
|
This property is always set on a service proxy, indicating that the real service is remote. |
org.apache.cxf.remote.dsw.client |
String |
|
This property is set to the bundle name of the CXF-DOSGi implementation and can be used to find client side proxies created by the CXF DOSGi implementation. |
The Intent Map
TODO
remote-services.xml
files
The CXF DOSGi implementation provides a DSW (Distribution Software) implementation of Distributed OSGi. It is compatible with any Distributed OSGi Discovery implementation in order to discover remote services dynamically.
However, using a Discovery system is optional, it is also possible to statically configure remote services into the system. This is done by registering one or more bundles containing remote-services.xml
files. By default the system looks for any files with the .xml
extension in the OSGI-INF/remote-service
directory of the bundle.
Here's an example:
<service-descriptions xmlns="http://www.osgi.org/xmlns/sd/v1.0.0"> <service-description> <provide interface="org.apache.cxf.dosgi.samples.greeter.GreeterService" /> <property name="osgi.remote.interfaces">*</property> <property name="osgi.remote.configuration.type">pojo</property> <property name="osgi.remote.configuration.pojo.address">http://localhost:9090/greeter</property> </service-description> <!-- further service-description tags are allowed here --> </service-descriptions>
Alternative locations
By default all *.xml
files in the OSGI-INF/remote-service location are considered, this location can be changed by setting the Remote-Service
header in the bundle manifest, e.g.
Remote-Service: META-INF/osgi