Skip to content
Permalink
Browse files
Remove trailing whitespace
  • Loading branch information
Amichai Rothman committed May 28, 2019
1 parent 344ab76 commit b3a3ee467a2c94c1f81bcdfc5f99cff315878921
Showing 20 changed files with 51 additions and 51 deletions.
@@ -7,7 +7,7 @@ CXF DOSGi allows to easily publish and consume SOAP and REST services without us
## Modules

* [common - Common services like intents and HTTPService support](common).
* [provider-ws - SOAP transport](provider-ws)
* [provider-ws - SOAP transport](provider-ws)
* [provider-rs - REST transport](provider-rs)
* [decorator - Support for exporting existing services](decorator)

@@ -16,7 +16,7 @@ CXF DOSGi allows to easily publish and consume SOAP and REST services without us

## Intents

Intents allow a service to leverage CXF extensions like features. A service can list the named intents it requires.
Intents allow a service to leverage CXF extensions like features. A service can list the named intents it requires.
It will then only be exported / imported once all the intents are available. This allows for example security restrictions or logging.
For more information see [common module](common).

@@ -22,7 +22,7 @@
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">

<!--
Checks to make sure the code meets the CXF coding guidelines which
Checks to make sure the code meets the CXF coding guidelines which
are similar to the Sun guidelines at:
http://java.sun.com/docs/codeconv/index.html
@@ -210,7 +210,7 @@
<module name="VisibilityModifier">
<property name="protectedAllowed" value="true" />
<property name="packageAllowed" value="true" />
<!-- this is needed for the resource injection unit tests. It will removed
<!-- this is needed for the resource injection unit tests. It will removed
when private member inject is supported.
-->
<property name="publicMemberPattern" value="resource[12].*" />
@@ -231,7 +231,7 @@

<!-- Miscellaneous other checks. -->
<!-- See http://checkstyle.sf.net/config_misc.html -->
<!--
<!--
<module name="ArrayTypeStyle"/>
<module name="FinalParameters"/>
-->
@@ -7,7 +7,7 @@ Handles communication with the HttpService and Intents.
In case a custom http context is used the providers will register a custom servlet.
Besides this the HttpServiceManager also handles the creation of a default address if none is given and the conversion from the relative address specified on the service property to a fully qualified address.

Config pid `org.apache.cxf.dosgi.http`
Config pid `org.apache.cxf.dosgi.http`

