Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Property Name

Data Type

Example

Description

org.apache.cxf.ws.address
(previously:osgi.remote.configuration.pojo.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
(previously:osgi.remote.configuration.pojo.httpservice.context)

String

/auction

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.

org.apache.cxf.ws.frontend

String

jaxws

The CXF frontend which will be used to create endpoints. Defaults to 'simple' which is an Aegis-based simple frontend. Note that for JAXWS to work a javax.jws.* has to be imported into the interface and/or implementation and client bundles for annotations like @WebService and @WebMethod be recognized

org.apache.cxf.ws.databinding

String

jaxb

Supported values are 'aegis and 'jaxb', defaults to 'aegis'. Note that for JAXB to work JAXB packages like javax.xml.bind.annotation.* have to be imported

Service Provider properties For Configuring RESTful JAXRS-based endpoints and consumers

...

Property Name

Data Type

Example

Description

org.apache.cxf.rs.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.rs.httpservice.context

String

/auction

When this property is specified, the OSGi HTTP Service which is used to expose the service, rather than a dedicated Jetty HTTP Server. By default, absolute address may look like 'http://localhost:8080/auction'

org.apache.cxf.rs.provider

Boolean

true/false

Can be used to identify a global JAXRS provider as CXF-compatible

org.apache.cxf.rs.provider.expected

Boolean

true/false

Can be used to require global providers to set an 'org.apache.cxf.rs.provider' property with a value 'true'.

org.apache.cxf.rs.provider.globalquery

Boolean

true/false

Can be used to disable queries for global providers, defaults to 'true'.

org.apache.cxf.rs.databinding

String

aegis

This property has a limited value for JAXRS services as JAXB is supported by default, the only supported value is 'aegis' and it is a shortcut for registering an Aegis provider, see below for more information on how to register custom providers for JAXRS services

Note that by default for JAXRS to work javax.ws.rs.* packages have to be imported into the interface and/or implementation and client bundles for annotations like @Path and @Context be recognized. You can avoid importing JAXRS annotations if you provide an out-of-band model. The way it is done in a greeter_rest demo is described here. The model files can be located in a OSGI-INF/cxf/jaxrs resource folder and can be named as model.xml or ServiceName-model.xml (ex : GreeterService-model.xml).
If you use JAXB and you would like to avoid importing JAXB packages into your application bundles then you can try registering a custom JAXB provider which is configured as described here.

Registering custom JAXRS providers

...