servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1480872 - in /servicemix/smx5/trunk: assemblies/apache-servicemix/src/main/filtered-resources/ examples/cxf/ examples/cxf/cxf-wsn/ examples/cxf/cxf-wsn/cxf-wsn-base/ examples/cxf/cxf-wsn/cxf-wsn-base/src/ examples/cxf/cxf-wsn/cxf-wsn-base/...
Date Fri, 10 May 2013 03:48:44 GMT
Author: ffang
Date: Fri May 10 03:48:42 2013
New Revision: 1480872

URL: http://svn.apache.org/r1480872
Log:
[SM-2199]Add a new example: cxf-wsn

Added:
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/README.txt
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/pom.xml
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/java/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/java/org/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/java/org/apache/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/java/org/apache/servicemix/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/java/org/apache/servicemix/examples/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/java/org/apache/servicemix/examples/cxf/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/java/org/apache/servicemix/examples/cxf/base/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/java/org/apache/servicemix/examples/cxf/base/Email.java
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/java/org/apache/servicemix/examples/cxf/base/package-info.java
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/resources/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/resources/org/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/resources/org/apache/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/resources/org/apache/servicemix/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/resources/org/apache/servicemix/examples/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/resources/org/apache/servicemix/examples/cxf/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/resources/org/apache/servicemix/examples/cxf/base/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/resources/org/apache/servicemix/examples/cxf/base/jaxb.index
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-client/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-client/pom.xml
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-client/src/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-client/src/main/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-client/src/main/java/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-client/src/main/java/org/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-client/src/main/java/org/apache/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-client/src/main/java/org/apache/servicemix/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-client/src/main/java/org/apache/servicemix/examples/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-client/src/main/java/org/apache/servicemix/examples/cxf/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-client/src/main/java/org/apache/servicemix/examples/cxf/client/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-client/src/main/java/org/apache/servicemix/examples/cxf/client/Client.java
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/pom.xml
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/java/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/java/org/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/java/org/apache/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/java/org/apache/servicemix/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/java/org/apache/servicemix/examples/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/java/org/apache/servicemix/examples/cxf/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/java/org/apache/servicemix/examples/cxf/notifier/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/java/org/apache/servicemix/examples/cxf/notifier/Notifier.java
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/java/org/apache/servicemix/examples/cxf/notifier/SpamGenerator.java
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/resources/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/resources/OSGI-INF/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/resources/OSGI-INF/blueprint/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/resources/OSGI-INF/blueprint/blueprint.xml   (with props)
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/pom.xml
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/src/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/src/main/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/src/main/java/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/src/main/java/org/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/src/main/java/org/apache/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/src/main/java/org/apache/servicemix/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/src/main/java/org/apache/servicemix/examples/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/src/main/java/org/apache/servicemix/examples/cxf/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/src/main/java/org/apache/servicemix/examples/cxf/receive/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/src/main/java/org/apache/servicemix/examples/cxf/receive/Subscriber.java
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/src/main/resources/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/src/main/resources/OSGI-INF/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/src/main/resources/OSGI-INF/blueprint/
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/src/main/resources/OSGI-INF/blueprint/blueprint.xml   (with props)
    servicemix/smx5/trunk/examples/cxf/cxf-wsn/pom.xml
Modified:
    servicemix/smx5/trunk/assemblies/apache-servicemix/src/main/filtered-resources/features.xml
    servicemix/smx5/trunk/examples/cxf/pom.xml

Modified: servicemix/smx5/trunk/assemblies/apache-servicemix/src/main/filtered-resources/features.xml
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/assemblies/apache-servicemix/src/main/filtered-resources/features.xml?rev=1480872&r1=1480871&r2=1480872&view=diff
==============================================================================
--- servicemix/smx5/trunk/assemblies/apache-servicemix/src/main/filtered-resources/features.xml (original)
+++ servicemix/smx5/trunk/assemblies/apache-servicemix/src/main/filtered-resources/features.xml Fri May 10 03:48:42 2013
@@ -113,6 +113,18 @@
     <feature name="examples-cxf-ws-rm" version="${version}" resolver="(obr)">
         <bundle>mvn:org.apache.servicemix.examples/cxf-ws-rm/${version}</bundle>
     </feature>