Key | Default | Description
----------------|---------|------------
@@ -108,15 +108,15 @@ public synchronized List<Object> getRequiredIntents(Set<String> requiredIntents)
List<Object> curIntents = ((Callable<List<Object>>)intent).call();
intents.addAll(curIntents);
} catch (Exception e) {
throw new RuntimeException(e);
throw new RuntimeException(e);
}
} else if (intent instanceof IntentsProvider) {
try {
IntentsProvider provider = (IntentsProvider)intent;
List<?> curIntents = provider.getIntents();
intents.addAll(curIntents);
} catch (Exception e) {
throw new RuntimeException(e);
throw new RuntimeException(e);
}
} else {
intents.add(intent);
@@ -23,7 +23,7 @@

public class ServiceDecoratorBundleListener implements BundleListener {
/**
*
*
*/
private final ServiceDecoratorImpl serviceDecorator;

@@ -155,7 +155,7 @@ public void testAddDecorations7() {
assertDecorate(serviceProps, EMPTY, RES_SD_1);
}

private void assertDecorate(final Map<String, Object> serviceProps,
private void assertDecorate(final Map<String, Object> serviceProps,
Map<String, Object> expected, URL... resources) {
Map<String, Object> actual = testDecorate(serviceProps, resources);
assertEquals(expected, actual);
@@ -2,7 +2,7 @@

## Apache karaf features

Installing CXF DOSGi in apache karaf is very easy.
Installing CXF DOSGi in apache karaf is very easy.

```
feature:repo-add cxf-dosgi 2.0.0
@@ -19,13 +19,13 @@ In CXF-DOSGi we provide all necessary bundles in the [repository](repository) mo

Any example for this is the [samples/repository](../samples/repository) module. This pom refers to the Aries RSA and CXF DOSGi repository poms and adds other bundles needed to create a complete OSGi deployment.

The [SOAP sample](../samples/soap) contains a bndrun file to describe the setup of the SOAP sample.
The [SOAP sample](../samples/soap) contains a bndrun file to describe the setup of the SOAP sample.

## Multi-Bundle

Provides an archive of the dependencies of CXF DOSGi as well as configs for felix and equinox to start the bundles.

This distribution is deprecated as it is quite tedious to create an automated build for your own application based on the archive.
This distribution is deprecated as it is quite tedious to create an automated build for your own application based on the archive.

## Source

@@ -37,7 +37,7 @@
<topDirectoryLocation>../..</topDirectoryLocation>
</properties>

<!--
<!--
When changing code make sure to run the distro before testing
or you will be testing the old code.
-->
@@ -89,12 +89,12 @@
<version>2.6.1</version>
</dependency>

<!--
<!--
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi</artifactId>
</dependency>
-->
-->
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.framework</artifactId>
@@ -82,7 +82,7 @@ public void testRESTCall() throws Exception {
waitWebPage(REST_SERVICE_URI);
final WebClient client = WebClient.create(REST_SERVICE_URI + "/1");
client.accept(MediaType.APPLICATION_XML_TYPE);
org.apache.cxf.dosgi.samples.rest.Task task = tryTo("Call REST Resource",
org.apache.cxf.dosgi.samples.rest.Task task = tryTo("Call REST Resource",
new Callable<org.apache.cxf.dosgi.samples.rest.Task>() {
@Override
public org.apache.cxf.dosgi.samples.rest.Task call() {
@@ -108,7 +108,7 @@ public Object importEndpoint(ClassLoader consumerLoader,
private Object createJaxrsProxy(String address,
Class<?> iClass,
ClassLoader loader,
EndpointDescription endpoint,
EndpointDescription endpoint,
List<Object> intents) {
JAXRSClientFactoryBean factory = new JAXRSClientFactoryBean();
factory.setAddress(address);
@@ -144,7 +144,7 @@ public Endpoint exportService(Object serviceBean,
Bus bus = createBus(sid, callingContext, contextRoot, endpointProps);
LOG.info("Creating JAXRS endpoint for " + iClass.getName() + " with address " + address);

JAXRSServerFactoryBean factory = createServerFactory(callingContext, endpointProps,
JAXRSServerFactoryBean factory = createServerFactory(callingContext, endpointProps,
iClass, serviceBean, address, bus);
applyIntents(intents, factory);
String completeEndpointAddress = httpServiceManager.getAbsoluteAddress(contextRoot, address);
@@ -178,11 +178,11 @@ private void applyIntents(List<Object> intents, AbstractJAXRSFactoryBean factory

private boolean isProvider(Object intent) {
return intent.getClass().getAnnotation(Provider.class) != null //
|| (intent instanceof ExceptionMapper) //
|| (intent instanceof ExceptionMapper) //
|| (intent instanceof MessageBodyReader) //
|| (intent instanceof MessageBodyWriter) //
|| (intent instanceof ContextResolver) //
|| (intent instanceof ContextProvider);
|| (intent instanceof ContextProvider);
}

private Endpoint createServerFromFactory(JAXRSServerFactoryBean factory,
@@ -65,7 +65,7 @@ public void testDefaultRest() throws IOException {
Task task1 = WebClient.create(serviceAddress).path("/task").get(Task.class);
Assert.assertEquals("test", task1.getName());

TaskService proxy = (TaskService)rsProvider.importEndpoint(TaskService.class.getClassLoader(),
TaskService proxy = (TaskService)rsProvider.importEndpoint(TaskService.class.getClassLoader(),
callingContext, ifaces, endpoint.description());
Task task = proxy.getTask();
Assert.assertEquals("test", task.getName());
@@ -63,7 +63,7 @@
@Component(configurationPid = "cxf-dsw", property = //
{//
REMOTE_CONFIGS_SUPPORTED + "=" + WsConstants.WS_CONFIG_TYPE,
REMOTE_INTENTS_SUPPORTED + "="
REMOTE_INTENTS_SUPPORTED + "="
})
public class WsProvider extends BaseDistributionProvider implements DistributionProvider {

@@ -137,7 +137,7 @@ private void applyIntents(Map<String, Object> sd, ClientProxyFactoryBean factory
}

private BindingConfiguration copy(BindingConfiguration bindingCfg) {
return bindingCfg instanceof SoapBindingConfiguration
return bindingCfg instanceof SoapBindingConfiguration
? copy((SoapBindingConfiguration)bindingCfg) : bindingCfg;
}

@@ -34,15 +34,15 @@ private WsdlSupport() {
}

public static void setWsdlProperties(AbstractWSDLBasedEndpointFactory factory, //
BundleContext context, //
BundleContext context, //
Map<String, Object> sd) {
String location = PropertyHelper.getProperty(sd, WsConstants.WS_WSDL_LOCATION);
if (location != null) {
URL wsdlURL = context.getBundle().getResource(location);
if (wsdlURL != null) {
factory.setWsdlURL(wsdlURL.toString());
}
QName serviceName = getServiceQName(null, sd,
QName serviceName = getServiceQName(null, sd,
WsConstants.WS_WSDL_SERVICE_NAMESPACE,
WsConstants.WS_WSDL_SERVICE_NAME);
if (serviceName != null) {
@@ -344,9 +344,9 @@ public void testCreateEndpointProps() {
sd.put(org.osgi.framework.Constants.SERVICE_ID, 42);
EndpointHelper.addObjectClass(sd, exportedInterfaces);
List<String> intents = Arrays.asList("my_intent", "your_intent");
EndpointDescription epd = pch.createEndpointDesc(sd,
new String[] {"org.apache.cxf.ws"},
"http://localhost:12345",
EndpointDescription epd = pch.createEndpointDesc(sd,
new String[] {"org.apache.cxf.ws"},
"http://localhost:12345",
intents);

assertEquals("http://localhost:12345", epd.getId());
@@ -30,7 +30,7 @@ Release Notes - CXF Distributed OSGi
* New Feature
* [DOSGI-261] - Sample for rest with jackson provider
* [DOSGI-266] - Support for org.apache.cxf.jaxrs.ext.ContextProvider
* [DOSGI-270] - Create sample for swagger documentation
* [DOSGI-270] - Create sample for swagger documentation


2.1.0
@@ -42,7 +42,7 @@ Release Notes - CXF Distributed OSGi
* Improvement
* [DOSGI-251] - Allow to export services with less service properties
* [DOSGI-256] - ContextResolver intents should be registered as providers
* [DOSGI-257] - Allow to set bus properties
* [DOSGI-257] - Allow to set bus properties


2.0.0
@@ -91,7 +91,7 @@ Release Notes - CXF Distributed OSGi
* [DOSGI-211] - Support SOAP over JMS in DOSGI

* Task
* [DOSGI-194] - Decide how DOSGi needs to handle service.exported.interfaces with multiple values
* [DOSGI-194] - Decide how DOSGi needs to handle service.exported.interfaces with multiple values


1.8.0
@@ -108,7 +108,7 @@ Release Notes - CXF Distributed OSGi

* New Feature
* [DOSGI-230] - Create TCP provider
* [DOSGI-231] - Create ExportPolicy SPI
* [DOSGI-231] - Create ExportPolicy SPI


1.7.0
@@ -120,7 +120,7 @@ Release Notes - CXF Distributed OSGi
* [DOSGI-216] - ZookeeperStarter restarts ZooKeeper too easily

* Improvement
* [DOSGI-220] - Upgrade to cxf 3.1.1
* [DOSGI-220] - Upgrade to cxf 3.1.1


1.6.0
@@ -198,7 +198,7 @@ Release Notes - CXF Distributed OSGi - Version 1.5.0
* [DOSGI-10] - Spring schema handling (intents) doesn't work properly
* for the single-bundle case
* [DOSGI-18] - RESTful Proxies can not be created in multibundle DOSGI
* distributions
* distributions
* [DOSGI-63] - The discovery can be used be used before the connection
* to the server is completely established
* [DOSGI-69] - CXF-DOSGi requires internet access when reading XML
@@ -208,7 +208,7 @@ Release Notes - CXF Distributed OSGi - Version 1.5.0
* stop
* [DOSGI-110] - Unable to export multiple services
* [DOSGI-111] - DOSGi bundle attempts to load WSDL using wrong bundle in
* WSDL-first configuration
* WSDL-first configuration
* [DOSGI-113] - Integration with pax-logging not possible
* [DOSGI-114] - RemoteServiceAdmin is not available warnings in DOSGi
* 1.3
@@ -228,7 +228,7 @@ Release Notes - CXF Distributed OSGi - Version 1.5.0
* an Endpoint is already imported
* [DOSGI-142] - Upgrade CXF to 2.7.0
* [DOSGI-145] - Multiple services using HTTP Service and published from
* the same bundle do not work
* the same bundle do not work
* [DOSGI-150] - Update to Java 1.6
* [DOSGI-153] - Error starting greeter sample in karaf 2.3.0 in aegis
* setup: ExceptionInInitializerError ... failed to create an
@@ -7,7 +7,7 @@ The features module provides Apache Karaf features for the examples. So using ka

The SOAP example also provides a bndrun file for bndtools that allows to directly start/debug the service from Eclipse and export it into a runnable jar.

## Checkout and Build
## Checkout and Build

```
git clone git@github.com:apache/cxf-dosgi.git
@@ -28,11 +28,11 @@ To use the bndrun files you need the [bndtools](http://bndtools.org/) eclipse ex
## Preparing Apache Karaf

[Download Apache karaf 4.x](http://karaf.apache.org/download.html). Extract the archive and
start Apache Karaf using `bin/karaf`
start Apache Karaf using `bin/karaf`

## Examples

* [soap - Publish and Consume JAXWS SOAP services](soap)
* [rest - Publish and Consume REST services] (rest)
* [rest - Publish and Consume REST services] (rest)
* [security-filter - Custom HTTP filter] (security filter)
* [ssl - SSL support and client cert based auth] (ssl)
@@ -6,12 +6,12 @@ The API module defines the TaskResource interface which is annotated using JAXRS

The impl module implements the TaskService using a simple HashMap internally. It allows to manage Task objects which represent items of a to do list.


## Installation

Unpack karaf 4 into a server and client directory.

### Install server
### Install server

Start the server karaf

@@ -33,7 +33,7 @@ Check that task was added
curl --header "Accept:application/json" http://localhost:8181/cxf/tasks/3
```

### Install client
### Install client

Start the client karaf

@@ -68,7 +68,7 @@ endpoint http://localhost:8181/cxf/tasks

This installs the CXF logging feature and adds the logging intent to the
rest sample component. The command endpoint should then show that the intent
logging is applied.
logging is applied.

Any http requests to the service should now show as a logging message in the
karaf log.
@@ -7,12 +7,12 @@ we want to create a JAXWS based SOAP service.

The impl module implements the TaskService using a simple HashMap internally. It allows to manage Task objects which represent items of a to do list.


## Installation

Unpack karaf 4 into a server and client directory.

### Install server
### Install server

Start the server karaf

@@ -24,7 +24,7 @@ rsa:endpoints

The last command should show one endpoint with a URI as id. You should be able to open the url in the browser.

### Install client
### Install client

Start the client karaf

0 comments on commit b3a3ee4

Please sign in to comment.