http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/nmr/cxf-camel-nmr/src/main/resources/META-INF/spring/beans.xml ---------------------------------------------------------------------- diff --git a/examples/nmr/cxf-camel-nmr/src/main/resources/META-INF/spring/beans.xml b/examples/nmr/cxf-camel-nmr/src/main/resources/META-INF/spring/beans.xml deleted file mode 100644 index 3316f20..0000000 --- a/examples/nmr/cxf-camel-nmr/src/main/resources/META-INF/spring/beans.xml +++ /dev/null @@ -1,55 +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. ---> -<!-- START SNIPPET: beans --> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:osgi="http://www.springframework.org/schema/osgi" - xmlns:camel="http://camel.apache.org/schema/spring" - xmlns:jaxws="http://cxf.apache.org/jaxws" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd - http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd - http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd - http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> - - <import resource="classpath:META-INF/cxf/cxf.xml" /> - <import resource="classpath:META-INF/cxf/transport/nmr/cxf-transport-nmr.xml" /> - <import resource="classpath:org/apache/servicemix/camel/nmr/camel-nmr.xml" /> - - <camel:camelContext xmlns="http://camel.apache.org/schema/spring"> - <!-- Route periodically sent events into the NMR --> - <route> - <from uri="timer://myTimer?fixedRate=true&period=5000&exchangePattern=InOut" /> - <bean ref="myTransform" method="transform"/> - <to uri="nmr:HelloWorld"/> - <bean ref="myTransform" method="display" /> - </route> - </camel:camelContext> - - <bean id="myTransform" class="org.apache.servicemix.examples.cxfcamel.MyTransform"> - <property name="value"><value><![CDATA[<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns1:sayHi xmlns:ns1="http://cxfcamel.examples.servicemix.apache.org/"><arg0>Guillaume</arg0></ns1:sayHi></soap:Body></soap:Envelope>]]></value></property> - </bean> - - <jaxws:endpoint id="helloWorld" - implementor="org.apache.servicemix.examples.cxfcamel.HelloWorldImpl" - address="nmr:HelloWorld" /> - -</beans> -<!-- END SNIPPET: beans -->
http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/nmr/cxf-nmr/README.txt ---------------------------------------------------------------------- diff --git a/examples/nmr/cxf-nmr/README.txt b/examples/nmr/cxf-nmr/README.txt deleted file mode 100644 index 1c2dae4..0000000 --- a/examples/nmr/cxf-nmr/README.txt +++ /dev/null @@ -1,144 +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. - */ - -CXF NMR Example -=============== - -Purpose -------- -Publish a web service written in JAX-WS to the NMR. - - -Explanation ------------ -The web service is a simple JAX-WS web service called HelloWorld. The -interface and the implementation are located in the src/main/java/org/ -apache/servicemix/examples/cxf directory of this example. - -The beans.xml file, located in the src/main/resources/META-INF/spring -directory: - -1. Imports the configuration files needed to enable CXF and the NMR - work together. - -2. Configures the web services and adds it to the NMR: - - <jaxws:endpoint id="helloWorld" - implementor="org.apache.servicemix.examples.cxf.HelloWorldImpl" - address="nmr:HelloWorld" /> - - -Prerequisites for Running the Example -------------------------------------- -1. You must have the following installed on your machine: - - - JDK 1.6 or higher - - - Maven 2.2.1 or higher - - For more information, see the README in the top-level examples - directory. - - -2. Start ServiceMix by running the following command: - - <servicemix_home>/bin/servicemix (on UNIX) - <servicemix_home>\bin\servicemix (on Windows) - - -Running the Example -------------------- -You can run the example in two ways: - -- A. Using a Prebuilt Deployment Bundle: Quick and Easy -This option is useful if you want to see the example up and -running as quickly as possible. - -- B. Building the Example Bundle Yourself -This option is useful if you want to change the example in any -way. It tells you how to build and deploy the example. This -option might be slower than option A because, if you do not -already have the required bundles in your local Maven -repository, Maven will have to download the bundles it needs. - -A. Using a Prebuilt Deployment Bundle: Quick and Easy ------------------------------------------------------ -To install and run a prebuilt version of this example, enter -the following command in the ServiceMix console: - - features:install examples-cxf-nmr - -This command makes use of the ServiceMix features facility. For -more information about the features facility, see the README.txt -file in the examples parent directory. - -Verifying the Web Service Deployed to the NMR ---------------------------------------------- -You can verify that the web service was deployed to the NMR by -looking at the log file in the data/log directory of your -ServiceMix installation, or by typing the following command -in the ServiceMix console: - - log:display - -You should see an entry similar to the following: - -08:47:32,091 | INFO | ExtenderThread-8 | ServerImpl | -- - | Setting the server's publish address to be nmr:HelloWorld - -Uninstalling the Example ------------------------- -To uninstall the example, enter the following command in the ServiceMix -console: - - features:uninstall examples-cxf-nmr - - -B. Building the Example Bundle Yourself ---------------------------------------- -To install and run the example where you build the example bundle -yourself, complete the following steps: - -1. If you have already run the example using the prebuilt version as - described above, you must uninstall it as described in "Uninstalling - the Example". - -2. Build the example by opening a command prompt, changing directory to - examples/cxf-nmr (this example) and entering the following Maven - command: - - mvn install - - If all of the required OSGi bundles are available in your local Maven - repository, the example will build very quickly. Otherwise it may - take some time for Maven to download everything it needs. - - The mvn install command builds the example deployment bundle and - copies it to your local Maven repository and to the target directory - of this example. - -3. Install the example by entering the following command in - the ServiceMix console: - - features:install examples-cxf-nmr - - It makes use of the ServiceMix features facility. For more information - about the features facility, see the README.txt file in the examples - parent directory. - -To ensure your example deployed successfully, follow the instructions -outlined in "Verifying the Web Service Deployed to the NMR" above. http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/nmr/cxf-nmr/pom.xml ---------------------------------------------------------------------- diff --git a/examples/nmr/cxf-nmr/pom.xml b/examples/nmr/cxf-nmr/pom.xml deleted file mode 100644 index 58887fa..0000000 --- a/examples/nmr/cxf-nmr/pom.xml +++ /dev/null @@ -1,71 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<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/xsd/maven-4.0.0.xsd"> - - <!-- - - 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. - --> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.servicemix.examples</groupId> - <artifactId>nmr</artifactId> - <version>4.6.0-SNAPSHOT</version> - </parent> - - <artifactId>cxf-nmr</artifactId> - <packaging>bundle</packaging> - <name>Apache ServiceMix :: Features :: Examples :: CXF NMR</name> - <description>CXF Example using the NMR integration</description> - - <dependencies> - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-ws-metadata_2.0_spec</artifactId> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - <configuration> - <instructions> - <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> - <Bundle-Description>${project.description}</Bundle-Description> - <Import-Package> - javax.jws, - javax.xml.namespace, - javax.wsdl, - META-INF.cxf, - META-INF.cxf.transport.nmr, - org.springframework.beans.factory.config, - org.apache.servicemix.cxf.transport.nmr, - org.apache.servicemix.nmr.api, - org.apache.servicemix.nmr.api.event, - org.apache.servicemix.nmr.api.internal - </Import-Package> - <Private-Package>org.apache.servicemix.examples.cxf</Private-Package> - <Require-Bundle>org.apache.cxf.bundle</Require-Bundle> - </instructions> - </configuration> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/nmr/cxf-nmr/src/main/java/org/apache/servicemix/examples/cxf/HelloWorld.java ---------------------------------------------------------------------- diff --git a/examples/nmr/cxf-nmr/src/main/java/org/apache/servicemix/examples/cxf/HelloWorld.java b/examples/nmr/cxf-nmr/src/main/java/org/apache/servicemix/examples/cxf/HelloWorld.java deleted file mode 100644 index 14dad3a..0000000 --- a/examples/nmr/cxf-nmr/src/main/java/org/apache/servicemix/examples/cxf/HelloWorld.java +++ /dev/null @@ -1,28 +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. - */ -// START SNIPPET: service -package org.apache.servicemix.examples.cxf; - -import javax.jws.WebService; - -@WebService -public interface HelloWorld { - String sayHi(String text); -} -// END SNIPPET: service http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/nmr/cxf-nmr/src/main/java/org/apache/servicemix/examples/cxf/HelloWorldImpl.java ---------------------------------------------------------------------- diff --git a/examples/nmr/cxf-nmr/src/main/java/org/apache/servicemix/examples/cxf/HelloWorldImpl.java b/examples/nmr/cxf-nmr/src/main/java/org/apache/servicemix/examples/cxf/HelloWorldImpl.java deleted file mode 100644 index 85fd25f..0000000 --- a/examples/nmr/cxf-nmr/src/main/java/org/apache/servicemix/examples/cxf/HelloWorldImpl.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. - */ -// START SNIPPET: service -package org.apache.servicemix.examples.cxf; - -import javax.jws.WebService; - -@WebService(endpointInterface = "org.apache.servicemix.examples.cxf.HelloWorld") -public class HelloWorldImpl implements HelloWorld { - - public String sayHi(String text) { - return "Hello " + text; - } -} -// END SNIPPET: service http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/nmr/cxf-nmr/src/main/resources/META-INF/spring/beans.xml ---------------------------------------------------------------------- diff --git a/examples/nmr/cxf-nmr/src/main/resources/META-INF/spring/beans.xml b/examples/nmr/cxf-nmr/src/main/resources/META-INF/spring/beans.xml deleted file mode 100644 index 1582276..0000000 --- a/examples/nmr/cxf-nmr/src/main/resources/META-INF/spring/beans.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. ---> -<!-- START SNIPPET: beans --> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:jaxws="http://cxf.apache.org/jaxws" - xsi:schemaLocation=" -http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd -http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> - - <import resource="classpath:META-INF/cxf/cxf.xml" /> - <import resource="classpath:META-INF/cxf/transport/nmr/cxf-transport-nmr.xml" /> - - <jaxws:endpoint id="helloWorld" - implementor="org.apache.servicemix.examples.cxf.HelloWorldImpl" - address="nmr:HelloWorld" /> - -</beans> -<!-- END SNIPPET: beans --> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/nmr/interceptors/README.txt ---------------------------------------------------------------------- diff --git a/examples/nmr/interceptors/README.txt b/examples/nmr/interceptors/README.txt deleted file mode 100644 index 95bca5c..0000000 --- a/examples/nmr/interceptors/README.txt +++ /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. - */ - -INTERCEPTORS EXAMPLES -===================== - -The interceptors example folder contains two interceptor examples: - -1. A custom endpoint listener example (see the /endpoint directory), - which shows you how to develop and deploy a custom endpoint - listener that captures and reports, to the ServiceMix - log, when an endpoint registers and unregisters with the NMR. - - For more information on how to run this example, see the - README.txt file in the /endpoint directory. - -2. A custom exchange listener example (see the /exchange directory), - which shows you how to develop and deploy a custom exchange - listener that captures and reports, to the ServiceMix log, the - exchanges that are sent and delivered in the NMR. - - For more information on how to run this example, see the - README.txt file in the /exchange directory. http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/nmr/interceptors/endpoint/README.txt ---------------------------------------------------------------------- diff --git a/examples/nmr/interceptors/endpoint/README.txt b/examples/nmr/interceptors/endpoint/README.txt deleted file mode 100644 index 9d353d0..0000000 --- a/examples/nmr/interceptors/endpoint/README.txt +++ /dev/null @@ -1,140 +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. - */ - -CUSTOM ENDPOINT LISTENER EXAMPLE -================================ - -Purpose -------- -Develop and deploy a custom endpoint listener that captures and -reports, to the ServiceMix log, when an endpoint registers and -unregisters with the NMR. - - -Explanation ------------ -The custom endpoint listener is written in Java. See the -CustomEndpointListener.java file located in the following directory -of this example: - - src/main/java/org/apache/servicemix/nmr/examples/interceptors/endpoint - -It uses the NMR event API, which can be used to receive notifications -about what is happening in the NMR. In particular, it implements the -EndpointListener interface, which listens and receives events when an -endpoint is registered or unregistered with the NMR. It has two methods: - - - endpointRegistered: Captures endpoint registration events. - - - endpointUnregistered: Captures events when an endpoint unregisters. - -The custom endpoint listener is configured in a beans.xml Spring file, -which registers the custom endpoint listener as an OSGi service. The -beans.xml file is located in the src/main/resources/META-INF/spring -directory of this example. - - -Prerequisites for Building and Running the Example --------------------------------------------------- -1. You must have the following installed on your machine: - - - JDK 1.5 or higher - - - Maven 2.0.9 or higher (for building) - - For more information, see the README in the top-level - examples directory. - -2. Start ServiceMix by running the following command: - - <servicemix_home>/bin/servicemix (on UNIX) - <servicemix_home>\bin\servicemix (on Windows) - - -Building and Deploying ----------------------- -To build this example, run the following command (from the directory -that contains this README): - - mvn install - -If all of the required OSGi bundles are available in your local -Maven repository, the example will build quickly. Otherwise it -may take some time for Maven to download everything it needs. - -Once complete, you will find the example JAR file, -endpoint-${version}.jar, in the target directory of this example. - -You can deploy the example in two ways: - -- Using Hot Deployment - -------------------- - - Copy the target/endpoint-${version}.zip to the - <servicemix_home>/deploy directory. - - -- Using the ServiceMix Console - ---------------------------- - - Enter the following command: - - osgi:install -s mvn:org.apache.servicemix.nmr.examples.interceptors/endpoint/${version}/jar - -Once the bundle is installed, the listener is automatically started. -The next time an endpoint registers or unregisters with the NMR, you -should see an entry in the log file in the data/log directory of your -ServiceMix installation. Look for CustomEndpointListener entries. -For example, if you install and uninstall the NMR example (see the -examples/nmr directory), you should see output similar to following -appearing in the log file: - -14:25:36,630 | INFO | xtenderThread-62 | CustomEndpointListener | .endpoint.CustomEndpointListener 41 | Endpoint Registered: ID: 02c4a67d-20f5-4066-95ce-fdd454735b8f Meta-Data: {Bundle-SymbolicName=org.apache.servicemix.nmr.examples.nmr.endpoint, Bundle-Version=1.1.0.2-fuse, NAME=EchoEndpoint, objectClass=[Ljava.lang.String;@3e03b3, org.springframework.osgi.bean.name=echo, service.id=227} - - -14:25:50,208 | INFO | Timer-1 | CustomEndpointListener | .endpoint.CustomEndpointListener 51 | Endpoint Unregistered: ID: 02c4a67d-20f5-4066-95ce-fdd454735b8f Meta-Data: {Bundle-SymbolicName=org.apache.servicemix.nmr.examples.nmr.endpoint, Bundle-Version=1.1.0.2-fuse, NAME=EchoEndpoint, objectClass=[Ljava.lang.String;@3e03b3, org.springframework.osgi.bean.name=echo, service.id=227} - - -Stopping and Uninstalling the Example -------------------------------------- -To stop or uninstall the example, you must first know the bundle -ID that ServiceMix has assigned to it. To get the bundle ID, enter -the following command at the ServiceMix console: - - osgi:list - -At the end of the listing, you should see an entry similar to the -following: - -[ 192] [Active ] [ ] [Started] [ 60] Apache ServiceMix NMR Example:: Endpoint Listener (1.1.0.2) - -In this case, the bundle ID is 192. - -To stop the example, enter the following command at the ServiceMix -console: - - osgi:stop <bundle_id> - -To uninstall the example, enter the following command in the -ServiceMix console: - - osgi:uninstall <bundle_id> - -Changing the Example --------------------- -If you want to change the code or configuration, just use 'mvn install' -to rebuild the deployment bundle, and deploy it as before. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/nmr/interceptors/endpoint/pom.xml ---------------------------------------------------------------------- diff --git a/examples/nmr/interceptors/endpoint/pom.xml b/examples/nmr/interceptors/endpoint/pom.xml deleted file mode 100644 index 108f929..0000000 --- a/examples/nmr/interceptors/endpoint/pom.xml +++ /dev/null @@ -1,71 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<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/xsd/maven-4.0.0.xsd"> - - <!-- - - 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. - --> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.servicemix.examples</groupId> - <artifactId>org.apache.servicemix.examples.interceptors</artifactId> - <version>4.6.0-SNAPSHOT</version> - </parent> - - <groupId>org.apache.servicemix.examples.interceptors</groupId> - <artifactId>endpoint</artifactId> - <packaging>bundle</packaging> - <name>Apache ServiceMix :: Examples :: NMR :: Interceptors :: Endpoint Listener</name> - - <description>Example for using NMR EndpointListener interface</description> - - <dependencies> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.servicemix.nmr</groupId> - <artifactId>org.apache.servicemix.nmr.api</artifactId> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - <configuration> - <instructions> - <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> - <Bundle-Description>${project.description}</Bundle-Description> - <Import-Package> - org.slf4j, - org.apache.servicemix.nmr.api, - org.apache.servicemix.nmr.api.event, - org.apache.servicemix.nmr.api.internal - </Import-Package> - <Private-Package>org.apache.servicemix.nmr.examples.interceptors.endpoint</Private-Package> - </instructions> - </configuration> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/nmr/interceptors/endpoint/src/main/java/org/apache/servicemix/nmr/examples/interceptors/endpoint/CustomEndpointListener.java ---------------------------------------------------------------------- diff --git a/examples/nmr/interceptors/endpoint/src/main/java/org/apache/servicemix/nmr/examples/interceptors/endpoint/CustomEndpointListener.java b/examples/nmr/interceptors/endpoint/src/main/java/org/apache/servicemix/nmr/examples/interceptors/endpoint/CustomEndpointListener.java deleted file mode 100644 index 5de6546..0000000 --- a/examples/nmr/interceptors/endpoint/src/main/java/org/apache/servicemix/nmr/examples/interceptors/endpoint/CustomEndpointListener.java +++ /dev/null @@ -1,51 +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.servicemix.nmr.examples.interceptors.endpoint; - -import org.apache.servicemix.nmr.api.event.EndpointListener; -import org.apache.servicemix.nmr.api.internal.InternalEndpoint; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * This listener will be called each time it receives events - * about new registered endpoints or endpoints being - * unregistered. - */ -public class CustomEndpointListener implements EndpointListener { - - private final Logger logger = LoggerFactory.getLogger(CustomEndpointListener.class); - - /** - * An endpoint has been registered - * - * @param endpoint the registered endpoint - */ - public void endpointRegistered(InternalEndpoint endpoint) { - logger.info("Endpoint Registered: ID: {} Meta-Data: {}", endpoint.getId(), endpoint.getMetaData().toString()); - } - - /** - * An endpoint has been unregistered - * - * @param endpoint the unregistered endpoint - */ - public void endpointUnregistered(InternalEndpoint endpoint) { - logger.info("Endpoint Unregistered: ID: {} Meta-Data: {}", endpoint.getId(), endpoint.getMetaData().toString()); - } - -} http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/nmr/interceptors/endpoint/src/main/resources/META-INF/spring/beans.xml ---------------------------------------------------------------------- diff --git a/examples/nmr/interceptors/endpoint/src/main/resources/META-INF/spring/beans.xml b/examples/nmr/interceptors/endpoint/src/main/resources/META-INF/spring/beans.xml deleted file mode 100644 index 0c872e7..0000000 --- a/examples/nmr/interceptors/endpoint/src/main/resources/META-INF/spring/beans.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. ---> - -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:osgi="http://www.springframework.org/schema/osgi" - xmlns:util="http://www.springframework.org/schema/util" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans-2.0.xsd - http://www.springframework.org/schema/util - http://www.springframework.org/schema/util/spring-util.xsd - http://www.springframework.org/schema/osgi - http://www.springframework.org/schema/osgi/spring-osgi.xsd - "> - - <!-- Custom Endpoint Listener --> - <bean id="CustomEndpointListener" class="org.apache.servicemix.nmr.examples.interceptors.endpoint.CustomEndpointListener"> - </bean> - - <!-- Endpoint Listener --> - <osgi:service ref="CustomEndpointListener"> - <osgi:interfaces> - <value>org.apache.servicemix.nmr.api.event.EndpointListener</value> - <value>org.apache.servicemix.nmr.api.event.Listener</value> - </osgi:interfaces> - </osgi:service> - -</beans> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/nmr/interceptors/exchange/README.txt ---------------------------------------------------------------------- diff --git a/examples/nmr/interceptors/exchange/README.txt b/examples/nmr/interceptors/exchange/README.txt deleted file mode 100755 index 2af0abe..0000000 --- a/examples/nmr/interceptors/exchange/README.txt +++ /dev/null @@ -1,156 +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. - */ - -CUSTOM EXCHANGE LISTENER EXAMPLE -================================ - -Purpose -------- -Develop and deploy a custom exchange listener that captures -and reports, to the ServiceMix log, the exchanges that are -sent and delivered using the NMR. - - -Explanation ------------ -The custom exchange listener is written in Java. See the -CustomExchangeListener.java file located in the following -directory of this example: - - src/main/java/org/apache/servicemix/nmr/examples/interceptors/exchange - -It uses the NMR event API, which can be used to receive notifications -about what is happening in the NMR. In particular, it implements the -EndpointExchange interface, which is called each time an exchange is -sent and delivered to an endpoint. -It has three methods: - - - exchangeSent: Called each time an exchange is sent. - - - exchangeDelivered: Called each time an exchange is delivered. - - - exchangeFailed: Called when an exchange results in an exception - being thrown and an exchange is not delivered. - -The custom exchange listener is configured in a beans.xml Spring file, -which registers the custom exchange listener as an OSGi service. The -beans.xml file is located in the src/main/resources/META-INF/spring -directory of this example. - - -Prerequisites for Building and Running the Example --------------------------------------------------- -1. You must have the following installed on your machine: - - - JDK 1.5 or higher - - - Maven 2.0.9 or higher (for building) - - For more information, see the README in the top-level - examples directory. - - -2. Start ServiceMix by running the following command: - - <servicemix_home>/bin/servicemix (on UNIX) - <servicemix_home>\bin\servicemix (on Windows) - - -Building and Deploying ----------------------- -To build this example, run the following command (from the directory -that contains this README): - - mvn install - -If all of the required OSGi bundles are available in your local -Maven repository, the example will build quickly. Otherwise it -may take some time for Maven to download everything it needs. - -Once complete, you will find the example JAR file, -exchange-${version}.jar, in the target directory of this -example. - -You can deploy the example in two ways: - -- Using Hot Deployment - -------------------- - - Copy the target/exchange-${version}.zip to the - <servicemix_home>/deploy directory. - - -- Using the ServiceMix Console - ---------------------------- - - Enter the following command: - - osgi:install -s mvn:org.apache.servicemix.nmr.examples.interceptors/exchange/${version}/jar - - -Once the bundle is installed, the listener is automatically started. -The next time an exchange is sent and delivered using the NMR, you -should see an entry in the log file in the data/log directory of your -ServiceMix installation. Look for CustomExchangeListener entries. -For example, if you run the NMR example (see the examples/nmr directory), -you should see output similar to following appearing in the log file: - -13:59:18,560 | INFO | ndpoint-thread-1 | CustomExchangeListener | .exchange.CustomExchangeListener 28 | Sending exchange: [ - id: 954b56e6-7053-4ecd-9015-3d283506fab0 - mep: InOut - status: Active - role: Provider - target: PropertyMatchingReference[{NAME=EchoEndpoint}] - In: [ - content: Hello - ] - Out: [ - content: EchoHello - ] -] - - -Stopping and Uninstalling the Example -------------------------------------- -To stop or uninstall the example, you must first know the bundle ID -that ServiceMix has assigned to it. To get the bundle ID, enter -the following command at the ServiceMix console: - - osgi:list - -At the end of the listing, you should see an entry similar to the -following: - -[ 203] [Active ] [ ] [Started] [ 60] Apache ServiceMix NMR Example:: Exchange Listener (1.1.0.2-fuse) - -In this case, the bundle ID is 203. - -To stop the example, enter the following command at the ServiceMix -console: - - osgi:stop <bundle_id> - -To uninstall the example, enter the following command in -the ServiceMix console: - - osgi:uninstall <bundle_id> - - -Changing the Example --------------------- -If you want to change the code or configuration, just use 'mvn install' -to rebuild the deployment bundle, and deploy it as before. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/nmr/interceptors/exchange/pom.xml ---------------------------------------------------------------------- diff --git a/examples/nmr/interceptors/exchange/pom.xml b/examples/nmr/interceptors/exchange/pom.xml deleted file mode 100644 index 84669a3..0000000 --- a/examples/nmr/interceptors/exchange/pom.xml +++ /dev/null @@ -1,71 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<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/xsd/maven-4.0.0.xsd"> - - <!-- - - 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. - --> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.servicemix.examples</groupId> - <artifactId>org.apache.servicemix.examples.interceptors</artifactId> - <version>4.6.0-SNAPSHOT</version> - </parent> - - <groupId>org.apache.servicemix.examples.interceptors</groupId> - <artifactId>exchange</artifactId> - <packaging>bundle</packaging> - <name>Apache ServiceMix :: Examples :: NMR :: Interceptors :: Exchange Listener</name> - - <description>Example for using NMR ExchangeListener interface</description> - - <dependencies> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.servicemix.nmr</groupId> - <artifactId>org.apache.servicemix.nmr.api</artifactId> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - <configuration> - <instructions> - <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> - <Bundle-Description>${project.description}</Bundle-Description> - <Import-Package> - org.slf4j, - org.apache.servicemix.nmr.api, - org.apache.servicemix.nmr.api.event, - org.apache.servicemix.nmr.api.internal - </Import-Package> - <Private-Package>org.apache.servicemix.nmr.examples.interceptors.exchange</Private-Package> - </instructions> - </configuration> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/nmr/interceptors/exchange/src/main/java/org/apache/servicemix/nmr/examples/interceptors/exchange/CustomExchangeListener.java ---------------------------------------------------------------------- diff --git a/examples/nmr/interceptors/exchange/src/main/java/org/apache/servicemix/nmr/examples/interceptors/exchange/CustomExchangeListener.java b/examples/nmr/interceptors/exchange/src/main/java/org/apache/servicemix/nmr/examples/interceptors/exchange/CustomExchangeListener.java deleted file mode 100644 index 2461a3b..0000000 --- a/examples/nmr/interceptors/exchange/src/main/java/org/apache/servicemix/nmr/examples/interceptors/exchange/CustomExchangeListener.java +++ /dev/null @@ -1,90 +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.servicemix.nmr.examples.interceptors.exchange; - -import org.apache.servicemix.nmr.api.Exchange; -import org.apache.servicemix.nmr.api.Role; -import org.apache.servicemix.nmr.api.Status; -import org.apache.servicemix.nmr.api.event.ExchangeListener; -import org.apache.servicemix.nmr.api.internal.InternalExchange; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * This listener will be called each time an exchange is sent - * or delivered to an endpoint on NMR. - */ -public class CustomExchangeListener implements ExchangeListener { - - private final Logger logger = LoggerFactory.getLogger(CustomExchangeListener.class); - - /** - * Method called each time an exchange is sent - * - * @param exchange the exchange sent - */ - public void exchangeSent(Exchange exchange) { - try { - logger.info("Sending exchange: {}", exchange); - // Intercept exchanges - if (exchange instanceof InternalExchange && - exchange.getStatus() == Status.Active && - exchange.getRole() == Role.Consumer && - exchange.getOut(false) == null && - exchange.getFault(false) == null) { - String id = ((InternalExchange) exchange).getSource().getId(); - logger.info("Source endpoint: {}", id); - } - } catch (Throwable t) { - logger.warn("Caught exception while processing exchange: {}", t, t); - } - } - - /** - * Method called each time an exchange is delivered - * - * @param exchange the delivered exchange - */ - public void exchangeDelivered(Exchange exchange) { - try { - logger.info("Receiving exchange: {}", exchange); - if (exchange.getStatus() == Status.Active && - exchange.getRole() == Role.Provider && - exchange.getOut(false) == null && - exchange.getFault(false) == null && - exchange instanceof InternalExchange) { - String id = ((InternalExchange) exchange).getDestination().getId(); - logger.info("Dest endpoint: {}", id); - } - } catch (Throwable t) { - logger.warn("Caught exception while processing exchange: {}", t, t); - } - } - - /** - * Method called when an exchange resulted in an exception to be - * thrown and the exchange not delivered. This can happen if no - * endpoint can be found for the target or if something else bad - * happened. - * - * @param exchange the exchange that failed - */ - public void exchangeFailed(Exchange exchange) { - logger.info("Exchange Failed: {}", exchange); - } - -} http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/nmr/interceptors/exchange/src/main/resources/META-INF/spring/beans.xml ---------------------------------------------------------------------- diff --git a/examples/nmr/interceptors/exchange/src/main/resources/META-INF/spring/beans.xml b/examples/nmr/interceptors/exchange/src/main/resources/META-INF/spring/beans.xml deleted file mode 100644 index 9579ea0..0000000 --- a/examples/nmr/interceptors/exchange/src/main/resources/META-INF/spring/beans.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. ---> - -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:osgi="http://www.springframework.org/schema/osgi" - xmlns:util="http://www.springframework.org/schema/util" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans-2.0.xsd - http://www.springframework.org/schema/util - http://www.springframework.org/schema/util/spring-util.xsd - http://www.springframework.org/schema/osgi - http://www.springframework.org/schema/osgi/spring-osgi.xsd - "> - - <!-- Custome Exchange Listener --> - <bean id="CustomExchangeListener" class="org.apache.servicemix.nmr.examples.interceptors.exchange.CustomExchangeListener"> - </bean> - - <!-- Exchange Listener --> - <osgi:service ref="CustomExchangeListener"> - <osgi:interfaces> - <value>org.apache.servicemix.nmr.api.event.ExchangeListener</value> - <value>org.apache.servicemix.nmr.api.event.Listener</value> - </osgi:interfaces> - </osgi:service> - -</beans> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/nmr/interceptors/pom.xml ---------------------------------------------------------------------- diff --git a/examples/nmr/interceptors/pom.xml b/examples/nmr/interceptors/pom.xml deleted file mode 100644 index b53eae2..0000000 --- a/examples/nmr/interceptors/pom.xml +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<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/xsd/maven-4.0.0.xsd"> - - <!-- - - 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. - --> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.servicemix.examples</groupId> - <artifactId>nmr</artifactId> - <version>4.6.0-SNAPSHOT</version> - </parent> - - <groupId>org.apache.servicemix.examples</groupId> - <artifactId>org.apache.servicemix.examples.interceptors</artifactId> - <packaging>pom</packaging> - <name>Apache Servicemix :: Examples :: NMR :: Interceptors</name> - - <modules> - <module>exchange</module> - <module>endpoint</module> - </modules> - -</project> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/nmr/pom.xml ---------------------------------------------------------------------- diff --git a/examples/nmr/pom.xml b/examples/nmr/pom.xml deleted file mode 100644 index bcb1c30..0000000 --- a/examples/nmr/pom.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<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/xsd/maven-4.0.0.xsd"> - - <!-- - - 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. - --> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.servicemix.examples</groupId> - <artifactId>examples</artifactId> - <version>4.6.0-SNAPSHOT</version> - </parent> - - <groupId>org.apache.servicemix.examples</groupId> - <artifactId>nmr</artifactId> - <packaging>pom</packaging> - <name>Apache ServiceMix :: Features :: Examples :: NMR</name> - - <modules> - <module>basic</module> - <module>camel-nmr-blueprint</module> - <module>camel-nmr</module> - <module>cxf-camel-nmr</module> - <module>cxf-nmr</module> - <module>interceptors</module> - </modules> - -</project> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/examples/pom.xml ---------------------------------------------------------------------- diff --git a/examples/pom.xml b/examples/pom.xml deleted file mode 100644 index 906a1e9..0000000 --- a/examples/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<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/xsd/maven-4.0.0.xsd"> - - <!-- - - 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. - --> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.servicemix</groupId> - <artifactId>parent</artifactId> - <version>4.6.0-SNAPSHOT</version> - <relativePath>../parent/pom.xml</relativePath> - </parent> - - <groupId>org.apache.servicemix.examples</groupId> - <artifactId>examples</artifactId> - <packaging>pom</packaging> - <name>Apache ServiceMix :: Features :: Examples</name> - - <modules> - <module>activemq</module> - <module>activiti</module> - <!-- <module>akka</module> commented out now until Akka OSGi bundle are available in a repo --> - <module>camel</module> - <module>cxf</module> - <module>jbi</module> - <module>nmr</module> - </modules> - -</project> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/itests/cxf-handler-cfg/pom.xml ---------------------------------------------------------------------- diff --git a/itests/cxf-handler-cfg/pom.xml b/itests/cxf-handler-cfg/pom.xml deleted file mode 100644 index 9458416..0000000 --- a/itests/cxf-handler-cfg/pom.xml +++ /dev/null @@ -1,104 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<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/xsd/maven-4.0.0.xsd"> - - <!-- - - 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. - --> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.servicemix.itests</groupId> - <artifactId>itests</artifactId> - <version>4.6.0-SNAPSHOT</version> - </parent> - - <artifactId>org.apache.servicemix.itests.cxf-handler-cfg</artifactId> - <packaging>bundle</packaging> - <name>Apache ServiceMix :: Features :: Integration Tests :: CXF SOAP Handler OSGi</name> - - <dependencies> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-frontend-jaxws</artifactId> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-ws-metadata_2.0_spec</artifactId> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-codegen-plugin</artifactId> - <executions> - <execution> - <id>generate-test-sources</id> - <phase>generate-sources</phase> - <configuration> - <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot> - <wsdlOptions> - <wsdlOption> - <wsdl>${basedir}/src/main/resources/wsdl/addNumbers.wsdl</wsdl> - </wsdlOption> - </wsdlOptions> - </configuration> - <goals> - <goal>wsdl2java</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - <configuration> - <instructions> - <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> - <Import-Package> - javax.jws, - javax.wsdl, - javax.xml.bind, - javax.xml.bind.annotation, - javax.xml.namespace, - javax.xml.soap, - javax.xml.transform, - javax.xml.ws, - javax.xml.ws.handler, - javax.xml.ws.handler.soap, - META-INF.cxf, - META-INF.cxf.osgi, - org.apache.cxf.bus, - org.apache.cxf.bus.spring, - org.apache.cxf.bus.resource, - org.apache.cxf.configuration.spring, - org.apache.cxf.resource, - org.apache.cxf.transport.http, - org.springframework.beans.factory.config - </Import-Package> - <Require-Bundle>org.apache.cxf.bundle</Require-Bundle> - <Export-Package>org.apache.springcfg.handlers.types,org.apache.springcfg.handlers,org.apache.servicemix.examples.cxf.springcfghandler</Export-Package> - </instructions> - </configuration> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/itests/cxf-handler-cfg/src/main/java/org/apache/servicemix/examples/cxf/springcfghandler/AddNumbersImpl.java ---------------------------------------------------------------------- diff --git a/itests/cxf-handler-cfg/src/main/java/org/apache/servicemix/examples/cxf/springcfghandler/AddNumbersImpl.java b/itests/cxf-handler-cfg/src/main/java/org/apache/servicemix/examples/cxf/springcfghandler/AddNumbersImpl.java deleted file mode 100644 index b621788..0000000 --- a/itests/cxf-handler-cfg/src/main/java/org/apache/servicemix/examples/cxf/springcfghandler/AddNumbersImpl.java +++ /dev/null @@ -1,58 +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.servicemix.examples.cxf.springcfghandler; - -import javax.jws.HandlerChain; -import javax.jws.WebService; -import org.apache.springcfg.handlers.AddNumbers; -import org.apache.springcfg.handlers.AddNumbersFault; -import org.apache.springcfg.handlers.types.FaultDetail; - - -@WebService(name = "AddNumbers", - targetNamespace = "http://apache.org/handlers", - portName = "AddNumbersPort", - endpointInterface = "org.apache.springcfg.handlers.AddNumbers", - serviceName = "AddNumbersService") - -public class AddNumbersImpl implements AddNumbers { - - - /** - * @param number1 - * @param number2 - * @return The sum - * @throws AddNumbersException - * if any of the numbers to be added is negative. - */ - public int addNumbers(int number1, int number2) throws AddNumbersFault { - System.out.println("addNumbers called....." + number1 + ":" + number2); - if (number1 < 0 || number2 < 0) { - String message = "Negative number cant be added!"; - String detail = "Numbers: " + number1 + ", " + number2; - FaultDetail fault = new FaultDetail(); - fault.setMessage(message); - fault.setFaultInfo(detail); - throw new AddNumbersFault(message, fault); - } - return number1 + number2; - } - -} http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/itests/cxf-handler-cfg/src/main/java/org/apache/servicemix/examples/cxf/springcfghandler/ModifyNumberHandler.java ---------------------------------------------------------------------- diff --git a/itests/cxf-handler-cfg/src/main/java/org/apache/servicemix/examples/cxf/springcfghandler/ModifyNumberHandler.java b/itests/cxf-handler-cfg/src/main/java/org/apache/servicemix/examples/cxf/springcfghandler/ModifyNumberHandler.java deleted file mode 100644 index bb633c8..0000000 --- a/itests/cxf-handler-cfg/src/main/java/org/apache/servicemix/examples/cxf/springcfghandler/ModifyNumberHandler.java +++ /dev/null @@ -1,76 +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.servicemix.examples.cxf.springcfghandler; - - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.ws.LogicalMessage; -import javax.xml.ws.ProtocolException; -import javax.xml.ws.handler.LogicalHandler; -import javax.xml.ws.handler.LogicalMessageContext; -import javax.xml.ws.handler.MessageContext; - -import org.apache.springcfg.handlers.types.AddNumbers; -import org.apache.springcfg.handlers.types.ObjectFactory; - - -/** - * handles addition of small numbers. - */ -public class ModifyNumberHandler implements LogicalHandler<LogicalMessageContext> { - - public final boolean handleMessage(LogicalMessageContext messageContext) { - //System.out.println("LogicalMessageHandler handleMessage called"); - - try { - // get the LogicalMessage from our context - LogicalMessage msg = messageContext.getMessage(); - - // check the payload, if its an AddNumbers request, we'll intervene - JAXBContext jaxbContext = JAXBContext.newInstance(ObjectFactory.class); - Object payload = msg.getPayload(jaxbContext); - Object value = payload; - if (payload instanceof JAXBElement) { - value = ((JAXBElement)payload).getValue(); - } - - if (value instanceof AddNumbers) { - AddNumbers req = (AddNumbers)value; - - int a = req.getArg0(); - req.setArg0(a * 10); - msg.setPayload(payload, jaxbContext); - } - return true; - } catch (JAXBException ex) { - throw new ProtocolException(ex); - } - - } - - public final boolean handleFault(LogicalMessageContext messageContext) { - return true; - } - - public void close(MessageContext ctx) { - } - -} http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/itests/cxf-handler-cfg/src/main/resources/META-INF/spring/beans.xml ---------------------------------------------------------------------- diff --git a/itests/cxf-handler-cfg/src/main/resources/META-INF/spring/beans.xml b/itests/cxf-handler-cfg/src/main/resources/META-INF/spring/beans.xml deleted file mode 100644 index 8a4a324..0000000 --- a/itests/cxf-handler-cfg/src/main/resources/META-INF/spring/beans.xml +++ /dev/null @@ -1,67 +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. ---> -<!-- START SNIPPET: beans --> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:jaxws="http://cxf.apache.org/jaxws" - xmlns:cxf="http://cxf.apache.org/core" - xmlns:osgi="http://www.springframework.org/schema/osgi" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd - http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd - http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd"> - - <import resource="classpath:META-INF/cxf/cxf.xml" /> - <import resource="classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml" /> - - <jaxws:endpoint id="SoapHandlerEndpoint" - implementor="org.apache.servicemix.examples.cxf.springcfghandler.AddNumbersImpl" - address="/SpringConfigHandler" - wsdlLocation="wsdl/addNumbers.wsdl" - endpointName="e:AddNumbersPort" - serviceName="s:AddNumbersService" - xmlns:e="http://apache.org/springcfg/handlers" - xmlns:s="http://apache.org/springcfg/handlers"> - <jaxws:handlers> - <bean class="org.apache.servicemix.examples.cxf.springcfghandler.ModifyNumberHandler"/> - </jaxws:handlers> - </jaxws:endpoint> - - - <jaxws:client id="client" - serviceClass="org.apache.springcfg.handlers.AddNumbers" - endpointName="e:AddNumbersPort" - serviceName="s:AddNumbersService" - xmlns:e="http://apache.org/springcfg/handlers" - xmlns:s="http://apache.org/springcfg/handlers" - wsdlLocation="wsdl/addNumbers.wsdl" - address="http://localhost:8080/cxf/SpringConfigHandler"> - <jaxws:handlers> - <bean class="org.apache.servicemix.examples.cxf.springcfghandler.ModifyNumberHandler"/> - </jaxws:handlers> - </jaxws:client> - - <osgi:service id="testSpringCfgHandler" ref="client" - interface="org.apache.springcfg.handlers.AddNumbers"/> - - -</beans> -<!-- END SNIPPET: beans --> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/itests/cxf-handler-cfg/src/main/resources/wsdl/addNumbers.wsdl ---------------------------------------------------------------------- diff --git a/itests/cxf-handler-cfg/src/main/resources/wsdl/addNumbers.wsdl b/itests/cxf-handler-cfg/src/main/resources/wsdl/addNumbers.wsdl deleted file mode 100644 index d1f2352..0000000 --- a/itests/cxf-handler-cfg/src/main/resources/wsdl/addNumbers.wsdl +++ /dev/null @@ -1,96 +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. ---> -<definitions - name="AddNumbers" - targetNamespace="http://apache.org/springcfg/handlers" - xmlns:tns="http://apache.org/springcfg/handlers" - xmlns="http://schemas.xmlsoap.org/wsdl/" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:x1="http://apache.org/springcfg/handlers/types"> - <types> - <xsd:schema - xmlns="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://apache.org/springcfg/handlers/types" - elementFormDefault="qualified"> - - <complexType name="addNumbersResponse"> - <sequence> - <element name="return" type="xsd:int" /> - </sequence> - </complexType> - <element name="addNumbersResponse" type="x1:addNumbersResponse"/> - - <complexType name="addNumbers"> - <sequence> - <element name="arg0" type="xsd:int" /> - <element name="arg1" type="xsd:int" /> - </sequence> - </complexType> - <element name="addNumbers" type="x1:addNumbers"/> - - <element name="FaultDetail" type="x1:FaultDetail" /> - <complexType name="FaultDetail"> - <sequence> - <element name="faultInfo" type="xsd:string" /> - <element name="message" type="xsd:string" /> - </sequence> - </complexType> - </xsd:schema> - </types> - <message name="addNumbers"> - <part name="parameters" element="x1:addNumbers" /> - </message> - <message name="addNumbersResponse"> - <part name="result" element="x1:addNumbersResponse" /> - </message> - <message name="addNumbersFault"> - <part name="AddNumbersFault" element="x1:FaultDetail" /> - </message> - <portType name="AddNumbers"> - <operation name="addNumbers"> - <input message="tns:addNumbers" /> - <output message="tns:addNumbersResponse" /> - <fault name="addNumbersFault" message="tns:addNumbersFault"/> - </operation> - </portType> - <binding name="AddNumbersBinding" type="tns:AddNumbers"> - <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /> - <operation name="addNumbers"> - <soap:operation soapAction="" /> - <input> - <soap:body use="literal" /> - </input> - <output> - <soap:body use="literal" /> - </output> - <fault name="addNumbersFault"> - <soap:fault name="addNumbersFault" use="literal" /> - </fault> - </operation> - </binding> - <service name="AddNumbersService"> - <port name="AddNumbersPort" binding="tns:AddNumbersBinding"> - <soap:address location="http://localhost:8181/cxf/SpringConfigHandler" /> - </port> - </service> -</definitions> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/itests/cxf-http-osgi/pom.xml ---------------------------------------------------------------------- diff --git a/itests/cxf-http-osgi/pom.xml b/itests/cxf-http-osgi/pom.xml deleted file mode 100644 index 6d13b13..0000000 --- a/itests/cxf-http-osgi/pom.xml +++ /dev/null @@ -1,85 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<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/xsd/maven-4.0.0.xsd"> - - <!-- - - 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. - --> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.servicemix.itests</groupId> - <artifactId>itests</artifactId> - <version>4.6.0-SNAPSHOT</version> - </parent> - - <artifactId>org.apache.servicemix.itests.cxf-http-osgi</artifactId> - <packaging>bundle</packaging> - <name>Apache ServiceMix :: Features :: Integration Tests :: CXF OSGi</name> - - <dependencies> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-frontend-jaxws</artifactId> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-ws-metadata_2.0_spec</artifactId> - </dependency> - <dependency> - <groupId>org.apache.servicemix.itests</groupId> - <artifactId>org.apache.servicemix.itests.test-commons</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - <configuration> - <instructions> - <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> - <Import-Package> - javax.jws, - javax.wsdl, - javax.xml.bind, - javax.xml.bind.annotation, - javax.xml.namespace, - javax.xml.ws, - META-INF.cxf, - META-INF.cxf.osgi, - org.apache.cxf.bus, - org.apache.cxf.bus.spring, - org.apache.cxf.bus.resource, - org.apache.cxf.configuration.spring, - org.apache.cxf.resource, - org.apache.cxf.transport.http, - org.springframework.beans.factory.config, - org.apache.servicemix.examples.cxf - </Import-Package> - <Export-Package>org.apache.servicemix.examples.cxf_http_osgi</Export-Package> - <Require-Bundle>org.apache.cxf.bundle</Require-Bundle> - </instructions> - </configuration> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/itests/cxf-http-osgi/src/main/java/org/apache/servicemix/examples/cxf_http_osgi/HelloWorldImpl.java ---------------------------------------------------------------------- diff --git a/itests/cxf-http-osgi/src/main/java/org/apache/servicemix/examples/cxf_http_osgi/HelloWorldImpl.java b/itests/cxf-http-osgi/src/main/java/org/apache/servicemix/examples/cxf_http_osgi/HelloWorldImpl.java deleted file mode 100644 index ee0e63b..0000000 --- a/itests/cxf-http-osgi/src/main/java/org/apache/servicemix/examples/cxf_http_osgi/HelloWorldImpl.java +++ /dev/null @@ -1,35 +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. - */ -// START SNIPPET: service -package org.apache.servicemix.examples.cxf_http_osgi; - -import javax.jws.WebService; -import org.apache.servicemix.examples.cxf.*; -//@WebService(endpointInterface = "org.apache.servicemix.examples.cxf.HelloWorld") -@WebService(serviceName = "HelloWorldImplService", - portName = "HelloWorldImplPort", - endpointInterface = "org.apache.servicemix.examples.cxf.HelloWorld", - targetNamespace = "http://cxf.examples.servicemix.apache.org/") -public class HelloWorldImpl implements HelloWorld { - - public String sayHi(String text) { - return "Hello " + text; - } -} -// END SNIPPET: service http://git-wip-us.apache.org/repos/asf/servicemix-features/blob/d358d2ea/itests/cxf-http-osgi/src/main/resources/META-INF/spring/beans.xml ---------------------------------------------------------------------- diff --git a/itests/cxf-http-osgi/src/main/resources/META-INF/spring/beans.xml b/itests/cxf-http-osgi/src/main/resources/META-INF/spring/beans.xml deleted file mode 100644 index 78ecf5f..0000000 --- a/itests/cxf-http-osgi/src/main/resources/META-INF/spring/beans.xml +++ /dev/null @@ -1,61 +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. ---> -<!-- START SNIPPET: beans --> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:jaxws="http://cxf.apache.org/jaxws" - xmlns:osgi="http://www.springframework.org/schema/osgi" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd - http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd"> - - <import resource="classpath:META-INF/cxf/cxf.xml" /> - <import resource="classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml" /> - - <jaxws:endpoint id="HTTPEndpoint" - implementor="org.apache.servicemix.examples.cxf_http_osgi.HelloWorldImpl" - address="/HelloWorldOSGi" - wsdlLocation="wsdl/hello_world.wsdl" - endpointName="e:HelloWorldImplPort" - serviceName="s:HelloWorldImplService" - xmlns:e="http://cxf.examples.servicemix.apache.org/" - xmlns:s="http://cxf.examples.servicemix.apache.org/"/> - - - <jaxws:client id="client" - serviceClass="org.apache.servicemix.examples.cxf.HelloWorld" - endpointName="e:HelloWorldImplPort" - serviceName="s:HelloWorldImplService" - xmlns:e="http://cxf.examples.servicemix.apache.org/" - xmlns:s="http://cxf.examples.servicemix.apache.org/" - wsdlLocation="wsdl/hello_world.wsdl" - address="http://localhost:8080/cxf/HelloWorldOSGi"/> - - <osgi:service id="testHelloWorld" ref="client" - interface="org.apache.servicemix.examples.cxf.HelloWorld"> - <osgi:service-properties> - <entry key="TEST-BUNDLE-NAME" value="cxf-http-osgi" /> - </osgi:service-properties> - </osgi:service> - - -</beans> -<!-- END SNIPPET: beans -->