+    <feature name="examples-cxf-wsn-receive" version="${version}" resolver="(obr)">
+        <feature version="${camel.version}">camel-jetty</feature>
+        <feature version="${camel.version}">camel-jms</feature>
+        <feature version="${camel.version}">camel-jaxb</feature>
+        <feature version="${cxf.version}">cxf-wsn</feature>
+        <bundle>mvn:org.apache.servicemix.examples/cxf-wsn-base/${version}</bundle>
+        <bundle>mvn:org.apache.servicemix.examples/cxf-wsn-receive/${version}</bundle>
+    </feature>
+    <feature name="examples-cxf-wsn-notifier" version="${version}" resolver="(obr)">
+        <feature version="${version}">examples-cxf-wsn-receive</feature>
+        <bundle>mvn:org.apache.servicemix.examples/cxf-wsn-notifier/${version}</bundle>
+    </feature>
 
     <feature name="examples-activiti-camel" version="${version}" resolver="(obr)">
 	      <feature version="${camel.version}">camel-core</feature>

Added: servicemix/smx5/trunk/examples/cxf/cxf-wsn/README.txt
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/examples/cxf/cxf-wsn/README.txt?rev=1480872&view=auto
==============================================================================
--- servicemix/smx5/trunk/examples/cxf/cxf-wsn/README.txt (added)
+++ servicemix/smx5/trunk/examples/cxf/cxf-wsn/README.txt Fri May 10 03:48:42 2013
@@ -0,0 +1,211 @@
+/*
+ * 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 WSN
+=======
+
+Purpose
+-------
+Deploying a web service notification service using cxf-wsn and a push subscription client.
+
+
+Explanation
+-----------
+The example uses the notification broker provided by the cxf-wsn bundle.
+In this case, e-mail messages received by the broker, will be send to the
+consumers who subscribed to this service.
+
+The example exists of four main modules:
+
+- CXF-WSN-BASE: this module provides the Email class and some files for the JAXB (un)marshall actions.
+
+- CXF-WSN-CLIENT: here you can find a standalone client with a subscription and a notify feature.
+
+- CXF-WSN-RECEIVER: this camel route subscribes to the corresponding topic and logs all mail messages.
+
+- CXF-WSN-NOTIFIER: The notifier contains a camel route which sends a random spam message to the
+  notification broker every 5 seconds.
+
+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. This example requires some additional configuration to allow
+   the JVM to use more PermGen memory:
+
+    export JAVA_MAX_PERM_MEM=128m           (on UNIX)
+    set JAVA_MAX_PERM_MEM=128m              (on Windows)
+
+
+3. 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
+ 
+ features:install examples-cxf-wsn-receive
+  
+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.
+
+Running the standalone Client
+-----------------------------
+To run the java code client:
+
+1. Change to the <servicemix_home>/examples/cxf/cxf-wsn/cxf-wsn-client/
+   directory.
+
+2. Run the following command:
+
+     mvn compile exec:java
+
+   If the client request is successful, you will see the following output:
+
+   From: standalone@client.com
+   To: you@gotmail.com
+   Subject: This is the standalone client speaking
+   Body: This thing works!
+
+Running the notifier
+--------------------
+1. To run the notifier head back to the ServiceMix console
+   and enter the following commands:
+
+     features:install examples-cxf-wsn-notifier
+
+   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.
+
+2. The notifier sends a spam message every 5 seconds. You
+   can view the messages in the log file in the data/log
+   directory of your ServiceMix installation, or by typing
+   the following command in the ServiceMix console:
+
+     log:display
+
+3. If the installation of the notifier is successful, you will see the
+   random spam messages in the log output. For example:
+
+     ### YOU GOT MAIL ####
+     From: gold@theshinymarket.com
+     To: you@mail.com
+     Subject: Buy cheap gold now!?
+     Please send us your credit card number and receive gold at very cheap prices!
+
+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 first uninstall the previous features
+   by entering the following command in the ServiceMix console:
+
+     features:uninstall examples-cxf-wsn-receive
+     features:uninstall examples-cxf-wsn-notifier
+
+2. Build the example by opening a command prompt, changing directory to
+   examples/cxf/cxf-wsn (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. To install the example, follow the 'Using a Prebuilt Deployment
+   Bundle' instructions
+
+Stopping and Uninstalling the Example
+-------------------------------------
+To stop the example, you must first know the bundle IDs that ServiceMix
+has assigned to it. To get the bundle IDs, 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:
+
+  [ 172] [Active     ] [            ] [       ] [   80] cxf-wsn-base (5.0.0.SNAPSHOT)
+  [ 173] [Active     ] [Created     ] [       ] [   80] cxf-wsn-receive (5.0.0.SNAPSHOT)
+  [ 174] [Active     ] [Created     ] [       ] [   80] cxf-wsn-notifier (5.0.0.SNAPSHOT)
+
+In this case, the bundle IDs are 172,173 and 174.
+
+To stop the example, enter the following command for every bundle
+at the ServiceMix console:
+
+  osgi:stop <bundle_id>
+
+For example:
+
+  osgi:stop 172
+  osgi:stop 173
+  osgi:stop 174
+
+To uninstall the example, enter one of the following commands in
+the ServiceMix console:
+
+  features:uninstall examples-cxf-wsn-receive
+  features:uninstall examples-cxf-wsn-notifier
+ 
+or for every bundle:
+ 
+  osgi:uninstall <bundle_id>
+  
+
+Viewing the Log Entries
+-----------------------
+You can view the entries in the log file in the data/log
+directory of your ServiceMix installation, or by typing
+the following command in the ServiceMix console:
+
+  log:display

Added: servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/pom.xml?rev=1480872&view=auto
==============================================================================
--- servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/pom.xml (added)
+++ servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/pom.xml Fri May 10 03:48:42 2013
@@ -0,0 +1,47 @@
+<?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.
+    -->
+    <parent>
+        <artifactId>cxf-wsn</artifactId>
+        <groupId>org.apache.servicemix.examples</groupId>
+        <version>5.0.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>cxf-wsn-base</artifactId>
+    <packaging>bundle</packaging>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Export-Package>org.apache.servicemix.examples.cxf.base</Export-Package>
+                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+                        <Bundle-Description>${project.description}</Bundle-Description>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+
+</project>
\ No newline at end of file

Added: servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/java/org/apache/servicemix/examples/cxf/base/Email.java
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/java/org/apache/servicemix/examples/cxf/base/Email.java?rev=1480872&view=auto
==============================================================================
--- servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/java/org/apache/servicemix/examples/cxf/base/Email.java (added)
+++ servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/java/org/apache/servicemix/examples/cxf/base/Email.java Fri May 10 03:48:42 2013
@@ -0,0 +1,76 @@
+/*
+ * 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.base;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name ="email", namespace = "urn:org.apache.servicemix:wsn")
+public class Email {
+    private String from,to,subject,body;
+
+    public Email() {
+    }
+
+    public Email(String from, String to, String subject, String body) {
+        this.body = body;
+        this.from = from;
+        this.to = to;
+        this.subject = subject;
+    }
+
+    public String getFrom() {
+        return from;
+    }
+
+    public void setFrom(String from) {
+        this.from = from;
+    }
+
+    public String getTo() {
+        return to;
+    }
+
+    public void setTo(String to) {
+        this.to = to;
+    }
+
+    public String getSubject() {
+        return subject;
+    }
+
+    public void setSubject(String subject) {
+        this.subject = subject;
+    }
+
+    public String getBody() {
+        return body;
+    }
+
+    public void setBody(String body) {
+        this.body = body;
+    }
+
+    @Override
+    public String toString() {
+        return "Email{" +
+                "from='" + from + '\'' +
+                ", to='" + to + '\'' +
+                ", subject='" + subject + '\'' +
+                ", body='" + body + '\'' +
+                '}';
+    }
+}

Added: servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/java/org/apache/servicemix/examples/cxf/base/package-info.java
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/java/org/apache/servicemix/examples/cxf/base/package-info.java?rev=1480872&view=auto
==============================================================================
--- servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/java/org/apache/servicemix/examples/cxf/base/package-info.java (added)
+++ servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/java/org/apache/servicemix/examples/cxf/base/package-info.java Fri May 10 03:48:42 2013
@@ -0,0 +1,25 @@
+/*
+ * 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.
+ */
+@XmlSchema(
+        namespace = "urn:org.apache.servicemix:wsn",
+        elementFormDefault = XmlNsForm.QUALIFIED)
+package org.apache.servicemix.examples.cxf.base;
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlSchema;
+
+
+

