[DOSGI-249] Redesign examples
Project: http://git-wip-us.apache.org/repos/asf/cxf-dosgi/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf-dosgi/commit/37cf7d35 Tree: http://git-wip-us.apache.org/repos/asf/cxf-dosgi/tree/37cf7d35 Diff: http://git-wip-us.apache.org/repos/asf/cxf-dosgi/diff/37cf7d35 Branch: refs/heads/master Commit: 37cf7d355972229658033d48543002775114a021 Parents: abdd741 Author: Christian Schneider <ch...@die-schneider.net> Authored: Fri Aug 12 18:06:51 2016 +0200 Committer: Christian Schneider <ch...@die-schneider.net> Committed: Fri Aug 12 18:06:51 2016 +0200 ---------------------------------------------------------------------- common/pom.xml | 2 +- decorator/pom.xml | 2 +- provider-rs/pom.xml | 2 +- provider-ws/pom.xml | 2 +- samples/ds/client/pom.xml | 36 ------- .../samples/ds/consumer/AdderConsumer.java | 39 -------- .../OSGI-INF/remote-service/remote-services.xml | 26 ------ samples/ds/impl/pom.xml | 44 --------- .../dosgi/samples/ds/impl/AdderServiceImpl.java | 39 -------- samples/ds/interface/bnd.bnd | 1 - samples/ds/interface/pom.xml | 37 -------- .../cxf/dosgi/samples/ds/AdderService.java | 23 ----- samples/ds/pom.xml | 47 ---------- samples/features/pom.xml | 83 +++++++++++++++++ .../features/src/main/resources/features.xml | 33 +++++++ samples/greeter/client/pom.xml | 48 ---------- .../samples/greeter/client/GreeterClient.java | 48 ---------- .../samples/greeter/client/GreeterDataImpl.java | 46 --------- .../OSGI-INF/cxf/intents/intent-map.xml | 75 --------------- .../OSGI-INF/remote-service/remote-services.xml | 27 ------ samples/greeter/impl/pom.xml | 45 --------- .../greeter/impl/GreeterServiceImpl.java | 69 -------------- samples/greeter/interface/bnd.bnd | 1 - samples/greeter/interface/pom.xml | 38 -------- .../cxf/dosgi/samples/greeter/GreeterData.java | 25 ----- .../dosgi/samples/greeter/GreeterException.java | 45 --------- .../dosgi/samples/greeter/GreeterService.java | 26 ------ .../dosgi/samples/greeter/GreetingPhrase.java | 50 ---------- samples/greeter/pom.xml | 54 ----------- samples/greeter_rest/client/pom.xml | 38 -------- .../greeter/client/rest/GreeterClient.java | 46 --------- .../OSGI-INF/remote-service/remote-services.xml | 24 ----- samples/greeter_rest/impl/pom.xml | 46 --------- .../greeter/impl/rest/GreeterServiceImpl.java | 57 ------------ samples/greeter_rest/interface/bnd.bnd | 1 - samples/greeter_rest/interface/pom.xml | 51 ---------- .../samples/greeter/rest/GreeterException.java | 45 --------- .../dosgi/samples/greeter/rest/GreeterInfo.java | 37 -------- .../samples/greeter/rest/GreeterService.java | 31 ------- .../samples/greeter/rest/GreetingPhrase.java | 64 ------------- .../cxf/jaxrs/GreeterService2-model.xml | 7 -- samples/greeter_rest/pom.xml | 47 ---------- samples/pom.xml | 10 +- samples/rest/README.md | 42 +++++++++ samples/rest/api/bnd.bnd | 1 + samples/rest/api/pom.xml | 51 ++++++++++ .../org/apache/cxf/dosgi/samples/rest/Task.java | 83 +++++++++++++++++ .../cxf/dosgi/samples/rest/TaskResource.java | 44 +++++++++ .../cxf/jaxrs/GreeterService2-model.xml | 7 ++ samples/rest/client/pom.xml | 38 ++++++++ .../rest/client/TaskResourceCommand.java | 63 +++++++++++++ .../OSGI-INF/remote-service/remote-services.xml | 24 +++++ samples/rest/impl/pom.xml | 44 +++++++++ .../samples/rest/impl/TaskServiceImpl.java | 74 +++++++++++++++ samples/rest/pom.xml | 47 ++++++++++ samples/security_filter/bnd.bnd | 1 - samples/security_filter/pom.xml | 4 +- .../cxf/dosgi/samples/security/Activator.java | 65 ------------- .../samples/security/SampleSecurityFilter.java | 14 ++- .../samples/security/SecureRestEndpoint.java | 12 +++ samples/soap/README.md | 42 +++++++++ samples/soap/api/bnd.bnd | 1 + samples/soap/api/pom.xml | 38 ++++++++ .../org/apache/cxf/dosgi/samples/soap/Task.java | 83 +++++++++++++++++ .../cxf/dosgi/samples/soap/TaskService.java | 34 +++++++ samples/soap/client/bnd.bnd | 1 + samples/soap/client/pom.xml | 37 ++++++++ .../samples/soap/client/TaskServiceCommand.java | 65 +++++++++++++ samples/soap/impl/pom.xml | 45 +++++++++ .../samples/soap/impl/TaskServiceImpl.java | 77 +++++++++++++++ samples/soap/pom.xml | 45 +++++++++ samples/ssl/README.md | 13 ++- samples/ssl/client/pom.xml | 46 --------- .../dosgi/samples/ssl/client/EchoClient.java | 42 --------- samples/ssl/etc/cxf.dosgi.sample.impl.cfg | 1 + samples/ssl/etc/org.ops4j.pax.web.cfg | 12 +++ samples/ssl/impl/pom.xml | 45 --------- .../samples/ssl/impl/GreeterServiceImpl.java | 42 --------- samples/ssl/interface/bnd.bnd | 1 - samples/ssl/interface/pom.xml | 45 --------- .../cxf/dosgi/samples/ssl/EchoService.java | 23 ----- .../apache/cxf/dosgi/samples/ssl/SslIntent.java | 98 -------------------- samples/ssl/org.ops4j.pax.web.cfg | 12 --- samples/ssl/pom.xml | 13 +-- samples/ssl/ssl-intent/bnd.bnd | 0 samples/ssl/ssl-intent/pom.xml | 45 +++++++++ .../cxf/dosgi/samples/ssl/EchoService.java | 23 +++++ .../apache/cxf/dosgi/samples/ssl/SslIntent.java | 98 ++++++++++++++++++++ 88 files changed, 1330 insertions(+), 1828 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/common/pom.xml ---------------------------------------------------------------------- diff --git a/common/pom.xml b/common/pom.xml index 8e7e136..cf06052 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -22,7 +22,7 @@ <modelVersion>4.0.0</modelVersion> <artifactId>cxf-dosgi-ri-common</artifactId> <packaging>bundle</packaging> - <name>CXF dOSGi Common</name> + <name>CXF DOSGi Common</name> <parent> <groupId>org.apache.cxf.dosgi</groupId> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/decorator/pom.xml ---------------------------------------------------------------------- diff --git a/decorator/pom.xml b/decorator/pom.xml index 9e37865..495124f 100644 --- a/decorator/pom.xml +++ b/decorator/pom.xml @@ -22,7 +22,7 @@ <modelVersion>4.0.0</modelVersion> <artifactId>cxf-dosgi-ri-decorator</artifactId> <packaging>bundle</packaging> - <name>CXF dOSGi Service decorator support</name> + <name>CXF DOSGi Service decorator support</name> <parent> <groupId>org.apache.cxf.dosgi</groupId> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/provider-rs/pom.xml ---------------------------------------------------------------------- diff --git a/provider-rs/pom.xml b/provider-rs/pom.xml index 4efa32a..0a097c7 100644 --- a/provider-rs/pom.xml +++ b/provider-rs/pom.xml @@ -22,7 +22,7 @@ <modelVersion>4.0.0</modelVersion> <artifactId>cxf-dosgi-ri-provider-rs</artifactId> <packaging>bundle</packaging> - <name>CXF dOSGi provider rs</name> + <name>CXF DOSGi provider rs</name> <parent> <groupId>org.apache.cxf.dosgi</groupId> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/provider-ws/pom.xml ---------------------------------------------------------------------- diff --git a/provider-ws/pom.xml b/provider-ws/pom.xml index 21e741f..e816f2c 100644 --- a/provider-ws/pom.xml +++ b/provider-ws/pom.xml @@ -22,7 +22,7 @@ <modelVersion>4.0.0</modelVersion> <artifactId>cxf-dosgi-ri-provider-ws</artifactId> <packaging>bundle</packaging> - <name>CXF dOSGi provider ws</name> + <name>CXF DOSGi provider ws</name> <parent> <groupId>org.apache.cxf.dosgi</groupId> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/ds/client/pom.xml ---------------------------------------------------------------------- diff --git a/samples/ds/client/pom.xml b/samples/ds/client/pom.xml deleted file mode 100644 index dd06083..0000000 --- a/samples/ds/client/pom.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version='1.0' encoding='UTF-8' ?> -<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor - license agreements. See the NOTICE file distributed with this work for additional - information regarding copyright ownership. The ASF licenses this file to - you under the Apache License, Version 2.0 (the "License"); you may not use - this file except in compliance with the License. You may obtain a copy of - the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required - by applicable law or agreed to in writing, software distributed under the - License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS - OF ANY KIND, either express or implied. See the License for the specific - language governing permissions and limitations under the License. --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <artifactId>cxf-dosgi-ri-samples-ds-client</artifactId> - <packaging>bundle</packaging> - <name>CXF DOSGi DS Client</name> - - <parent> - <groupId>org.apache.cxf.dosgi.samples</groupId> - <artifactId>cxf-dosgi-ri-samples-ds-parent</artifactId> - <version>2.0-SNAPSHOT</version> - </parent> - - <properties> - <topDirectoryLocation>..</topDirectoryLocation> - </properties> - - <dependencies> - <dependency> - <groupId>org.apache.cxf.dosgi.samples</groupId> - <artifactId>cxf-dosgi-ri-samples-ds-interface</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - -</project> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/ds/client/src/main/java/org/apache/cxf/dosgi/samples/ds/consumer/AdderConsumer.java ---------------------------------------------------------------------- diff --git a/samples/ds/client/src/main/java/org/apache/cxf/dosgi/samples/ds/consumer/AdderConsumer.java b/samples/ds/client/src/main/java/org/apache/cxf/dosgi/samples/ds/consumer/AdderConsumer.java deleted file mode 100644 index 4c96ea2..0000000 --- a/samples/ds/client/src/main/java/org/apache/cxf/dosgi/samples/ds/consumer/AdderConsumer.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.cxf.dosgi.samples.ds.consumer; - -import org.apache.cxf.dosgi.samples.ds.AdderService; -import org.osgi.service.component.annotations.Component; -import org.osgi.service.component.annotations.Reference; - -@Component -public class AdderConsumer { - - private AdderService adder; - - public void start() { - System.out.println("Declarative Service consumer component."); - System.out.println("Using adder service: 1 + 1 = " + adder.add(1, 1)); - } - - @Reference - public void setAdder(AdderService adder) { - this.adder = adder; - } -} http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/ds/client/src/main/resources/OSGI-INF/remote-service/remote-services.xml ---------------------------------------------------------------------- diff --git a/samples/ds/client/src/main/resources/OSGI-INF/remote-service/remote-services.xml b/samples/ds/client/src/main/resources/OSGI-INF/remote-service/remote-services.xml deleted file mode 100644 index e1f0b21..0000000 --- a/samples/ds/client/src/main/resources/OSGI-INF/remote-service/remote-services.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - <!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to you under the Apache License, Version - 2.0 (the "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 Unless required by - applicable law or agreed to in writing, software distributed under - the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES - OR CONDITIONS OF ANY KIND, either express or implied. See the - License for the specific language governing permissions and - limitations under the License. - --> -<endpoint-descriptions xmlns="http://www.osgi.org/xmlns/rsa/v1.0.0"> - <endpoint-description> - <property name="objectClass"> - <array> - <value>org.apache.cxf.dosgi.samples.ds.AdderService</value> - </array> - </property> - <property name="endpoint.id">http://localhost:9090/adder</property> - <property name="service.imported.configs">org.apache.cxf.ws</property> - </endpoint-description> -</endpoint-descriptions> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/ds/impl/pom.xml ---------------------------------------------------------------------- diff --git a/samples/ds/impl/pom.xml b/samples/ds/impl/pom.xml deleted file mode 100644 index 126630e..0000000 --- a/samples/ds/impl/pom.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version='1.0' encoding='UTF-8' ?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <artifactId>cxf-dosgi-ri-samples-ds-impl</artifactId> - <packaging>bundle</packaging> - - <parent> - <groupId>org.apache.cxf.dosgi.samples</groupId> - <artifactId>cxf-dosgi-ri-samples-ds-parent</artifactId> - <version>2.0-SNAPSHOT</version> - </parent> - - <properties> - <topDirectoryLocation>..</topDirectoryLocation> - </properties> - - <dependencies> - <dependency> - <groupId>org.apache.cxf.dosgi.samples</groupId> - <artifactId>cxf-dosgi-ri-samples-ds-interface</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - - <name>CXF DOSGi DS Sample Impl</name> -</project> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/ds/impl/src/main/java/org/apache/cxf/dosgi/samples/ds/impl/AdderServiceImpl.java ---------------------------------------------------------------------- diff --git a/samples/ds/impl/src/main/java/org/apache/cxf/dosgi/samples/ds/impl/AdderServiceImpl.java b/samples/ds/impl/src/main/java/org/apache/cxf/dosgi/samples/ds/impl/AdderServiceImpl.java deleted file mode 100644 index 3d65d3e..0000000 --- a/samples/ds/impl/src/main/java/org/apache/cxf/dosgi/samples/ds/impl/AdderServiceImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.cxf.dosgi.samples.ds.impl; - -import org.apache.cxf.dosgi.samples.ds.AdderService; -import org.osgi.service.component.annotations.Component; - -@Component(immediate = true, // - property = // - { - "service.exported.interfaces=*", // - "service.exported.configs=org.apache.cxf.ws", // - "org.apache.cxf.ws.address=http://localhost:9090/adder" // - } // -) -public class AdderServiceImpl implements AdderService { - - public int add(int a, int b) { - int result = a + b; - System.out.println("Adder service invoked: " + a + " + " + b + " = " + result); - return result; - } -} http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/ds/interface/bnd.bnd ---------------------------------------------------------------------- diff --git a/samples/ds/interface/bnd.bnd b/samples/ds/interface/bnd.bnd deleted file mode 100644 index 0bf50d5..0000000 --- a/samples/ds/interface/bnd.bnd +++ /dev/null @@ -1 +0,0 @@ -Export-Package: org.apache.cxf.dosgi.samples.ds \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/ds/interface/pom.xml ---------------------------------------------------------------------- diff --git a/samples/ds/interface/pom.xml b/samples/ds/interface/pom.xml deleted file mode 100644 index 1585fc9..0000000 --- a/samples/ds/interface/pom.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version='1.0' encoding='UTF-8' ?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - <artifactId>cxf-dosgi-ri-samples-ds-interface</artifactId> - <packaging>bundle</packaging> - <name>CXF DOSGi DS Sample Interface</name> - - <parent> - <groupId>org.apache.cxf.dosgi.samples</groupId> - <artifactId>cxf-dosgi-ri-samples-ds-parent</artifactId> - <version>2.0-SNAPSHOT</version> - </parent> - - <properties> - <topDirectoryLocation>..</topDirectoryLocation> - </properties> - -</project> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/ds/interface/src/main/java/org/apache/cxf/dosgi/samples/ds/AdderService.java ---------------------------------------------------------------------- diff --git a/samples/ds/interface/src/main/java/org/apache/cxf/dosgi/samples/ds/AdderService.java b/samples/ds/interface/src/main/java/org/apache/cxf/dosgi/samples/ds/AdderService.java deleted file mode 100644 index f5e77fc..0000000 --- a/samples/ds/interface/src/main/java/org/apache/cxf/dosgi/samples/ds/AdderService.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.cxf.dosgi.samples.ds; - -public interface AdderService { - int add(int a, int b); -} http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/ds/pom.xml ---------------------------------------------------------------------- diff --git a/samples/ds/pom.xml b/samples/ds/pom.xml deleted file mode 100644 index e52588f..0000000 --- a/samples/ds/pom.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version='1.0' encoding='UTF-8' ?> -<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor - license agreements. See the NOTICE file distributed with this work for additional - information regarding copyright ownership. The ASF licenses this file to - you under the Apache License, Version 2.0 (the "License"); you may not use - this file except in compliance with the License. You may obtain a copy of - the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required - by applicable law or agreed to in writing, software distributed under the - License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS - OF ANY KIND, either express or implied. See the License for the specific - language governing permissions and limitations under the License. --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <groupId>org.apache.cxf.dosgi.samples</groupId> - <artifactId>cxf-dosgi-ri-samples-ds-parent</artifactId> - <packaging>pom</packaging> - <name>CXF DOSGi DS Sample</name> - <version>2.0-SNAPSHOT</version> - - <parent> - <groupId>org.apache.cxf.dosgi</groupId> - <artifactId>cxf-dosgi-ri-parent</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../parent/pom.xml</relativePath> - </parent> - - <modules> - <module>interface</module> - <module>impl</module> - <module>client</module> - </modules> - - <dependencies> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>org.osgi.core</artifactId> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>org.osgi.compendium</artifactId> - <scope>provided</scope> - </dependency> - </dependencies> - -</project> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/features/pom.xml ---------------------------------------------------------------------- diff --git a/samples/features/pom.xml b/samples/features/pom.xml new file mode 100644 index 0000000..15685ce --- /dev/null +++ b/samples/features/pom.xml @@ -0,0 +1,83 @@ +<?xml version='1.0' encoding='UTF-8' ?> +<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor + license agreements. See the NOTICE file distributed with this work for additional + information regarding copyright ownership. The ASF licenses this file to + you under the Apache License, Version 2.0 (the "License"); you may not use + this file except in compliance with the License. You may obtain a copy of + the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required + by applicable law or agreed to in writing, software distributed under the + License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS + OF ANY KIND, either express or implied. See the License for the specific + language governing permissions and limitations under the License. --> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + <artifactId>cxf-dosgi-samples</artifactId> + <packaging>pom</packaging> + <name>CXF DOSGI Samples Features</name> + + <parent> + <groupId>org.apache.cxf.dosgi.samples</groupId> + <artifactId>cxf-dosgi-samples-parent</artifactId> + <version>2.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <properties> + <topDirectoryLocation>../..</topDirectoryLocation> + </properties> + + <build> + <resources> + <resource> + <directory>${project.basedir}/src/main/resources</directory> + <filtering>true</filtering> + <includes> + <include>**/features.xml</include> + <include>**/*.cfg</include> + <include>**/*.properties</include> + </includes> + </resource> + </resources> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <executions> + <execution> + <id>filter</id> + <phase>generate-resources</phase> + <goals> + <goal>resources</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <version>1.12</version> + <executions> + <execution> + <id>attach-artifacts</id> + <phase>package</phase> + <goals> + <goal>attach-artifact</goal> + </goals> + <configuration> + <artifacts> + <artifact> + <file>target/classes/features.xml</file> + <type>xml</type> + <classifier>features</classifier> + </artifact> + </artifacts> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + <groupId>org.apache.cxf.dosgi</groupId> +</project> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/features/src/main/resources/features.xml ---------------------------------------------------------------------- diff --git a/samples/features/src/main/resources/features.xml b/samples/features/src/main/resources/features.xml new file mode 100644 index 0000000..58b9c91 --- /dev/null +++ b/samples/features/src/main/resources/features.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="cxf-dosgi-${project.version}"> + <repository>mvn:org.apache.cxf.dosgi/cxf-dosgi/${project.version}/xml/features</repository> + + <feature name="cxf-dosgi-sample-soap-impl" version="${project.version}"> + <feature>cxf-dosgi-provider-ws</feature> + <feature>aries-rsa-discovery-zookeeper-server</feature> + <bundle>mvn:org.apache.cxf.dosgi.samples/cxf-dosgi-samples-soap-api/${project.version}</bundle> + <bundle>mvn:org.apache.cxf.dosgi.samples/cxf-dosgi-samples-soap-impl/${project.version}</bundle> + </feature> + + <feature name="cxf-dosgi-sample-soap-client" version="${project.version}"> + <feature>cxf-dosgi-provider-ws</feature> + <feature>aries-rsa-discovery-zookeeper</feature> + <bundle>mvn:org.apache.cxf.dosgi.samples/cxf-dosgi-samples-soap-api/${project.version}</bundle> + <bundle>mvn:org.apache.cxf.dosgi.samples/cxf-dosgi-samples-soap-client/${project.version}</bundle> + </feature> + + <feature name="cxf-dosgi-sample-rest-impl" version="${project.version}"> + <feature>cxf-dosgi-provider-rs</feature> + <feature>aries-rsa-discovery-zookeeper-server</feature> + <bundle>mvn:org.apache.cxf.dosgi.samples/cxf-dosgi-samples-rest-api/${project.version}</bundle> + <bundle>mvn:org.apache.cxf.dosgi.samples/cxf-dosgi-samples-rest-impl/${project.version}</bundle> + </feature> + + <feature name="cxf-dosgi-sample-rest-client" version="${project.version}"> + <feature>cxf-dosgi-provider-rs</feature> + <feature>aries-rsa-discovery-zookeeper</feature> + <bundle>mvn:org.apache.cxf.dosgi.samples/cxf-dosgi-samples-rest-api/${project.version}</bundle> + <bundle>mvn:org.apache.cxf.dosgi.samples/cxf-dosgi-samples-rest-client/${project.version}</bundle> + </feature> + +</features> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter/client/pom.xml ---------------------------------------------------------------------- diff --git a/samples/greeter/client/pom.xml b/samples/greeter/client/pom.xml deleted file mode 100644 index da9fe5a..0000000 --- a/samples/greeter/client/pom.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version='1.0' encoding='UTF-8' ?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - <artifactId>cxf-dosgi-ri-samples-greeter-client</artifactId> - <packaging>bundle</packaging> - <name>CXF DOSGi Greeter Bundle Client</name> - - <parent> - <groupId>org.apache.cxf.dosgi.samples</groupId> - <artifactId>cxf-dosgi-ri-samples-greeter-parent</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <properties> - <bundle.import.package>*</bundle.import.package> - <bundle.private.package>org.apache.cxf.dosgi.samples.greeter.client</bundle.private.package> - <topDirectoryLocation>../../..</topDirectoryLocation> - </properties> - - <dependencies> - <dependency> - <groupId>org.apache.cxf.dosgi.samples</groupId> - <artifactId>cxf-dosgi-ri-samples-greeter-interface</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - -</project> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/GreeterClient.java ---------------------------------------------------------------------- diff --git a/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/GreeterClient.java b/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/GreeterClient.java deleted file mode 100644 index 0d7e267..0000000 --- a/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/GreeterClient.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.cxf.dosgi.samples.greeter.client; - -import java.util.Map; - -import org.apache.cxf.dosgi.samples.greeter.GreeterException; -import org.apache.cxf.dosgi.samples.greeter.GreeterService; -import org.apache.cxf.dosgi.samples.greeter.GreetingPhrase; -import org.osgi.service.component.annotations.Activate; -import org.osgi.service.component.annotations.Component; -import org.osgi.service.component.annotations.Reference; - -@Component -public class GreeterClient { - private GreeterService greeterService; - - @Activate - public void activate() throws GreeterException { - Map<GreetingPhrase, String> greetings = greeterService.greetMe("Christian"); - for (GreetingPhrase phrase : greetings.keySet()) { - System.out.println(phrase.getPhrase()); - } - - } - - @Reference - public void setGreeterService(GreeterService greeterService) { - this.greeterService = greeterService; - } - -} http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/GreeterDataImpl.java ---------------------------------------------------------------------- diff --git a/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/GreeterDataImpl.java b/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/GreeterDataImpl.java deleted file mode 100644 index 368be36..0000000 --- a/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/GreeterDataImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.cxf.dosgi.samples.greeter.client; - -import org.apache.cxf.dosgi.samples.greeter.GreeterData; - -public class GreeterDataImpl implements GreeterData { - - private final String name; - private final int age; - private final boolean exception; - - public GreeterDataImpl(String n, int a, boolean b) { - name = n; - age = a; - exception = b; - } - - public String getName() { - return name; - } - - public int getAge() { - return age; - } - - public boolean isException() { - return exception; - } -} http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter/client/src/main/resources/OSGI-INF/cxf/intents/intent-map.xml ---------------------------------------------------------------------- diff --git a/samples/greeter/client/src/main/resources/OSGI-INF/cxf/intents/intent-map.xml b/samples/greeter/client/src/main/resources/OSGI-INF/cxf/intents/intent-map.xml deleted file mode 100644 index 026bf13..0000000 --- a/samples/greeter/client/src/main/resources/OSGI-INF/cxf/intents/intent-map.xml +++ /dev/null @@ -1,75 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> - -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:p="http://cxf.apache.org/policy" - xmlns:wsp="http://www.w3.org/ns/ws-policy" - xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" - xmlns:http="http://cxf.apache.org/transports/http/configuration" - xmlns:wsrm-policy="http://schemas.xmlsoap.org/ws/2005/02/rm/policy" - xsi:schemaLocation=" - http://cxf.apache.org/policy http://cxf.apache.org/schemas/policy.xsd - http://www.w3.org/ns/ws-policy http://www.w3.org/2007/02/ws-policy.xsd - http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd - http://schemas.xmlsoap.org/ws/2005/02/rm/policy http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> - - <bean id="intentMap" class="org.apache.cxf.dosgi.dsw.qos.IntentMap"> - <property name="intents"> - <map> - <entry key="reliability" value-ref="reliableMessaging"/> - <entry key="decoupled" value-ref="decoupledAddressing"/> - </map> - </property> - </bean> - - <p:policies id="reliableMessaging"> - <wsp:PolicyReference URI="#ReliabilityPolicy"/> - <wsp:PolicyReference URI="#DecoupledPolicy"/> - <wsp:PolicyReference URI="#AddressingPolicy"/> - </p:policies> - - <p:policies id="decoupledAddressing"> - <wsp:PolicyReference URI="#DecoupledPolicy"/> - <wsp:PolicyReference URI="#AddressingPolicy"/> - </p:policies> - - <wsp:Policy wsu:Id="ReliabilityPolicy"> - <wsrm-policy:RMAssertion> - <wsrm-policy:BaseRetransmissionInterval Milliseconds="4000"/> - <wsrm-policy:AcknowledgementInterval Milliseconds="2000" /> - </wsrm-policy:RMAssertion> - </wsp:Policy> - - <wsp:Policy wsu:Id="DecoupledPolicy"> - <wsp:ExactlyOne> - <http:client DecoupledEndpoint="http://localhost:9970/decoupled_endpoint"/> - </wsp:ExactlyOne> - </wsp:Policy> - - <wsp:Policy wsu:Id="AddressingPolicy" - xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata"> - <wsam:Addressing> - <wsp:Policy /> - </wsam:Addressing> - </wsp:Policy> - -</beans> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter/client/src/main/resources/OSGI-INF/remote-service/remote-services.xml ---------------------------------------------------------------------- diff --git a/samples/greeter/client/src/main/resources/OSGI-INF/remote-service/remote-services.xml b/samples/greeter/client/src/main/resources/OSGI-INF/remote-service/remote-services.xml deleted file mode 100644 index af3486e..0000000 --- a/samples/greeter/client/src/main/resources/OSGI-INF/remote-service/remote-services.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - <!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to you under the Apache License, Version - 2.0 (the "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 Unless required by - applicable law or agreed to in writing, software distributed under - the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES - OR CONDITIONS OF ANY KIND, either express or implied. See the - License for the specific language governing permissions and - limitations under the License. - --> -<endpoint-descriptions xmlns="http://www.osgi.org/xmlns/rsa/v1.0.0"> - <endpoint-description> - <property name="objectClass"> - <array> - <value>org.apache.cxf.dosgi.samples.greeter.GreeterService</value> - </array> - </property> - <property name="endpoint.id">http://localhost:9090/greeter</property> - <property name="service.imported.configs">org.apache.cxf.ws</property> - </endpoint-description> -</endpoint-descriptions> - http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter/impl/pom.xml ---------------------------------------------------------------------- diff --git a/samples/greeter/impl/pom.xml b/samples/greeter/impl/pom.xml deleted file mode 100644 index e76e282..0000000 --- a/samples/greeter/impl/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version='1.0' encoding='UTF-8' ?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <artifactId>cxf-dosgi-ri-samples-greeter-impl</artifactId> - <packaging>bundle</packaging> - <name>CXF DOSGi Greeter Implementation Bundle</name> - - <parent> - <groupId>org.apache.cxf.dosgi.samples</groupId> - <artifactId>cxf-dosgi-ri-samples-greeter-parent</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <properties> - <topDirectoryLocation>..</topDirectoryLocation> - </properties> - - <dependencies> - <dependency> - <groupId>org.apache.cxf.dosgi.samples</groupId> - <artifactId>cxf-dosgi-ri-samples-greeter-interface</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - -</project> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/GreeterServiceImpl.java ---------------------------------------------------------------------- diff --git a/samples/greeter/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/GreeterServiceImpl.java b/samples/greeter/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/GreeterServiceImpl.java deleted file mode 100644 index dde220e..0000000 --- a/samples/greeter/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/GreeterServiceImpl.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.cxf.dosgi.samples.greeter.impl; - -import java.util.HashMap; -import java.util.Map; - -import org.apache.cxf.dosgi.samples.greeter.GreeterData; -import org.apache.cxf.dosgi.samples.greeter.GreeterException; -import org.apache.cxf.dosgi.samples.greeter.GreeterService; -import org.apache.cxf.dosgi.samples.greeter.GreetingPhrase; -import org.osgi.service.component.annotations.Component; - -@Component(// - immediate = true, // - property = // - { - "service.exported.interfaces=*", // - "service.exported.configs=org.apache.cxf.ws", // - "org.apache.cxf.ws.address=http://localhost:9090/greeter" // - } // -) -public class GreeterServiceImpl implements GreeterService { - - public Map<GreetingPhrase, String> greetMe(String name) { - System.out.println("Invoking: greetMe(" + name + ")"); - - Map<GreetingPhrase, String> greetings = new HashMap<GreetingPhrase, String>(); - - greetings.put(new GreetingPhrase("Hello"), name); - greetings.put(new GreetingPhrase("Hoi"), name); - greetings.put(new GreetingPhrase("Hola"), name); - greetings.put(new GreetingPhrase("Bonjour"), name); - - return greetings; - } - - public GreetingPhrase[] greetMe(GreeterData gd) throws GreeterException { - if (gd.isException()) { - System.out.println("Throwing custom exception from: greetMe(" + gd.getName() + ")"); - throw new GreeterException(gd.getName()); - } - - String details = gd.getName() + "(" + gd.getAge() + ")"; - System.out.println("Invoking: greetMe(" + details + ")"); - - return new GreetingPhrase[] { - new GreetingPhrase("Howdy " + details), // - new GreetingPhrase("Hallo " + details), // - new GreetingPhrase("Ni hao " + details) - }; - } -} http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter/interface/bnd.bnd ---------------------------------------------------------------------- diff --git a/samples/greeter/interface/bnd.bnd b/samples/greeter/interface/bnd.bnd deleted file mode 100644 index 241de97..0000000 --- a/samples/greeter/interface/bnd.bnd +++ /dev/null @@ -1 +0,0 @@ -Export-Package: org.apache.cxf.dosgi.samples.greeter \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter/interface/pom.xml ---------------------------------------------------------------------- diff --git a/samples/greeter/interface/pom.xml b/samples/greeter/interface/pom.xml deleted file mode 100644 index 4a43d1f..0000000 --- a/samples/greeter/interface/pom.xml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version='1.0' encoding='UTF-8' ?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - <artifactId>cxf-dosgi-ri-samples-greeter-interface</artifactId> - <packaging>bundle</packaging> - <name>CXF DOSGi Greeter Interface Bundle</name> - - <parent> - <groupId>org.apache.cxf.dosgi.samples</groupId> - <artifactId>cxf-dosgi-ri-samples-greeter-parent</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <properties> - <topDirectoryLocation>..</topDirectoryLocation> - </properties> - -</project> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreeterData.java ---------------------------------------------------------------------- diff --git a/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreeterData.java b/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreeterData.java deleted file mode 100644 index be23cc4..0000000 --- a/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreeterData.java +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.cxf.dosgi.samples.greeter; - -public interface GreeterData { - String getName(); - int getAge(); - boolean isException(); -} http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreeterException.java ---------------------------------------------------------------------- diff --git a/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreeterException.java b/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreeterException.java deleted file mode 100644 index ebc58d1..0000000 --- a/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreeterException.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.cxf.dosgi.samples.greeter; - -public class GreeterException extends Exception { - - private static final long serialVersionUID = 1L; - private String name; - - public GreeterException() { - } - - public GreeterException(String name) { - this.name = name; - } - - public String getName() { - return name; - } - - public void setName(String theName) { - name = theName; - } - - @Override - public String toString() { - return "GreeterService can not greet " + name; - } -} http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreeterService.java ---------------------------------------------------------------------- diff --git a/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreeterService.java b/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreeterService.java deleted file mode 100644 index a04bb4a..0000000 --- a/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreeterService.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.cxf.dosgi.samples.greeter; - -import java.util.Map; - -public interface GreeterService { - Map<GreetingPhrase, String> greetMe(String name); - GreetingPhrase[] greetMe(GreeterData name) throws GreeterException; -} http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreetingPhrase.java ---------------------------------------------------------------------- diff --git a/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreetingPhrase.java b/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreetingPhrase.java deleted file mode 100644 index 857ed70..0000000 --- a/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreetingPhrase.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.cxf.dosgi.samples.greeter; - -public class GreetingPhrase { - - private String phrase; - - public GreetingPhrase() { - } - - public GreetingPhrase(String phrase) { - this.phrase = phrase; - } - - public void setPhrase(String thePhrase) { - this.phrase = thePhrase; - } - - public String getPhrase() { - return phrase; - } - - @Override - public int hashCode() { - return phrase.hashCode(); - } - - @Override - public boolean equals(Object other) { - return GreetingPhrase.class.isAssignableFrom(other.getClass()) - && phrase.equals(((GreetingPhrase) other).phrase); - } -} http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter/pom.xml ---------------------------------------------------------------------- diff --git a/samples/greeter/pom.xml b/samples/greeter/pom.xml deleted file mode 100644 index a801f13..0000000 --- a/samples/greeter/pom.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version='1.0' encoding='UTF-8' ?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - <groupId>org.apache.cxf.dosgi.samples</groupId> - <artifactId>cxf-dosgi-ri-samples-greeter-parent</artifactId> - <packaging>pom</packaging> - <name>CXF DOSGi Greeter Bundles</name> - - <parent> - <groupId>org.apache.cxf.dosgi</groupId> - <artifactId>cxf-dosgi-ri-parent</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../parent/pom.xml</relativePath> - </parent> - - <dependencies> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>org.osgi.core</artifactId> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>org.osgi.compendium</artifactId> - <scope>provided</scope> - </dependency> - </dependencies> - - <modules> - <module>interface</module> - <module>impl</module> - <module>client</module> - </modules> - -</project> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter_rest/client/pom.xml ---------------------------------------------------------------------- diff --git a/samples/greeter_rest/client/pom.xml b/samples/greeter_rest/client/pom.xml deleted file mode 100644 index f2757df..0000000 --- a/samples/greeter_rest/client/pom.xml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version='1.0' encoding='UTF-8' ?> -<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor - license agreements. See the NOTICE file distributed with this work for additional - information regarding copyright ownership. The ASF licenses this file to - you under the Apache License, Version 2.0 (the "License"); you may not use - this file except in compliance with the License. You may obtain a copy of - the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required - by applicable law or agreed to in writing, software distributed under the - License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS - OF ANY KIND, either express or implied. See the License for the specific - language governing permissions and limitations under the License. --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <artifactId>cxf-dosgi-ri-samples-greeter-rest-client</artifactId> - <packaging>bundle</packaging> - <name>CXF DOSGi Greeter REST Client</name> - - <parent> - <groupId>org.apache.cxf.dosgi.samples</groupId> - <artifactId>cxf-dosgi-ri-samples-greeter-rest-parent</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <properties> - <topDirectoryLocation>../..</topDirectoryLocation> - </properties> - - <dependencies> - <dependency> - <groupId>org.apache.cxf.dosgi.samples</groupId> - <artifactId>cxf-dosgi-ri-samples-greeter-rest-interface</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - -</project> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter_rest/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/rest/GreeterClient.java ---------------------------------------------------------------------- diff --git a/samples/greeter_rest/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/rest/GreeterClient.java b/samples/greeter_rest/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/rest/GreeterClient.java deleted file mode 100644 index ab25100..0000000 --- a/samples/greeter_rest/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/rest/GreeterClient.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.cxf.dosgi.samples.greeter.client.rest; - -import org.apache.cxf.dosgi.samples.greeter.rest.GreeterException; -import org.apache.cxf.dosgi.samples.greeter.rest.GreeterInfo; -import org.apache.cxf.dosgi.samples.greeter.rest.GreeterService; -import org.apache.cxf.dosgi.samples.greeter.rest.GreetingPhrase; -import org.osgi.service.component.annotations.Activate; -import org.osgi.service.component.annotations.Component; -import org.osgi.service.component.annotations.Reference; - -@Component -public class GreeterClient { - private GreeterService greeterService; - - @Activate - public void activate() throws GreeterException { - GreeterInfo greetings = greeterService.greetMe("Christian"); - for (GreetingPhrase phrase : greetings.getGreetings()) { - System.out.println(phrase.getPhrase()); - } - - } - - @Reference - public void setGreeterService(GreeterService greeterService) { - this.greeterService = greeterService; - } -} http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter_rest/client/src/main/resources/OSGI-INF/remote-service/remote-services.xml ---------------------------------------------------------------------- diff --git a/samples/greeter_rest/client/src/main/resources/OSGI-INF/remote-service/remote-services.xml b/samples/greeter_rest/client/src/main/resources/OSGI-INF/remote-service/remote-services.xml deleted file mode 100644 index db5bb14..0000000 --- a/samples/greeter_rest/client/src/main/resources/OSGI-INF/remote-service/remote-services.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - <!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to you under the Apache License, Version - 2.0 (the "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 Unless required by - applicable law or agreed to in writing, software distributed under - the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES - OR CONDITIONS OF ANY KIND, either express or implied. See the - License for the specific language governing permissions and - limitations under the License. - --> -<service-descriptions xmlns="http://www.osgi.org/xmlns/sd/v1.0.0"> - <service-description> - <provide interface="org.apache.cxf.dosgi.samples.greeter.rest.GreeterService" /> - <property name="service.exported.interfaces">*</property> - <property name="service.exported.configs">org.apache.cxf.rs</property> - <property name="service.exported.intents">HTTP</property> - <property name="org.apache.cxf.rs.address">http://localhost:8080/greeter</property> - </service-description> -</service-descriptions> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter_rest/impl/pom.xml ---------------------------------------------------------------------- diff --git a/samples/greeter_rest/impl/pom.xml b/samples/greeter_rest/impl/pom.xml deleted file mode 100644 index d1b26de..0000000 --- a/samples/greeter_rest/impl/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version='1.0' encoding='UTF-8' ?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - <artifactId>cxf-dosgi-ri-samples-greeter-rest-impl</artifactId> - <packaging>bundle</packaging> - <name>CXF DOSGi Greeter REST Impl</name> - - <parent> - <groupId>org.apache.cxf.dosgi.samples</groupId> - <artifactId>cxf-dosgi-ri-samples-greeter-rest-parent</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <properties> - <topDirectoryLocation>..</topDirectoryLocation> - </properties> - - <dependencies> - <dependency> - <groupId>org.apache.cxf.dosgi.samples</groupId> - <artifactId>cxf-dosgi-ri-samples-greeter-rest-interface</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - -</project> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter_rest/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/rest/GreeterServiceImpl.java ---------------------------------------------------------------------- diff --git a/samples/greeter_rest/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/rest/GreeterServiceImpl.java b/samples/greeter_rest/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/rest/GreeterServiceImpl.java deleted file mode 100644 index 1af2e1e..0000000 --- a/samples/greeter_rest/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/rest/GreeterServiceImpl.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.cxf.dosgi.samples.greeter.impl.rest; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.cxf.dosgi.samples.greeter.rest.GreeterException; -import org.apache.cxf.dosgi.samples.greeter.rest.GreeterInfo; -import org.apache.cxf.dosgi.samples.greeter.rest.GreeterService; -import org.apache.cxf.dosgi.samples.greeter.rest.GreetingPhrase; -import org.osgi.service.component.annotations.Component; - -@Component(// - immediate = true, // - property = // - { - "service.exported.interfaces=*", // - "service.exported.configs=org.apache.cxf.rs", // - "org.apache.cxf.rs.httpservice.context=/greeter" // - } // -) -public class GreeterServiceImpl implements GreeterService { - - public GreeterInfo greetMe(String name) throws GreeterException { - System.out.println("Invoking: greetMe(" + name + ")"); - - if (name.equals("Stranger")) { - throw new GreeterException(name); - } - - GreeterInfo info = new GreeterInfo(); - List<GreetingPhrase> list = new ArrayList<GreetingPhrase>(); - list.add(new GreetingPhrase("Hello", name)); - list.add(new GreetingPhrase("Hoi", name)); - list.add(new GreetingPhrase("Hola", name)); - list.add(new GreetingPhrase("Bonjour", name)); - info.setGreetings(list); - return info; - } -} http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter_rest/interface/bnd.bnd ---------------------------------------------------------------------- diff --git a/samples/greeter_rest/interface/bnd.bnd b/samples/greeter_rest/interface/bnd.bnd deleted file mode 100644 index dad324a..0000000 --- a/samples/greeter_rest/interface/bnd.bnd +++ /dev/null @@ -1 +0,0 @@ -Export-Package: org.apache.cxf.dosgi.samples.greeter.rest \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter_rest/interface/pom.xml ---------------------------------------------------------------------- diff --git a/samples/greeter_rest/interface/pom.xml b/samples/greeter_rest/interface/pom.xml deleted file mode 100644 index 0630e41..0000000 --- a/samples/greeter_rest/interface/pom.xml +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version='1.0' encoding='UTF-8' ?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <groupId>org.apache.cxf.dosgi.samples</groupId> - <artifactId>cxf-dosgi-ri-samples-greeter-rest-interface</artifactId> - <packaging>bundle</packaging> - <name>CXF DOSGi Greeter REST Interface</name> - - <parent> - <groupId>org.apache.cxf.dosgi</groupId> - <artifactId>cxf-dosgi-ri-parent</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../../parent/pom.xml</relativePath> - </parent> - - <properties> - <topDirectoryLocation>../../..</topDirectoryLocation> - </properties> - - <dependencies> - <dependency> - <groupId>org.apache.servicemix.specs</groupId> - <artifactId>org.apache.servicemix.specs.jsr339-api-m10</artifactId> - <version>${servicemix.specs.version}</version> - </dependency> - <dependency> - <groupId>org.apache.servicemix.specs</groupId> - <artifactId>org.apache.servicemix.specs.jaxb-api-2.1</artifactId> - <version>${servicemix.specs.version}</version> - </dependency> - </dependencies> - -</project> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter_rest/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterException.java ---------------------------------------------------------------------- diff --git a/samples/greeter_rest/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterException.java b/samples/greeter_rest/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterException.java deleted file mode 100644 index fb83637..0000000 --- a/samples/greeter_rest/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterException.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.cxf.dosgi.samples.greeter.rest; - -public class GreeterException extends Exception { - - private static final long serialVersionUID = 1L; - private String name; - - public GreeterException() { - } - - public GreeterException(String name) { - this.name = name; - } - - public String getName() { - return name; - } - - public void setName(String theName) { - name = theName; - } - - @Override - public String toString() { - return "GreeterService can not greet " + name; - } -} http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter_rest/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterInfo.java ---------------------------------------------------------------------- diff --git a/samples/greeter_rest/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterInfo.java b/samples/greeter_rest/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterInfo.java deleted file mode 100644 index 6dba206..0000000 --- a/samples/greeter_rest/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterInfo.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.cxf.dosgi.samples.greeter.rest; - -import java.util.ArrayList; -import java.util.List; - -import javax.xml.bind.annotation.XmlRootElement; -@XmlRootElement -public class GreeterInfo { - - private List<GreetingPhrase> greetings = new ArrayList<GreetingPhrase>(); - - public void setGreetings(List<GreetingPhrase> list) { - greetings = list; - } - - public List<GreetingPhrase> getGreetings() { - return greetings; - } -} http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter_rest/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterService.java ---------------------------------------------------------------------- diff --git a/samples/greeter_rest/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterService.java b/samples/greeter_rest/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterService.java deleted file mode 100644 index 7e67bd4..0000000 --- a/samples/greeter_rest/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterService.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.cxf.dosgi.samples.greeter.rest; - -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; - -@Path("greeter") -public interface GreeterService { - - @GET - @Path("greeting/{name}") - GreeterInfo greetMe(@PathParam("name") String name) throws GreeterException; -} http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter_rest/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreetingPhrase.java ---------------------------------------------------------------------- diff --git a/samples/greeter_rest/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreetingPhrase.java b/samples/greeter_rest/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreetingPhrase.java deleted file mode 100644 index 545e091..0000000 --- a/samples/greeter_rest/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreetingPhrase.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.cxf.dosgi.samples.greeter.rest; - -import javax.xml.bind.annotation.XmlRootElement; - -@XmlRootElement -public class GreetingPhrase { - - private String phrase; - private String name; - - public GreetingPhrase() { - } - - public GreetingPhrase(String phrase, String name) { - this.phrase = phrase; - this.name = name; - } - - public void setPhrase(String thePhrase) { - this.phrase = thePhrase; - } - - public String getPhrase() { - return phrase; - } - - public void setName(String theName) { - this.name = theName; - } - - public String getName() { - return name; - } - - @Override - public int hashCode() { - return phrase.hashCode() + 37 * name.hashCode(); - } - - @Override - public boolean equals(Object other) { - return GreetingPhrase.class.isAssignableFrom(other.getClass()) - && phrase.equals(((GreetingPhrase) other).phrase) - && name.equals(((GreetingPhrase) other).name); - } -} http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter_rest/interface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml ---------------------------------------------------------------------- diff --git a/samples/greeter_rest/interface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml b/samples/greeter_rest/interface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml deleted file mode 100644 index 2c4da17..0000000 --- a/samples/greeter_rest/interface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml +++ /dev/null @@ -1,7 +0,0 @@ -<model xmlns="http://cxf.apache.org/jaxrs"> - <resource name="org.apache.cxf.dosgi.samples.greeter.rest.GreeterService2" path="greeter"> - <operation name="greetMe" verb="GET" path="greeting/{name}"> - <param name="name" type="PATH"/> - </operation> - </resource> -</model> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/greeter_rest/pom.xml ---------------------------------------------------------------------- diff --git a/samples/greeter_rest/pom.xml b/samples/greeter_rest/pom.xml deleted file mode 100644 index 4f1a4f0..0000000 --- a/samples/greeter_rest/pom.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version='1.0' encoding='UTF-8' ?> -<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor - license agreements. See the NOTICE file distributed with this work for additional - information regarding copyright ownership. The ASF licenses this file to - you under the Apache License, Version 2.0 (the "License"); you may not use - this file except in compliance with the License. You may obtain a copy of - the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required - by applicable law or agreed to in writing, software distributed under the - License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS - OF ANY KIND, either express or implied. See the License for the specific - language governing permissions and limitations under the License. --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - <groupId>org.apache.cxf.dosgi.samples</groupId> - <artifactId>cxf-dosgi-ri-samples-greeter-rest-parent</artifactId> - <packaging>pom</packaging> - <name>CXF DOSGi Greeter REST</name> - - <parent> - <groupId>org.apache.cxf.dosgi</groupId> - <artifactId>cxf-dosgi-ri-parent</artifactId> - <version>2.0-SNAPSHOT</version> - <relativePath>../../parent/pom.xml</relativePath> - </parent> - - <modules> - <module>interface</module> - <module>impl</module> - <module>client</module> - </modules> - - <dependencies> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>org.osgi.core</artifactId> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>org.osgi.compendium</artifactId> - <scope>provided</scope> - </dependency> - </dependencies> - -</project> http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/37cf7d35/samples/pom.xml ---------------------------------------------------------------------- diff --git a/samples/pom.xml b/samples/pom.xml index 5d08022..21ceeb8 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -21,9 +21,9 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.apache.cxf.dosgi.samples</groupId> - <artifactId>cxf-dosgi-ri-samples</artifactId> + <artifactId>cxf-dosgi-samples-parent</artifactId> <packaging>pom</packaging> - <name>CXF DOSGi Sample Bundles</name> + <name>CXF DOSGi Samples Parent</name> <url>http://cxf.apache.org/</url> <parent> @@ -34,9 +34,9 @@ </parent> <modules> - <module>greeter</module> - <module>greeter_rest</module> - <module>ds</module> + <module>rest</module> + <module>soap</module> <module>security_filter</module> + <module>features</module> </modules> </project>