Added: servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/resources/org/apache/servicemix/examples/cxf/base/jaxb.index
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/resources/org/apache/servicemix/examples/cxf/base/jaxb.index?rev=1480872&view=auto
==============================================================================
--- servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/resources/org/apache/servicemix/examples/cxf/base/jaxb.index (added)
+++ servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-base/src/main/resources/org/apache/servicemix/examples/cxf/base/jaxb.index Fri May 10 03:48:42 2013
@@ -0,0 +1,15 @@
+# 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.
+Email
\ No newline at end of file

Added: servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-client/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-client/pom.xml?rev=1480872&view=auto
==============================================================================
--- servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-client/pom.xml (added)
+++ servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-client/pom.xml Fri May 10 03:48:42 2013
@@ -0,0 +1,88 @@
+<?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.
+    -->
+
+
+    <parent>
+        <artifactId>cxf-wsn</artifactId>
+        <groupId>org.apache.servicemix.examples</groupId>
+        <version>5.0.0-SNAPSHOT</version>
+    </parent>
+
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>cxf-wsn-client</artifactId>
+
+
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-jaxws</artifactId>
+            <version>${cxf-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http</artifactId>
+            <version>${cxf-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http-jetty</artifactId>
+            <version>${cxf-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-ws-addr</artifactId>
+            <version>${cxf-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-ws-policy</artifactId>
+            <version>${cxf-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf.services.wsn</groupId>
+            <artifactId>cxf-services-wsn-core</artifactId>
+            <version>${cxf-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.examples</groupId>
+            <artifactId>cxf-wsn-base</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>exec-maven-plugin</artifactId>
+                <configuration>
+                    <mainClass>org.apache.servicemix.examples.cxf.client.Client</mainClass>
+                    <includePluginDependencies>true</includePluginDependencies>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+
+</project>
\ No newline at end of file

Added: servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-client/src/main/java/org/apache/servicemix/examples/cxf/client/Client.java
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-client/src/main/java/org/apache/servicemix/examples/cxf/client/Client.java?rev=1480872&view=auto
==============================================================================
--- servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-client/src/main/java/org/apache/servicemix/examples/cxf/client/Client.java (added)
+++ servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-client/src/main/java/org/apache/servicemix/examples/cxf/client/Client.java Fri May 10 03:48:42 2013
@@ -0,0 +1,84 @@
+/*
+ * 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.client;
+
+import org.apache.servicemix.examples.cxf.base.Email;
+import org.w3c.dom.Element;
+import org.apache.cxf.wsn.client.Consumer;
+import org.apache.cxf.wsn.client.NotificationBroker;
+import org.apache.cxf.wsn.client.Subscription;
+import org.oasis_open.docs.wsn.b_2.NotificationMessageHolderType;
+
+public final class Client {
+    private Client() {
+        //not constructed
+    }
+
+    /**
+     * @param args
+     */
+    public static void main(String[] args) throws Exception {
+        final String topic = "MyTopic";
+        final String mailNs = "urn:org.apache.servicemix:wsn";
+        String wsnPort = "8182";
+
+        if (args.length > 0) {
+            wsnPort = args[0];
+        }
+
+        // Start a consumer that will listen for notification messages
+        // We'll print the email fields out.
+        Consumer consumer = new Consumer(new Consumer.Callback() {
+            public void notify(NotificationMessageHolderType message) {
+                Object o = message.getMessage().getAny();
+
+                if (o instanceof Element) {
+                    Element e = (Element)o;
+                    System.out.println();
+                    System.out.println("From: "+e.getElementsByTagNameNS(mailNs,"from").item(0).getTextContent());
+                    System.out.println("To: "+e.getElementsByTagNameNS(mailNs,"to").item(0).getTextContent());
+                    System.out.println("Subject: "+e.getElementsByTagNameNS(mailNs,"subject").item(0).getTextContent());
+                    System.out.println("Body: "+e.getElementsByTagNameNS(mailNs,"body").item(0).getTextContent());
+                    System.out.println();
+                }else {
+                    System.out.println(o);
+                }
+            }
+        }, "http://localhost:9001/MyConsumer");
+
+
+        // Create a subscription for a Topic on the broker
+        NotificationBroker notificationBroker
+                = new NotificationBroker("http://localhost:" + wsnPort + "/wsn/NotificationBroker",Email.class);
+        Subscription subscription = notificationBroker.subscribe(consumer, topic);
+
+        // Create new email object to send
+        Email mail =  new Email("standalone@client.com","you@gotmail.com","This is the standalone client speaking","This thing works!");
+
+        // Send a notification on the Topic
+        notificationBroker.notify(topic,mail);
+
+        // Just sleep for a bit to make sure the notification gets delivered
+        Thread.sleep(5000);
+
+        // Cleanup and exit
+        subscription.unsubscribe();
+        consumer.stop();
+        System.exit(0);
+    }
+
+}
\ No newline at end of file

Added: servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/pom.xml?rev=1480872&view=auto
==============================================================================
--- servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/pom.xml (added)
+++ servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/pom.xml Fri May 10 03:48:42 2013
@@ -0,0 +1,67 @@
+<?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.
+    -->
+
+    <parent>
+        <artifactId>cxf-wsn</artifactId>
+        <groupId>org.apache.servicemix.examples</groupId>
+        <version>5.0.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>cxf-wsn-notifier</artifactId>
+    <packaging>bundle</packaging>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Import-Package>org.apache.servicemix.examples.cxf.base,*</Import-Package>
+                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+                        <Bundle-Description>${project.description}</Bundle-Description>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.cxf.services.wsn</groupId>
+            <artifactId>cxf-services-wsn-core</artifactId>
+            <version>${cxf-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.examples</groupId>
+            <artifactId>cxf-wsn-base</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+
+
+</project>
\ No newline at end of file

Added: servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/java/org/apache/servicemix/examples/cxf/notifier/Notifier.java
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/java/org/apache/servicemix/examples/cxf/notifier/Notifier.java?rev=1480872&view=auto
==============================================================================
--- servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/java/org/apache/servicemix/examples/cxf/notifier/Notifier.java (added)
+++ servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/java/org/apache/servicemix/examples/cxf/notifier/Notifier.java Fri May 10 03:48:42 2013
@@ -0,0 +1,42 @@
+/*
+ * 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.notifier;
+
+import org.apache.cxf.wsn.client.NotificationBroker;
+import org.apache.servicemix.examples.cxf.base.Email;
+import org.osgi.framework.ServiceReference;
+
+public class Notifier {
+
+    private NotificationBroker notificationBroker;
+
+    private String topic;
+
+    public void setTopic(String topic) {
+        this.topic = topic;
+    }
+
+    public void setNotificationBroker(ServiceReference reference) {
+        this.notificationBroker = new NotificationBroker((String)reference.getProperty("address"),Email.class);
+    }
+
+    public void emailNotify(Email email){
+
+        notificationBroker.notify(topic,email);
+    }
+
+}

Added: servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/java/org/apache/servicemix/examples/cxf/notifier/SpamGenerator.java
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/java/org/apache/servicemix/examples/cxf/notifier/SpamGenerator.java?rev=1480872&view=auto
==============================================================================
--- servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/java/org/apache/servicemix/examples/cxf/notifier/SpamGenerator.java (added)
+++ servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/java/org/apache/servicemix/examples/cxf/notifier/SpamGenerator.java Fri May 10 03:48:42 2013
@@ -0,0 +1,40 @@
+/*
+ * 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.notifier;
+
+import org.apache.servicemix.examples.cxf.base.Email;
+
+import java.util.Random;
+
+public class SpamGenerator {
+
+    private Email[] spam;
+    private Random random;
+
+    public void init(){
+        random = new Random();
+        spam = new Email[3];
+        String youradress = "you@mail.com";
+        spam[0] = new Email("free@cookieman.com",youradress,"Free Cookies!","Send us 10 dollar for a FREE basket full of delicious cookies!");
+        spam[1] = new Email("youwon@lottery.com",youradress,"You are a WINNER!","You won the jackpot 100.000.000, please claim your price at our HQ in Atlantis.");
+        spam[2] = new Email("gold@theshinymarket.com",youradress,"Buy cheap gold now!","Please send us your credit card number and receive gold at very cheap prices!");
+    }
+
+    public Email spamMessage(){
+        return spam[random.nextInt(spam.length)];
+    }
+}

Added: servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/resources/OSGI-INF/blueprint/blueprint.xml
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/resources/OSGI-INF/blueprint/blueprint.xml?rev=1480872&view=auto
==============================================================================
--- servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/resources/OSGI-INF/blueprint/blueprint.xml (added)
+++ servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/resources/OSGI-INF/blueprint/blueprint.xml Fri May 10 03:48:42 2013
@@ -0,0 +1,51 @@
+<?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.
+-->
+
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
+           xsi:schemaLocation="
+      http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+    <cm:property-placeholder persistent-id="org.apache.servicemix.examples.cxf.client" update-strategy="reload">
+        <cm:default-properties>
+            <cm:property name="topic" value="MyTopic" />
+        </cm:default-properties>
+    </cm:property-placeholder>
+
+    <reference id="broker" interface="org.oasis_open.docs.wsn.brw_2.NotificationBroker"/>
+
+    <bean id="notifier" class="org.apache.servicemix.examples.cxf.notifier.Notifier">
+        <property name="notificationBroker" ref="broker" />
+        <property name="topic" value="${topic}" />
+    </bean>
+
+    <bean id="spamGenerator" class="org.apache.servicemix.examples.cxf.notifier.SpamGenerator" init-method="init" />
+
+    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
+        <route id="spammer">
+            <from uri="timer:spammer?period=5000"/>
+            <bean method="spamMessage" ref="spamGenerator" />
+            <bean method="emailNotify" ref="notifier" />
+            <log message="Spam message send: ${body.subject}"/>
+        </route>
+    </camelContext>
+
+</blueprint>

Propchange: servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-notifier/src/main/resources/OSGI-INF/blueprint/blueprint.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/pom.xml?rev=1480872&view=auto
==============================================================================
--- servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/pom.xml (added)
+++ servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/pom.xml Fri May 10 03:48:42 2013
@@ -0,0 +1,64 @@
+<?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.
+    -->
+
+    <parent>
+        <artifactId>cxf-wsn</artifactId>
+        <groupId>org.apache.servicemix.examples</groupId>
+        <version>5.0.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>cxf-wsn-receive</artifactId>
+    <packaging>bundle</packaging>
+
+
+    <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.apache.servicemix.examples.cxf.base,*</Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.cxf.services.wsn</groupId>
+            <artifactId>cxf-services-wsn-core</artifactId>
+            <version>${cxf-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+        </dependency>
+    </dependencies>
+
+
+
+
+</project>
\ No newline at end of file

Added: servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/src/main/java/org/apache/servicemix/examples/cxf/receive/Subscriber.java
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/src/main/java/org/apache/servicemix/examples/cxf/receive/Subscriber.java?rev=1480872&view=auto
==============================================================================
--- servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/src/main/java/org/apache/servicemix/examples/cxf/receive/Subscriber.java (added)
+++ servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/src/main/java/org/apache/servicemix/examples/cxf/receive/Subscriber.java Fri May 10 03:48:42 2013
@@ -0,0 +1,55 @@
+/*
+ * 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.receive;
+
+import org.apache.cxf.wsn.client.NotificationBroker;
+import org.apache.cxf.wsn.client.Subscription;
+import org.osgi.framework.ServiceReference;
+import javax.xml.transform.dom.DOMSource;
+
+
+public class Subscriber {
+
+    private String endPoint;
+    private Subscription subscription;
+    private NotificationBroker notificationBroker;
+    private String topic;
+    private DOMSource lala;
+
+    public Subscriber() {
+    }
+
+    public void setEndPoint(String endPoint) {
+        this.endPoint = endPoint;
+    }
+
+    public void setNotificationBroker(ServiceReference reference) {
+        this.notificationBroker = new NotificationBroker((String)reference.getProperty("address"));
+    }
+
+    public void setTopic(String topic) {
+        this.topic = topic;
+    }
+
+    public void init() throws Exception {
+       subscription = notificationBroker.subscribe(new Subscription(endPoint),topic);
+    }
+
+    public void destroy() throws Exception {
+       subscription.unsubscribe();
+    }
+}

Added: servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/src/main/resources/OSGI-INF/blueprint/blueprint.xml
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/src/main/resources/OSGI-INF/blueprint/blueprint.xml?rev=1480872&view=auto
==============================================================================
--- servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/src/main/resources/OSGI-INF/blueprint/blueprint.xml (added)
+++ servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/src/main/resources/OSGI-INF/blueprint/blueprint.xml Fri May 10 03:48:42 2013
@@ -0,0 +1,63 @@
+<?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.
+-->
+
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
+           xmlns:emailns="urn:org.apache.servicemix:wsn"
+           xsi:schemaLocation="
+      http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
+        http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd">
+
+    <!-- AdminConfig property place holder for the org.apache.servicemix.examples.cxf.receive"  -->
+    <cm:property-placeholder persistent-id="org.apache.servicemix.examples.cxf.receive" update-strategy="reload">
+        <cm:default-properties>
+            <cm:property name="endpoint" value="http://localhost:12345/test/"/>
+            <cm:property name="topic" value="MyTopic" />
+        </cm:default-properties>
+    </cm:property-placeholder>
+
+    <reference id="broker" interface="org.oasis_open.docs.wsn.brw_2.NotificationBroker"/>
+
+    <bean id="subscriber" class="org.apache.servicemix.examples.cxf.receive.Subscriber" init-method="init" destroy-method="destroy">
+        <property name="endPoint" value="${endpoint}" />
+        <property name="topic" value="${topic}" />
+        <property name="notificationBroker" ref="broker" />
+    </bean>
+
+    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
+        <route id="notifier">
+            <from uri="jetty:{{endpoint}}"/>
+            <convertBodyTo type="java.lang.String"/>
+            <transform>
+                <xpath>//emailns:email</xpath>
+            </transform>
+            <unmarshal>
+                <jaxb prettyPrint="true" contextPath="org.apache.servicemix.examples.cxf.base"/>
+            </unmarshal>
+            <log message="\n\n### YOU GOT MAIL ####\nFrom: ${body.from}\nTo: ${body.to}\nSubject: ${body.subject}?\n${body.body}\n"/>
+        </route>
+    </camelContext>
+
+</blueprint>
+
+
+
+

Propchange: servicemix/smx5/trunk/examples/cxf/cxf-wsn/cxf-wsn-receive/src/main/resources/OSGI-INF/blueprint/blueprint.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: servicemix/smx5/trunk/examples/cxf/cxf-wsn/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/examples/cxf/cxf-wsn/pom.xml?rev=1480872&view=auto
==============================================================================
--- servicemix/smx5/trunk/examples/cxf/cxf-wsn/pom.xml (added)
+++ servicemix/smx5/trunk/examples/cxf/cxf-wsn/pom.xml Fri May 10 03:48:42 2013
@@ -0,0 +1,45 @@
+<?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>
+    <modules>
+        <module>cxf-wsn-client</module>
+        <module>cxf-wsn-receive</module>
+        <module>cxf-wsn-notifier</module>
+        <module>cxf-wsn-base</module>
+    </modules>
+
+    <parent>
+        <groupId>org.apache.servicemix.examples</groupId>
+        <artifactId>cxf</artifactId>
+        <version>5.0.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>cxf-wsn</artifactId>
+    <packaging>pom</packaging>
+    <name>Apache ServiceMix :: Examples :: CXF WSN</name>
+    <description>CXF example using WSN</description>
+
+    <properties>
+        <cxf-version>2.7.5-SNAPSHOT</cxf-version>
+    </properties>
+
+</project>
\ No newline at end of file

Modified: servicemix/smx5/trunk/examples/cxf/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/examples/cxf/pom.xml?rev=1480872&r1=1480871&r2=1480872&view=diff
==============================================================================
--- servicemix/smx5/trunk/examples/cxf/pom.xml (original)
+++ servicemix/smx5/trunk/examples/cxf/pom.xml Fri May 10 03:48:42 2013
@@ -42,6 +42,7 @@
         <module>cxf-ws-security-blueprint</module>
         <module>cxf-ws-rm</module>
         <module>cxf-ws-security-signature</module>
+        <module>cxf-wsn</module>
     </modules>
 
 </project>



Mime
View raw message