You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ff...@apache.org on 2009/09/22 08:59:49 UTC

svn commit: r817515 [1/2] - in /servicemix/smx4/features/trunk/examples: ./ bridge-camel/ bridge/ camel-nmr/ camel-osgi/ camel/ cxf-camel-nmr/ cxf-jaxrs/ cxf-nmr/ cxf-osgi/ cxf-ws-addressing/ cxf-wsdl-first-osgi-package/ cxf-wsdl-first/ simple/

Author: ffang
Date: Tue Sep 22 06:59:48 2009
New Revision: 817515

URL: http://svn.apache.org/viewvc?rev=817515&view=rev
Log:
[SMX4-366]update examples with karaf syntax

Modified:
    servicemix/smx4/features/trunk/examples/README.txt
    servicemix/smx4/features/trunk/examples/bridge-camel/README.txt
    servicemix/smx4/features/trunk/examples/bridge/README.txt
    servicemix/smx4/features/trunk/examples/camel-nmr/README.txt
    servicemix/smx4/features/trunk/examples/camel-osgi/README.txt
    servicemix/smx4/features/trunk/examples/camel/README.txt
    servicemix/smx4/features/trunk/examples/cxf-camel-nmr/README.txt
    servicemix/smx4/features/trunk/examples/cxf-jaxrs/README.txt
    servicemix/smx4/features/trunk/examples/cxf-nmr/README.txt
    servicemix/smx4/features/trunk/examples/cxf-osgi/README.txt
    servicemix/smx4/features/trunk/examples/cxf-ws-addressing/README.txt
    servicemix/smx4/features/trunk/examples/cxf-wsdl-first-osgi-package/README.txt
    servicemix/smx4/features/trunk/examples/cxf-wsdl-first/README.txt
    servicemix/smx4/features/trunk/examples/simple/README.txt

Modified: servicemix/smx4/features/trunk/examples/README.txt
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/README.txt?rev=817515&r1=817514&r2=817515&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/examples/README.txt (original)
+++ servicemix/smx4/features/trunk/examples/README.txt Tue Sep 22 06:59:48 2009
@@ -77,12 +77,9 @@
 - cxf-wsdl-first-osgi-package
   Publishes, as OSGi bundles, a WSDL-defined web service created using CXF.
 
-- kernel-demos
-  Embeds the ServiceMix Kernel in a web application.
-  
 - simple
-  Adds new endpoints using only XML configuration files.
-  
+  Adds new endpoints using XML configuration files only.
+
 
 Prerequisites for Running the Examples
 =========================================
@@ -92,7 +89,6 @@
 You must have JDK 1.5 or higher installed on your machine to
 run the ServiceMix examples.
 
-
 Apache Maven
 ------------
 The examples use Apache Maven for building code. You must install
@@ -105,7 +101,15 @@
 locally stored JARs where possible.
 
 To download and find out more about Maven, visit:
-http://maven.apache.org
+  http://maven.apache.org
+
+ServiceMix Container
+--------------------
+You must have ServiceMix up and running. To start the ServiceMix
+container, run the following command:
+
+  <servicemix_home>/bin/karaf          (on UNIX)
+  <servicemix_home>\bin\karaf          (on Windows)
 
 
 ServiceMix Features Facility
@@ -116,34 +120,29 @@
 a feature are contained in a features definition file. The ServiceMix
 console includes a features subshell that provides commands to enable
 you to add and remove features, and to point to feature repositories.
-If you add a feature, the ServiceMix container uses the details
-provided in the features definition file to load and activate all of
-the required bundles that are not already present in the container.
+If you add a feature, ServiceMix uses the details provided in
+the features definition file to load and activate all of the
+required bundles that are not already present in the container.
 
 ServiceMix includes a number of features that make the running of
 the examples quick and easy. Each feature enables you to use a single
 command to install the example bundle and any bundles that the example
 depends on.
 
-To view a list of available features commands, enter the following
-command in the ServiceMix console:
-
-  features/help
-
 To view a list of the features that are already installed, enter
 the following command in the ServiceMix console:
 
-  features/list
+  features:list
 
 To view a list of the features that are used by the examples, enter
 the following command in the ServiceMix console:
 
-  features/list | grep examples
+  features:list | grep examples
 
 To view the repository URLs currently associated with the features
 facility, enter the following command in the ServiceMix console:
 
-  features/listUrl
+  features:listUrl
 
 To view the contents of the features definition file that includes
 definitions for each of the features used by the examples, enter the

Modified: servicemix/smx4/features/trunk/examples/bridge-camel/README.txt
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/bridge-camel/README.txt?rev=817515&r1=817514&r2=817515&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/examples/bridge-camel/README.txt (original)
+++ servicemix/smx4/features/trunk/examples/bridge-camel/README.txt Tue Sep 22 06:59:48 2009
@@ -15,35 +15,137 @@
  * limitations under the License.
  */
 
-Welcome to the ServiceMix Bridge Camel Example
-========================================
+CAMEL BRIDGE EXAMPLE
+====================
 
-This example shows a bridge between the HTTP and JMS protocols,
-with an XSLT transformation using Camel in between.
+Purpose
+-------
+Demonstrates how to use Camel and JBI to create a protocol bridge
+that receives a message via HTTP, transforms it and sends it to a
+JMS queue.
+
+This example uses the Camel integration framework. The bridge
+example, on the other hand, uses the older ServiceMix EIP
+implementation to achieve the same result. For more details on
+how Camel compares to ServiceMix EIP, see:
+
+http://camel.apache.org/how-does-camel-compare-to-servicemix-eip.html
+
+
+Explanation
+-----------
+The bridge consists of three JBI Service Units (SUs) wrapped up
+in a JBI Service Assembly (SA) that is deployed to ServiceMix.
+
+The three SUs can be described as follows:
+
+1. HTTP SU (see the bridge/bridge-http-su directory)
+   A HTTP endpoint that listens on port 8192 for HTTP requests.
+
+2. JMS SU (see the bridge/bridge-jms-su directory)
+   An ActiveMQ JMS endpoint to which Camel sends messages.
+   
+3. Camel SU (see the bridge-camel-su directory)
+   A Camel route that receives messages from the HTTP endpoint,
+   transforms them using an XSLT stylesheet, logs them, and then
+   sends them to the JMS endpoint.
+   
+   The Camel routing information is contained in the camel-context.xml
+   file, which is located in the ./bridge-camel-su/src/main/resources
+   directory, and is shown below:
+
+    <route>
+      <from uri="jbi:endpoint:http://servicemix.apache.org/samples/bridge/pipeline/endpoint"/>
+      <to uri="xslt:bridge.xslt"/>
+      <to uri="log:org.apache.servicemix.example?level=INFO"/>
+      <to uri="jbi:endpoint:http://servicemix.apache.org/samples/bridge/jms/endpoint"/>
+    </route>
+
+The bridge-camel-sa directory contains the POM file that tells
+Maven how to build the SA.
+   
+
+Prerequisites for Building and Running this Example
+---------------------------------------------------
+1. You must have the following installed on your machine:
+
+   - JDK 1.5 or higher.
+
+   - Apache Maven 2.0.6 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/karaf	(on UNIX)
+  <servicemix_home>\bin\karaf	(on Windows)
+
+
+Building and Deploying
+----------------------
+This example uses the ServiceMix JBI Maven plugin to build the SUs
+and the SA. To build the example, run the following command
+(from the directory that contains this README):
 
-First start a ServiceMix server (if not already started) by running
-  bin/servicemix
-in the root dir of this ditribution.
-
-To start this sample, run:
   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 SA, called bridge-camel-sa-${version}.zip,
+in the bridge-camel-sa/target directory.
+
+You can deploy the SA in two ways:
+
+- Using Hot Deployment
+  --------------------
+  
+  Copy the bridge-camel-sa/target/bridge-camel-sa-${version}.zip
+  to the <servicemix_home>/deploy directory.
+     
+- Using the ServiceMix Console
+ -----------------------------
+  
+  Type the following command:
+
+  osgi:install -s mvn:org.apache.servicemix.examples.bridge-camel/bridge-camel-sa/${version}/zip
+ 
+ 
+Running a Client
+----------------
+To run the web client:
+
+1. Open the client.html, which is located in the same directory as this
+   README file, in your favorite browser.
+
+2. Send a HTTP request. It will be transformed into a JMS message.
+
+   Once the JMS message has been successfully sent to the bridge.output
+   queue,  you will receive an HTTP STATUS 202 response code from the ESB.
+
+To run the java code client:
+
+1. Change to the <servicemix_home>/examples/bridge-camel/client
+   directory.
+
+2. Run the following command:
+
+     mvn compile exec:java
+
+
+Viewing the Log Entries
+-----------------------
+You can view the message that is sent by viewing the entries
+in the karaf.log file in the data/log directory of your
+ServiceMix installation, or by typing the following
+command in the ServiceMix console:
 
-You can deploy the example on ServiceMix 4 in two different ways:
-- using hotdeploy:
-   copy the bridge-camel-sa/target/bridge-camel-sa-${version}.zip to
-<servicemix_home>/deploy
-- using the ServiceMix console:
-   osgi/install -s
-mvn:org.apache.servicemix.examples.bridge-camel/bridge-camel-sa/${version}/zip
-
-You can then launch the client.html in your favorite browser
-and send an HTTP request which will be transformed in a JMS
-message.  After the JMS message has been sent to the bridge.output queue
-successfully,
-you will receive an HTTP STATUS 202 response code from the ESB.
-Or you can launch java code client to send the request
-cd client; mvn compile exec:java
+  log:display
 
-For more information on running this example please see:
-  http://servicemix.apache.org/bridge.html
 
+Changing the Example
+--------------------
+If you change the code or configuration in this example, use 'mvn install'
+to rebuild the SA, and deploy it as described above.

Modified: servicemix/smx4/features/trunk/examples/bridge/README.txt
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/bridge/README.txt?rev=817515&r1=817514&r2=817515&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/examples/bridge/README.txt (original)
+++ servicemix/smx4/features/trunk/examples/bridge/README.txt Tue Sep 22 06:59:48 2009
@@ -77,10 +77,10 @@
    examples directory.
 
 
-2. Launch the ServiceMix server by running the following command:
+2. Start ServiceMix by running the following command:
 
-  <servicemix_home>/bin/servicemix          (on UNIX)
-  <servicemix_home>\bin\servicemix          (on Windows)
+  <servicemix_home>/bin/karaf          (on UNIX)
+  <servicemix_home>\bin\karaf          (on Windows)
   
 
 Building and Deploying
@@ -112,7 +112,7 @@
   
   Type the following command:
 
-  osgi/install -s mvn:org.apache.servicemix.examples.bridge/bridge-sa/${version}/zip
+  osgi:install -s mvn:org.apache.servicemix.examples.bridge/bridge-sa/${version}/zip
 
 
 Running a Client
@@ -140,11 +140,11 @@
 Viewing the Log Entries
 -----------------------
 You can view the message that is sent by viewing the log entries
-in the servicemix.log file in the data/log directory of your
+in the karaf.log file in the data/log directory of your
 ServiceMix installation, or by typing the following
 command in the ServiceMix console:
 
-  log/d
+  log:display
   
 
 Changing the Example
@@ -157,4 +157,5 @@
 More Information
 ----------------
 For more information about this example, see:
+
   http://servicemix.apache.org/creating-a-protocol-bridge.html

Modified: servicemix/smx4/features/trunk/examples/camel-nmr/README.txt
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/camel-nmr/README.txt?rev=817515&r1=817514&r2=817515&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/examples/camel-nmr/README.txt (original)
+++ servicemix/smx4/features/trunk/examples/camel-nmr/README.txt Tue Sep 22 06:59:48 2009
@@ -15,60 +15,177 @@
  * limitations under the License.
  */
 
-Welcome to the ServiceMix camel nmr example
-==========================================
+CAMEL OSGI NMR EXAMPLE
+======================
 
-This example demonstrates using Apache Camel to deploy EIP routes in
-Servicemix.
+Purpose
+-------
+Deploys two Camel EIP routes that communicate with each other
+via the ServiceMix NMR.
 
-Quick steps to install the sample
----------------------------------
 
-Launch the ServiceMix Kernel by running
-  bin/servicemix
-in the root dir of this distribution.
+Explanation
+-----------
+The NMR is a general-purpose message bus that applications can
+use to communicate within the ServiceMix OSGi container. It is
+modeled on the Normalized Message Router (NMR) defined in the 
+Java Business Integration (JBI) specification.
 
-When inside the console, if you haven't already done so, addUrls for the
-nmr and kernel features:
-  features/addUrl mvn:org.apache.servicemix.nmr/apache-servicemix-nmr/${servicemix.nmr.version}/xml/features
-  features/addUrl mvn:org.apache.servicemix.features/apache-servicemix/${version}/xml/features
+The Camel routes are defined in the beans.xml file that is located
+in the src/main/resources/META-INF/spring directory of this example.
+The contents of the beans.xml file can be explained as follows:
 
-Next install the examples-camel-nmr feature:
-  features/install examples-camel-nmr
+1. Imports the camel-nmr.xml file, which instantiates and
+   initializes the NMR component.
 
-If you have all the bundles available in your local repo, the installation
-of the example will be very fast, otherwise it may take some time to
-download everything needed.
+2. Defines a route that generates a heartbeat message every
+   2000ms and sends it to the NMR.
 
-Testing the example
--------------------
-
-Once the example feature is installed, periodic events are routed to the
-NMR to the transform method of the MyTransform class and finally to the
-ExampleRouter log endpoint.  The transform method will print the messages
-to the console: 
+3. Defines a second route that receives the message from the NMR,
+   transforms the heartbeat into a message containing the current
+   date and time, and logs the message.
 
->>>> MyTransform set body:  Tue Jun 10 16:56:47 NDT 2008
+The routes are deployed in an OSGi bundle.
+   
 
-You can view the route configuration in META-INF/spring/beans.xml.
+Prerequisites for Building and Running the Example
+--------------------------------------------------
+1. You must have the following installed on your machine:
 
-Finally, uninstall the examples-camel-nmr feature:
-  features/uninstall examples-camel-nmr
+   - JDK 1.5 or higher
 
-As well, you can view the log entries in the ServiceMix log:
-  log/d
+   - Maven 2.0.6 or higher (for building)
+   
+  For more information, see the README in the top-level examples
+  directory.
 
-How does it work?
------------------
 
-The installation leverages ServiceMix Kernel by installing what's called
-'features'. You can see the features definition file using the following
-command inside the ServiceMix console:
+2. Start ServiceMix by running the following command:
 
-optional/cat mvn:org.apache.servicemix.features/apache-servicemix/${version}/xml/features
+  <servicemix_home>/bin/karaf          (on UNIX)
+  <servicemix_home>\bin\karaf          (on Windows)
 
-The list of available features can be obtained using:
 
-features/list
+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 quickly.
+
+- 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-camel-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.
+
+Once the example is running you should see output similar to
+the following being logged to the console screen:
+
+>>>> MyTransform set body:  Wed Aug 05 11:52:40 BST 2009
+>>>> MyTransform set body:  Wed Aug 05 11:52:42 BST 2009
+>>>> MyTransform set body:  Wed Aug 05 11:52:44 BST 2009
+
+For information on how to stop and/or uninstall the example,
+see "Stopping and Uninstalling the Example" below.
+
+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
+   examples-camel-nmr feature by entering the following command
+   in the ServiceMix console:
+
+     features:uninstall examples-camel-nmr
+
+2. Build the example by opening a command prompt, changing
+   directory to examples/camel-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 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-camel-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.
+   
+Once the example is running you should see output similar to the
+following being logged to the console screen:
+
+>>>> MyTransform set body:  Wed Aug 05 11:52:40 BST 2009
+>>>> MyTransform set body:  Wed Aug 05 11:52:42 BST 2009
+>>>> MyTransform set body:  Wed Aug 05 11:52:44 BST 2009
+
+
+Stopping and Uninstalling the Example
+-------------------------------------
+To stop the example, first you must know the bundle ID that ServiceMix
+has assigned to it. To get the bundle ID, enter the following command
+in the ServiceMix console (Note, the text you are typing will
+intermingle with the output being logged. This is nothing to worry
+about.): 
+
+  osgi:list
+
+At the end of the listing, you should see an entry similar to the
+following:
+
+  [160] [Active     ] [Started] [  60] Apache ServiceMix Example :: Camel NMR (4.1.0.0)
+
+In this case, the bundle ID is 160.
+
+To stop the example, enter the following command in the ServiceMix
+console:
+
+  osgi:stop <bundle_id>
+
+For example:
+
+  osgi:stop 160
+
+To uninstall the example, enter one of the following commands
+in the ServiceMix console:
+
+  features:uninstall examples-camel-nmr
+
+or
+
+  osgi:uninstall <bundle_id>
+  
+
+Viewing the Log Entries
+-----------------------
+You can view the log entries in the karaf.log file in the data/log
+directory of your ServiceMix installation, or by typing the following
+command in the ServiceMix console:
 
+  log:display

Modified: servicemix/smx4/features/trunk/examples/camel-osgi/README.txt
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/camel-osgi/README.txt?rev=817515&r1=817514&r2=817515&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/examples/camel-osgi/README.txt (original)
+++ servicemix/smx4/features/trunk/examples/camel-osgi/README.txt Tue Sep 22 06:59:48 2009
@@ -20,9 +20,9 @@
 
 Purpose
 -------
-This example demonstrates how to deploy a Camel EIP route as an OSGi
-bundle in ServiceMix. The example also shows you how to use OSGi
-property placeholders and how to deploy the properties file from the
+Deploys a Camel EIP route as an OSGi bundle. Configuration makes use
+of the OSGi Configuration Admin service and Spring property placeholders,
+and the example demonstrates how to deploy the properties file from the
 ServiceMix console.
 
 
@@ -50,8 +50,7 @@
    values using the OSGi Configuration Admin service. In this case, the 
    property is also given the default value of "MyTransform".
    
-The route and configuration is deployed to the ServiceMix container as
-an OSGi bundle.   
+The route and configuration are deployed in an OSGi bundle.   
 
    
 Prerequisites for Running the Example
@@ -65,10 +64,10 @@
   For more information, see the README in the top-level examples
   directory.
 
-2. Start a ServiceMix server by running the following command:
+2. Start ServiceMix by running the following command:
 
-    <servicemix_home>/bin/servicemix          (on UNIX)
-    <servicemix_home>\bin\servicemix          (on Windows)
+    <servicemix_home>/bin/karaf          (on UNIX)
+    <servicemix_home>\bin\karaf          (on Windows)
 
 
 Running the Example
@@ -87,12 +86,12 @@
   download the bundles it needs.
 
 
-A. Using a Prebuilt Deployment Bundle
--------------------------------------
+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-camel-osgi
+  features:install examples-camel-osgi
   
 This command makes use of the ServiceMix features facility. For more
 information about the features facility, see the README.txt file in the
@@ -111,9 +110,9 @@
 You can update and redeploy the properties file that is used by the
 properties placeholder in the beans.xml from console as follows:
 
-1. Edit the org.apache.servicemix.examples.cfg file located in this
-   folder by changing the value of the "prefix" key to whatever you
-   want (for example, YourTransform).
+1. Edit the org.apache.servicemix.examples.cfg file, located in the
+   same folder as this README, by changing the value of the "prefix"
+   key to whatever you want (for example, YourTransform).
   
 2. Copy the updated configuration file to your <servicemix_home>/etc
    directory. You can do this from the ServiceMix console by typing:
@@ -123,8 +122,8 @@
 
    On Windows you need to replace / in the path with \\.
 
-   Note, the text you are typing might intermingle with the output being
-   logged. This is nothing to worry about.
+   Note, the text you are typing might intermingle with the output
+   being logged. This is nothing to worry about.
 
 3. Restart the example bundle:
 
@@ -132,19 +131,19 @@
        to it. To get the bundle ID, enter the following command in the
        ServiceMix console:
 
-         osgi/list
+         osgi:list
 
       At the end of the listing, you should see an entry similar to
       the following:
 
-      [158] [Active     ] [Started  ] [  60] Apache ServiceMix Example :: Camel OSGi (4.1.0.fuse)
+      [158] [Active     ] [Started  ] [  60] Apache ServiceMix Example :: Camel OSGi (4.1.0)
  
       In this case, the bundle ID is 158.
 
-   (ii) Enter the following command at the ServiceMix console to
+   (ii) Enter the following command in the ServiceMix console to
         restart the bundle:
     
-          osgi/restart <bundle_id>
+          osgi:restart <bundle_id>
   
   The prefix of the output should change, and the output should look
   similar to the following:
@@ -166,7 +165,7 @@
    described above, you must first uninstall the examples-camel-osgi
    feature by entering the following command in the ServiceMix console:
 
-     features/uninstall examples-camel-osgi
+     features:uninstall examples-camel-osgi
 
 2. Build the example by opening a command prompt, changing directory to
    examples/camel-osgi (this example) and entering the following Maven
@@ -182,10 +181,10 @@
    copies it to your local Maven repository and to the target directory
    of this example.
      
-3. The easiest way to install the example bundle that you just built
-   is to enter the following command in the ServiceMix console:
+3. Install the example by entering the following command in
+   the ServiceMix console:
    
-     features/install examples-camel-osgi
+     features:install examples-camel-osgi
        
    It makes use of the ServiceMix features facility. For more information
    about the features facility, see the README.txt file in the examples
@@ -211,7 +210,7 @@
 To stop the example, enter the following command in the ServiceMix
 console:
 
-  osgi/stop <bundle_id>
+  osgi:stop <bundle_id>
 
 For information on how to find the bundle_id assigned to the example,
 see step 3 in the "Updating and Redeploying the Properties File 
@@ -220,17 +219,17 @@
 To uninstall the example, enter one of the following commands in
 the ServiceMix console:
 
-  features/uninstall examples-camel-osgi
+  features:uninstall examples-camel-osgi
  
 or
  
-  osgi/uninstall <bundle_id>
+  osgi:uninstall <bundle_id>
   
 
 Viewing the Log Entries
 -----------------------
-You can view the log entries in the servicemix.log file in the
+You can view the log entries in the karaf.log file in the
 data/log directory of your ServiceMix installation, or by typing
 the following command in the ServiceMix console:
 
-  log/d
+  log:display

Modified: servicemix/smx4/features/trunk/examples/camel/README.txt
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/camel/README.txt?rev=817515&r1=817514&r2=817515&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/examples/camel/README.txt (original)
+++ servicemix/smx4/features/trunk/examples/camel/README.txt Tue Sep 22 06:59:48 2009
@@ -15,31 +15,117 @@
  * limitations under the License.
  */
 
-Welcome to the ServiceMix Camel Example
-=======================================
+CAMEL JAVA JBI EXAMPLE
+======================
 
-This example shows how to use Apache Camel to deploy EIP routes
+Purpose
+-------
+Write a simple Camel EIP route in Java, and deploy it as a JBI
+component.
+
+
+Explanation
+-----------
+The Camel route is written in Java and can be found in the 
+MyRouteBuilder.java file, which is located in the following
+directory of this example:
 
-You can run this example using an embedded ServiceMix install via
-  cd camel-sa
-  mvn jbi:servicemix
+  camel-simple-su/src/main/java/org/apache/servicemix/samples
+  
+The contents of the MyRouteBuilder.java file can be described as
+follows:
+
+- Defines a MyRouteBuilder class that extends
+  org.apache.camel.builder.RouteBuilder.
+
+- Writes a configure() method that sets up the route.
+
+- The route does the following:
+
+  1. Uses the Camel timer component to create a heartbeat event
+     every second.
+  2. Sets the event message body to "Hello World".
+  3. Forwards the message to a logger.
+
+
+The Camel configuration file, camel-context.xml, specifies the name of
+the Java package containing one or more RouteBuiler classes. When the
+application is deployed, Camel searches the specified Java package for
+any classes that inherit from RouteBuilder. All such classes are
+instantiated and registered with the CamelContext object, thereby
+installing and activating the Java routes. The camel-content.xml
+configuration file is located in the following directory of this
+example:
+
+  camel-simple-su/src/main/resources 
+
+
+Prerequisites for Running the Example
+-------------------------------------
+1. You must have the following installed on your machine:
+
+   - JDK 1.5 or higher
+   
+   - Maven 2.0.6 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/karaf          (on UNIX)
+  <servicemix_home>\bin\karaf          (on Windows)
 
-Or if you prefer you can start a ServiceMix server (if not already started) by running
-  bin/servicemix
-in the root dir of this ditribution.
 
-To start this sample, run:
+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 service assembly, called
+camel-sa-${version}.zip, in the camel-sa/target directory.
+
+You can deploy the example in two ways:
+
+- Using Hot Deployment
+  --------------------
+  
+  Copy the camel-sa/target/camel-sa-${version}.zip to the 
+  <servicemix_home>/deploy directory.
+
 
-You can deploy the example on ServiceMix 4 in two different ways:
-- using hotdeploy: 
-   copy the camel-sa/target/camel-sa-${version}.zip to <servicemix_home>/deploy
-- using the ServiceMix console:
-   osgi/install -s mvn:org.apache.servicemix.examples.camel/camel-sa/${version}/zip
+- Using the ServiceMix Console
+  ----------------------------
+
+  Enter the following command:
+  
+  osgi:install -s mvn:org.apache.servicemix.examples.camel/camel-sa/${version}/zip
+
+
+Once deployed, you can view the following logged message in the
+karaf.log file in the data/log directory of your ServiceMix
+installation, or by typing 'log:display' in the ServiceMix console:
 
-When the example is deployed, use 'log/d' on the ServiceMix console to see the logged messages
   Exchange[BodyType:String, Body:Hello World!]
   
-For more information on running this example please see:
-  http://servicemix.apache.org/camel-example.html
 
+Changing the Example
+--------------------
+If you want to change the code or configuration in this example,
+use 'mvn install' to rebuild the JBI Service Assembly zip, and
+deploy it as described above.
+
+
+More Information
+----------------
+For more information on running this example, see:
+  
+http://servicemix.apache.org/camel-example.html
\ No newline at end of file

Modified: servicemix/smx4/features/trunk/examples/cxf-camel-nmr/README.txt
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/cxf-camel-nmr/README.txt?rev=817515&r1=817514&r2=817515&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/examples/cxf-camel-nmr/README.txt (original)
+++ servicemix/smx4/features/trunk/examples/cxf-camel-nmr/README.txt Tue Sep 22 06:59:48 2009
@@ -15,55 +15,182 @@
  * limitations under the License.
  */
 
-Welcome to the ServiceMix cxf camel nmr example
-==========================================
+CXF, CAMEL and NMR EXAMPLE
+==========================
 
-This example demonstrates the use of CXF and CAMEL exposed to the ServiceMix
-nmr.
+Purpose
+-------
+Create a Camel route that transforms a message, then passes it to a
+CXF web service via the NMR.
 
-Quick steps to install the sample
----------------------------------
 
-Launch the ServiceMix Kernel by running
-  bin/servicemix
-in the root dir of this distribution.
+Explanation
+-----------
+The Camel route is defined in the beans.xml file that is located
+in the src/main/resources/META-INF/spring directory of this example.
 
-When inside the console, just run the following commands to install the
-example:
+The route is defined in the <route> element and can be explained
+as follows:
 
-  features/addUrl mvn:org.apache.servicemix.nmr/apache-servicemix-nmr/${servicemix.nmr.version}/xml/features
-  features/addUrl mvn:org.apache.servicemix.features/apache-servicemix/${version}/xml/features
-  features/install examples-cxf-camel-nmr
+1. A message flow is triggered every five seconds.
 
-If you have all the bundles available in your local repo, the installation
-of the example will be very fast, otherwise it may take some time to
-download everything needed.
+2. It is sent to the MyTransform bean, which adds a SOAP message.
 
-Testing the example
--------------------
+3. It is sent via the NMR to the HelloWorld web service.
+
+4. Responses are routed to the display method of the MyTransform
+   class.
 
-When the example is installed, periodic soap messages are displayed by
-the transform method of the MyTransform class.  These messages are routed
-to the CXF endpoint, and the responses are routed to the display method of
-the MyTransform class.
+The web service is defined as follows:
 
-Finally, uninstall the examples-camel-nmr feature:
-  features/uninstall examples-cxf-camel-nmr
+ <jaxws:endpoint id="helloWorld"
+       implementor="org.apache.servicemix.examples.cxfcamel.HelloWorldImpl"
+       address="nmr:HelloWorld" />
 
-You can also examine the ServiceMix log to see the activity:
-  log/display
 
-How does it work?
------------------
+Prerequisites for Running the Example
+-------------------------------------
+1. You must have the following installed on your machine:
 
-The installation leverages ServiceMix Kernel by installing what's called
-'features'. You can see the features definition file using the following
-command inside ServiceMix console:
+   - JDK 1.5 or higher
+   
+   - Maven 2.0.6 or higher
+   
+  For more information, see the README in the top-level examples
+  directory.
 
-optional/cat mvn:org.apache.servicemix.features/apache-servicemix/${version}/xml/features
 
-The list of available features can be obtained using:
+2. Start ServiceMix by running the following command:
 
-features/list
+  <servicemix_home>/bin/karaf          (on UNIX)
+  <servicemix_home>\bin\karaf          (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-camel-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.
+
+Once the example is running, periodic SOAP messages are displayed by
+the transform method of the MyTransform class. These messages are routed
+to the CXF endpoint, and the responses are routed to the display method
+of the MyTransform class. You should see output similar to the following
+being logged to your console screen:
+
+>>>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+<soap:Body><ns1:sayHi xmlns:ns1="http://cxf.examples.servicemix.apache.org/
+"><arg0>Guillaume</arg0></ns1:sayHi></soap:Body></soap:Envelope>
+<<<< <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+<soap:Body><ns2:sayHiResponse xmlns:ns2="http://cxfcamel.examples.
+servicemix.apache.org/"><return>Hello Guillaume</return>
+</ns2:sayHiResponse></soap:Body></soap:Envelope>
+
+For information on how to stop and/or uninstall the example,
+see "Stopping and Uninstalling the Example" below.
+  
+
+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 examples-cxf-camel-nmr
+   feature by entering the following command in the ServiceMix console:
+
+     features:uninstall examples-cxf-camel-nmr
+
+2. Build the example by opening a command prompt, changing directory to
+   examples/cxf-camel-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-camel-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.
+   
+Once the example is running, periodic SOAP messages are displayed by
+the transform method of the MyTransform class. These messages are routed
+to the CXF endpoint, and the responses are routed to the display method
+of the MyTransform class. You should see the messages displayed on your
+console.
+
+
+Stopping and Uninstalling the Example
+-------------------------------------
+To stop the example, you must first know the bundle ID that ServiceMix
+has assigned to it. To get the bundle ID, enter the following command
+in the ServiceMix console (Note, the text you are typing will intermingle
+with the output being logged. This is nothing to worry about.):
+
+  osgi:list
+
+At the end of the listing, you should see an entry similar to the
+following:
+
+  [165] [Active     ] [Started] [  60] Apache ServiceMix Example :: CXF-Camel NMR (4.1.0)
+
+In this case, the bundle ID is 165.
+
+To stop the example, enter the following command in the ServiceMix
+console:
+
+  osgi:stop <bundle_id>
+
+For example:
+
+  osgi:stop 165
+
+To uninstall the example, enter one of the following commands in
+the ServiceMix console:
+
+  features:uninstall examples-cxf-camel-nmr
+ 
+or
+ 
+  osgi:uninstall <bundle_id>
+  
+
+Viewing the Log Entries
+-----------------------
+You can view the log entries in the karaf.log file in the
+data/log directory of your ServiceMix installation, or by typing
+the following command in the ServiceMix console:
 
+  log:display
\ No newline at end of file

Modified: servicemix/smx4/features/trunk/examples/cxf-jaxrs/README.txt
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/cxf-jaxrs/README.txt?rev=817515&r1=817514&r2=817515&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/examples/cxf-jaxrs/README.txt (original)
+++ servicemix/smx4/features/trunk/examples/cxf-jaxrs/README.txt Tue Sep 22 06:59:48 2009
@@ -15,71 +15,217 @@
  * limitations under the License.
  */
 
-Welcome to the ServiceMix cxf JAX-RS example
-============================================
+CXF JAX-RS EXAMPLE
+==================
 
-This example leverages CXF and Spring-DM to create a RESTful web service, 
-and then expose it through the OSGi HTTP Service.
+Purpose
+-------
+Create a RESTful JAX-RS web service using CXF and expose it with the 
+OSGi HTTP Service.
 
-Quick steps to install the sample
----------------------------------
 
-Launch the ServiceMix Kernel by running
+Explanation
+-----------
+The web service is implemented in the CustomerService.java file, which is
+located in the src/main/java/org/apache/servicemix/examples/cxf/jaxrs
+directory of this example. It contains annotations indicating what URIs
+and HTTP methods to use when accessing the resource. For information
+on how to write RESTful web services, please refer to the Apache CXF
+documentation.
 
-  bin/servicemix
+The beans.xml file, located in the src/main/resources/META-INF/
+spring directory:
 
-in the root dir of this distribution.
+1. Imports the configuration files needed to enable CXF to support
+   JAX-RS and to use the OSGi HTTP service.
 
-When inside the console, just run the following commands to install the
-example:
+2. Configures the web service, as follows:
 
-  features/install examples-cxf-jaxrs
+    <jaxrs:server id="customerService" address="/crm">
+        <jaxrs:serviceBeans>
+            <ref bean="customerSvc"/>
+        </jaxrs:serviceBeans>
+    </jaxrs:server>
 
-If you have all the bundles available in your local repo, the installation
-of the example will be very fast, otherwise it may take some time to
-download everything needed.
+    <bean id="customerSvc" class=" org.apache.servicemix.examples.cxf.jaxrs.CustomerService"/>
 
-Testing the example
--------------------
-
-When the feature is installed, output for publishing the cxf endpoint
-is displayed to the console.
-
-Now, just open your browser and go to the following url:
-
-  http://localhost:8181/cxf/crm/customerservice/customers/123
-
-It should display an XML representation for customer 123 (if you use Safari, 
-make sure to right click the window and select 'Show Source', else the page
-will be blank).
 
-Or you can also test it from ServiceMix console using:
+Prerequisites for Running the Example
+-------------------------------------
+1. You must have the following installed on your machine:
 
-  utils/cat http://localhost:8181/cxf/crm/customerservice/customers/123
+   - JDK 1.5 or higher
+   
+   - Maven 2.0.6 or higher
+   
+  For more information, see the README in the top-level examples
+  directory.
 
-Or you can launch a programmatic Java client via:
+2. Start ServiceMix by running the following command:
 
-  mvn compile exec:java
+  <servicemix_home>/bin/karaf          (on UNIX)
+  <servicemix_home>\bin\karaf          (on Windows)
+  
 
-which makes a sequence of RESTful invocations and displays the results.
-
-Alternatively, you can use a command line utility such as curl or wget to make 
-the invocations. Here are some example usages with curl, run from 
-features/<branch>/examples/cxf-jaxrs:
-
-# Create a customer
-#
-#
-curl -X POST -T src/main/resources/org/apache/servicemix/examples/cxf/jaxrs/client/add_customer.xml -H "Content-Type: text/xml" http://localhost:8181/cxf/crm/customerservice/customers
-
-# Retrieve the customer instance with id 123
-#
-curl http://localhost:8181/cxf/crm/customerservice/customers/123
+Running the Example
+-------------------
+You can run the example in two ways:
 
-# Update the customer instance with id 123
-#
-curl -X PUT -T src/main/resources/org/apache/servicemix/examples/cxf/jaxrs/client/update_customer.xml -H "Content-Type: text/xml" http://localhost:8181/cxf/crm/customerservice/customers
+- 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-jaxrs
+  
+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 a Client
+----------------
+You can make invocations on the web service in several ways, including
+using a web client, using a Java client and using a command-line
+utility such a curl or Wget. See below for more details.
+
+(a) To run a web client:
+    -------------------
+Open a browser and go to the following URL:
+
+   http://localhost:8181/cxf/crm/customerservice/customers/123
+
+It should display an XML representation for customer 123.
+
+Note, if you use Safari, right click the window and select 'Show Source'.
+
+(b) To run a Java client:
+    --------------------
+- Change to the <servicemix_home>/examples/cxf-jaxrs
+  directory.
+
+- Run the following command:
+    
+    mvn compile exec:java
+ 
+It makes a sequence of RESTful invocations and displays the results.
+
+(c) To run a command-line utility:
+    -----------------------------
+You can use a command-line utility, such as curl or Wget, to make 
+the invocations. For example, try using curl as follows:
+
+- Open a command prompt and change directory to
+  <servicemix_home>/examples/cxf-jaxrs.
+  
+- Run the following curl commands:
+
+  # Create a customer
+  #
+  #
+  curl -X POST -T src/main/resources/org/apache/servicemix/examples/cxf/jaxrs/client/add_customer.xml -H "Content-Type: text/xml" http://localhost:8080/cxf/crm/customerservice/customers
+
+  # Retrieve the customer instance with id 123
+  #
+  curl http://localhost:8181/cxf/crm/customerservice/customers/123
+ 
+  # Update the customer instance with id 123
+  #
+  curl -X PUT -T src/main/resources/org/apache/servicemix/examples/cxf/jaxrs/client/update_customer.xml -H "Content-Type: text/xml" http://localhost:8080/cxf/crm/customerservice/customers
+  
+  # Delete the customer instance with id 123
+  #
+  curl -X DELETE http://localhost:8181/cxf/crm/customerservice/customers/123
+
+
+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 examples-cxf-jaxrs
+   feature by entering the following command in the ServiceMix console:
+
+     features:uninstall examples-cxf-jaxrs
+
+2. Build the example by opening a command prompt, changing directory to
+   examples/cxf-jaxrs (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-jaxrs
+       
+   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.
+     
+See "Running a Client" above for information on how to make invocations
+on the web service.
+
+
+Stopping and Uninstalling the Example
+-------------------------------------
+To stop the example, you must first know the bundle ID that ServiceMix
+has assigned to it. To get the bundle ID, enter the following command
+in the ServiceMix console (Note, the text you are typing will intermingle
+with the output being logged. This is nothing to worry about.):
+
+  osgi:list
+
+At the end of the listing, you should see an entry similar to the
+following:
+
+  [159] [Active     ] [Started] [  60] Apache ServiceMix Example :: CXF JAX-RS OSGI (4.1.0)
+
+In this case, the bundle ID is 159.
+
+To stop the example, enter the following command in the ServiceMix
+console:
+
+  osgi:stop <bundle_id>
+
+For example:
+
+  osgi:stop 159
+
+To uninstall the example, enter one of the following commands at
+the ServiceMix console:
+
+  features:uninstall examples-cxf-jaxrs
+ 
+or
+ 
+  osgi:uninstall <bundle_id>
+  
+
+Viewing the Log Entries
+-----------------------
+You can view the log entries in the karaf.log file in the
+data/log directory of your ServiceMix installation, or by
+typing the following command in the ServiceMix console:
 
-# Delete the customer instance with id 123
-#
-curl -X DELETE http://localhost:8181/cxf/crm/customerservice/customers/123
+  log:display
\ No newline at end of file

Modified: servicemix/smx4/features/trunk/examples/cxf-nmr/README.txt
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/cxf-nmr/README.txt?rev=817515&r1=817514&r2=817515&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/examples/cxf-nmr/README.txt (original)
+++ servicemix/smx4/features/trunk/examples/cxf-nmr/README.txt Tue Sep 22 06:59:48 2009
@@ -15,34 +15,88 @@
  * limitations under the License.
  */
 
-Welcome to the ServiceMix cxf nmr example
-==========================================
+CXF NMR Example
+===============
 
-This example leverages CXF and Spring-DM to publish a web service to the nmr.
+Purpose
+-------
+Publish a web service written in JAX-WS to the NMR.
 
-Quick steps to install the sample
----------------------------------
 
-Launch the ServiceMix Kernel by running
-  bin/servicemix
-in the root dir of this distribution.
+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.
 
-When inside the console, just run the following commands to install the
-example:
+The beans.xml file, located in the src/main/resources/META-INF/spring
+directory:
 
-  features/addUrl mvn:org.apache.servicemix.nmr/apache-servicemix-nmr/${servicemix.nmr.version}/xml/features
-  features/addUrl mvn:org.apache.servicemix.features/apache-servicemix/${version}/xml/features
-  features/install examples-cxf-nmr
+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:
 
-If you have all the bundles available in your local repo, the installation
-of the example will be very fast, otherwise it may take some time to
-download everything needed.
+  <jaxws:endpoint id="helloWorld"
+	 implementor="org.apache.servicemix.examples.cxf.HelloWorldImpl"
+	 address="nmr:HelloWorld" />
 
-Testing the example
+
+Prerequisites for Running the Example
+-------------------------------------
+1. You must have the following installed on your machine:
+
+   - JDK 1.5 or higher
+   
+   - Maven 2.0.6 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/karaf          (on UNIX)
+  <servicemix_home>\bin\karaf          (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, karaf.log, which can be found 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:
 
-When the feature is installed, output for publishing the cxf endpoint
-is recorded in data/log/servicemix.log:
 10:20:56,169 | INFO  | xtenderThread-76 | ConfigurerImpl                   |
 ransport.nmr.NMRTransportFactory  127 | Could not determine bean name for
 instance of class org.apache.servicemix.cxf.transport.nmr.NMRDestination.
@@ -50,18 +104,45 @@
 e.cxf.frontend.ServerFactoryBean  118 | 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.
 
-How does it work?
------------------
-
-The installation leverages ServiceMix Kernel by installing what's called
-'features'. You can see the features definition file using the following
-command inside ServiceMix console:
-
-optional/cat mvn:org.apache.servicemix.features/apache-servicemix/${version}/xml/features
-
-The list of available features can be obtained using:
-
-features/list
-
-
+To ensure your example deployed successfully, follow the instructions
+outlined in "Verifying the Web Service Deployed to the NMR" above.
\ No newline at end of file

Modified: servicemix/smx4/features/trunk/examples/cxf-osgi/README.txt
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/cxf-osgi/README.txt?rev=817515&r1=817514&r2=817515&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/examples/cxf-osgi/README.txt (original)
+++ servicemix/smx4/features/trunk/examples/cxf-osgi/README.txt Tue Sep 22 06:59:48 2009
@@ -15,63 +15,198 @@
  * limitations under the License.
  */
 
-Welcome to the ServiceMix cxf osgi example
-==========================================
+CXF OSGi HTTP WEB SERVICE
+=========================
 
-This example leverages CXF and Spring-DM to create a web service and expose
-it through the OSGi HTTP Service.
+Purpose
+-------
+Create a web service with CXF and expose it through the OSGi HTTP
+Service.
 
-Quick steps to install the sample
----------------------------------
 
-Launch the ServiceMix Kernel by running
-  bin/servicemix
-in the root dir of this distribution.
+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.
 
-When inside the console, just run the following commands to install the
-example:
+The beans.xml file, located in the src/main/resources/META-INF/spring
+directory:
 
-  features/addUrl mvn:org.apache.servicemix.nmr/apache-servicemix-nmr/${servicemix.nmr.version}/xml/features
-  features/addUrl mvn:org.apache.servicemix.features/apache-servicemix/${version}/xml/features
-  features/install examples-cxf-osgi
+1. Imports the configuration files needed to enable CXF and OSGi work
+   together.
 
-If you have all the bundles available in your local repo, the installation
-of the example will be very fast, otherwise it may take some time to
-download everything needed.
+2. Configures the web service endpoint as follows:
 
-Testing the example
+  <jaxws:endpoint id="helloWorld"
+         implementor="org.apache.servicemix.examples.cxf.HelloWorldImpl"
+         address="/HelloWorld"/>
+
+
+Prerequisites for Running the Example
+-------------------------------------
+1. You must have the following installed on your machine:
+
+   - JDK 1.5 or higher
+   
+   - Maven 2.0.6 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/karaf          (on UNIX)
+  <servicemix_home>\bin\karaf          (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-osgi
+  
+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.
+
+When the feature is installed, output for publishing the CXF
+endpoint is displayed to the console.
+
+To view the service WSDL, open your browser and go to the following
+URL:
+
+  http://localhost:8181/cxf/HelloWorld?wsdl
+
+Note, if you use Safari, right click the window and select
+'Show Source'.
+
+Running a Client
+----------------
+To run the web client:
+
+1. Open the client.html, which is located in the same directory as
+   this README file, in your favorite browser.
+
+2. Click the Send button to send a request.
+
+To run the java code client:
+
+1. Change to the <servicemix_home>/examples/cxf-osgi
+   directory.
+
+2. Run the following command:
+
+     mvn compile exec:java
+
+
+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 examples-cxf-osgi
+   feature by entering the following command in the ServiceMix console:
+
+     features:uninstall examples-cxf-osgi
+
+   
+2. Build the example by opening a command prompt, changing directory to
+   examples/cxf-osgi (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-osgi
+       
+   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.
+
+
+When the feature is installed, output for publishing the CXF
+endpoint is displayed to the console.
+
+To view the service WSDL, open your browser and go to the following
+URL:
+
+  http://localhost:8181/cxf/HelloWorld?wsdl
+
+Note, if you use Safari, right click the window and select
+'Show Source'.
+
+You can try running a client against your service by following the
+instructions in the "Running a Client" section above.
 
-When the feature is installed, output for publishing the cxf endpoint
-is displayed to the console.
 
-Now, just open your browser and go to the following url:
+Stopping and Uninstalling the Example
+-------------------------------------
+To stop 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 (Note, the text you are typing will intermingle
+with the output being logged. This is nothing to worry about.):
 
-http://localhost:8181/cxf/HelloWorld?wsdl
+  osgi:list
 
-It should display the WSDL of the service (if you use Safari, make sure to
-right click the window and select 'Show Source', else the page will be blank).
-Or you can also test it from ServiceMix console using"
+At the end of the listing, you should see an entry similar to the
+following:
 
-optional/cat http://localhost:8181/cxf/HelloWorld?wsdl
+  [170] [Active     ] [Started] [  60] Apache ServiceMix Example :: CXF OSGi (4.1.0)
 
-You can also open the client.html page in a browser to try sending a request
-to the service.
+In this case, the bundle ID is 170.
 
-Or you can launch java code client to send the request
-mvn compile exec:java
+To stop the example, enter the following command at the ServiceMix
+console:
 
-How does it work?
------------------
+  osgi:stop <bundle_id>
 
-The installation leverages ServiceMix Kernel by installing what's called
-'features'. You can see the features definition file using the following
-command inside ServiceMix console:
+For example:
 
-optional/cat mvn:org.apache.servicemix.features/apache-servicemix/${version}/xml/features
+  osgi:stop 170
 
-The list of available features can be obtained using:
+To uninstall the example, enter one of the following commands in
+the ServiceMix console:
 
-features/list
+  features:uninstall examples-cxf-osgi
+ 
+or
+ 
+  osgi:uninstall <bundle_id>
+  
 
+Viewing the Log Entries
+-----------------------
+You can view the log entries in the karaf.log file in the
+data/log directory of your ServiceMix installation, or by typing
+the following command in the ServiceMix console:
 
+  log:display

Modified: servicemix/smx4/features/trunk/examples/cxf-ws-addressing/README.txt
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/cxf-ws-addressing/README.txt?rev=817515&r1=817514&r2=817515&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/examples/cxf-ws-addressing/README.txt (original)
+++ servicemix/smx4/features/trunk/examples/cxf-ws-addressing/README.txt Tue Sep 22 06:59:48 2009
@@ -15,66 +15,259 @@
  * limitations under the License.
  */
 
-Welcome to the ServiceMix cxf ws-addressing example
-===================================================
+CXF WS-Addressing Example
+=========================
 
-This example leverages CXF and Spring-DM to create a web service enabled for 
-WS-Addressing, and then expose it through the OSGi HTTP Service.
+Purpose
+-------
+Use CXF to create a web service enabled for WS-Addressing and
+expose it through the OSGi HTTP Service.
+
+
+Explanation
+-----------
+This example is based on the WS-Addressing sample in Apache CXF
+(http://cxf.apache.org/). There is a more complete explanation
+of WS-Addressing in that sample's README.
+
+The WS-Addressing functionality is implemented as interceptors.
+It is configured in the beans.xml file, which is located in the
+src/main/resources/META-INF/spring directory of this example.
+The configuration can be explained as follows:
+
+1. The following entry adds the addressing interceptors (org.apache.
+   cxf.ws.addressing.MAPAggregator and org.apache.cxf.ws.addressing.
+   soap.MAPCodec) to the inbound and outbound interceptor chains.
+   The interceptors add the appropriate WS-Addressing headers to the
+   SOAP messages and remove them at the service end.
+
+  <bean id="mapAggregator" class="org.apache.cxf.ws.addressing.MAPAggregator"/>
+  <bean id="mapCodec" class="org.apache.cxf.ws.addressing.soap.MAPCodec"/>
+
+    <!--bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
+        <property name="inInterceptors">
+            <list>
+                <ref bean="mapAggregator"/>
+                <ref bean="mapCodec"/>
+            </list>
+        </property>
+        <property name="inFaultInterceptors">
+            <list>
+                <ref bean="mapAggregator"/>
+                <ref bean="mapCodec"/>
+                <ref bean="logInbound"/>
+            </list>
+        </property>
+        <property name="outInterceptors">
+            <list>
+                <ref bean="mapAggregator"/>
+                <ref bean="mapCodec"/>
+            </list>
+        </property>
+        <property name="outFaultInterceptors">
+            <list>
+                <ref bean="mapAggregator"/>
+                <ref bean="mapCodec"/>
+            </list>
+        </property>
+    </bean--> 
+
+2. The following entry enables WS-Addressing for all services
+   on the bus:
+
+   <cxf:bus>
+       <cxf:features>
+           <wsa:addressing/>
+       </cxf:features>
+   </cxf:bus>
+
+In addition, the service WSDL, hello_world_addr.wsdl, includes
+WS-Addressing configuration as shown below:
+
+    <wsdl:service ... >
+        <wsdl:port ...>
+            <soap:address ... />
+            <wswa:UsingAddressing xmlns:wswa="http://www.w3.org/2005/02/addressing/wsdl"/>
+        </wsdl:port>
+    </wsdl:service>
+
+The WSDL file is located in the src/main/resources/wsdl
+directory of this example.
+
+The various clients send the request.xml file, located in src/main/
+resources/org/apache/servicemix/examples/cxf/wsaddressing. It
+contains SOAP request with some WS-Addressing headers set in it.
+
+
+Prerequisites for Running the Example
+-------------------------------------
+1. You must have the following installed on your machine:
+
+   - JDK 1.5 or higher
+   
+   - Maven 2.0.6 or higher
+   
+  For more information, see the README in the top-level examples
+  directory.
 
-Quick steps to install the sample
----------------------------------
 
-Launch the ServiceMix Kernel by running
+2. Start ServiceMix by running the following command:
 
-  bin/servicemix
+  <servicemix_home>/bin/karaf          (on UNIX)
+  <servicemix_home>\bin\karaf          (on Windows)
 
-in the root dir of this distribution.
 
-When inside the console, just run the following commands to install the
-example:
+Running the Example
+-------------------
+You can run the example in two ways:
 
-  features/install examples-cxf-ws-addressing
+- 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-ws-addressing
+  
+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.
 
-If you have all the bundles available in your local repo, the installation
-of the example will be very fast, otherwise it may take some time to
-download everything needed.
+To view the service WSDL, open your browser and go to the following
+URL:
 
-Testing the example
--------------------
+  http://localhost:8181/cxf/SoapContext/SoapPort?wsdl
 
-When the feature is installed, output for publishing the cxf endpoint
-is displayed to the console.
+Note, if you use Safari, right click the window and select
+'Show Source'.
 
-Now, just open your browser and go to the following url:
+Running a Client
+----------------
+To run the web client:
+
+1. Open the client.html, which is located in the same directory as
+   this README file, in your favorite browser.
+
+2. Click the Send button to send a request.
+
+   You should receive a SOAP message as a response.
+
+
+To run the java code client:
+
+1. Change to the <servicemix_home>/examples/cxf-ws-addressing
+   directory.
+
+2. Run the following command:
+
+     mvn compile exec:java
+
+   It makes an invocation with WS-Addressing headers and displays
+   the response.
+
+
+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
+   examples-cxf-ws-addressing feature by entering the following
+   command in the ServiceMix console:
+
+     features:uninstall examples-cxf-ws-addressing
+
+   
+2. Build the example by opening a command prompt, changing directory
+   to examples/cxf-ws-addressing (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-ws-addressing
+       
+   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.
+
+
+When the feature is installed, output for publishing the CXF
+endpoint is displayed to the console.
+
+To view the service WSDL, open your browser and go to the following
+URL:
+
+    http://localhost:8181/cxf/SoapContext/SoapPort?wsdl
+
+Note, if you use Safari, right click the window and select
+'Show Source'.
+
+You can try running a client against your service by following the
+instructions in the "Running a Client" section above.
 
-  http://localhost:8181/cxf/SoapContext/SoapPort?wsdl
 
-It should display the WSDL of the service (if you use Safari, make sure to
-right click the window and select 'Show Source', else the page will be blank).
-Or you can also test it from ServiceMix console using"
+Stopping and Uninstalling the Example
+-------------------------------------
+To stop the example, you must first know the bundle ID that ServiceMix
+has assigned to it. To get the bundle ID, enter the following command
+in the ServiceMix console (Note, the text you are typing will
+intermingle with the output being logged. This is nothing to worry
+about.):
 
-  optional/cat http://localhost:8181/cxf/SoapContext/SoapPort?wsdl
+  osgi:list
 
-You can also open the client.html page in a browser to try sending a request
-to the service.
+At the end of the listing, you should see an entry similar to the
+following:
 
-Or you can launch a programmatic Java client via:
+  [171] [Active     ] [Started] [  60] Apache ServiceMix Example :: CXF WS-ADDRESSING OSGI (4.1.0)
 
-  mvn compile exec:java
+In this case, the bundle ID is 171.
 
-which makes an invocation with WS-Addressing headers and displays the response.
+To stop the example, enter the following command in the ServiceMix
+console:
 
-How does it work?
------------------
+  osgi:stop <bundle_id>
 
-The installation leverages ServiceMix Kernel by installing what's called
-'features'. You can see the features definition file using the following
-command inside ServiceMix console:
+For example:
 
-  optional/cat mvn:org.apache.servicemix.features/apache-servicemix/${version}/xml/features
+  osgi:stop 171
 
-The list of available features can be obtained using:
+To uninstall the example, enter one of the following commands in
+the ServiceMix console:
 
-  features/list
+  features:uninstall examples-cxf-ws-addressing
+ 
+or
+ 
+  osgi:uninstall <bundle_id>
+  
 
+Viewing the Log Entries
+-----------------------
+You can view the log entries in the karaf.log file in the
+data/log directory of your ServiceMix installation, or by typing
+the following command in the ServiceMix console:
 
+  log:display
\ No newline at end of file

Modified: servicemix/smx4/features/trunk/examples/cxf-wsdl-first-osgi-package/README.txt
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/cxf-wsdl-first-osgi-package/README.txt?rev=817515&r1=817514&r2=817515&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/examples/cxf-wsdl-first-osgi-package/README.txt (original)
+++ servicemix/smx4/features/trunk/examples/cxf-wsdl-first-osgi-package/README.txt Tue Sep 22 06:59:48 2009
@@ -15,32 +15,226 @@
  * limitations under the License.
  */
 
-Welcome to ServiceMix WSDL design first example
-===============================================
+WSDL First OSGi Bundles Example
+===================================
 
-This example is exactly same functionality as cxf-wsdl-first example, but use osgi bundle pakage instead.
+Purpose
+-------
+Publish a WSDL-defined web service, packaged as OSGi bundles, 
+using CXF.
+
+This example is the same as the cxf-wsdl-first example except it
+is deployed as OSGi bundles, whereas the cxf-wsdl-first example
+is deployed as a service assembly.
+
+
+Explanation
+-----------
+The CXF service engine and CXF binding component are used to expose the
+web service. Each one is packaged in as an OSGi bundle, as follows:
+
+1. CXF service engine (see the wsdl-first-cxfse-bundle directory):
+   
+   - Contains a copy of the service WSDL file, person.wsdl, in the
+     src/main/resources directory.
+   
+   - The service implementation file, PersonImpl.java, in the
+     src/main/java/org/apache/servicemix/samples/wsdl_first directory.
+     It contains JAX-WS annotations that specify which web service
+     it implements:
+
+       @WebService(serviceName = "PersonService", 
+           targetNamespace = "http://servicemix.apache.org/samples/wsdl-first",
+           endpointInterface = "org.apache.servicemix.samples.wsdl_first.Person")
+   
+   - A configuration file, beans.xml, located in the src/main/resources/
+     META-INF/spring directory, which configures the CXF endpoint:
+     
+       <cxfse:endpoint>
+           <cxfse:pojo>
+             <bean class="org.apache.servicemix.samples.wsdl_first.PersonImpl" />
+           </cxfse:pojo>
+       </cxfse:endpoint>
+    
+2. CXF binding component (see the wsdl-first-cxfbc-bundle directory):
+
+   - Contains a copy of the service WSDL file, person.wsdl, in the
+     src/main/resources directory.
+    
+   - A configuration file, beans.xml, located in the src/main/resources/
+     META-INF/spring directory, which specifies a CXF consumer that will
+     accept incoming calls for that web service and pass them to the NMR:
+
+       <cxfbc:consumer wsdl="classpath:person.wsdl"
+                      targetService="person:PersonService"
+                      targetInterface="person:Person"/>
+
+       <bean class="org.apache.servicemix.common.osgi.EndpointExporter" />
+
+
+Prerequisites for Running the Example
+-------------------------------------
+1. You must have the following installed on your machine:
+
+   - JDK 1.5 or higher
+   
+   - Maven 2.0.6 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/karaf          (on UNIX)
+  <servicemix_home>\bin\karaf          (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:
 
-First start a ServiceMix server (if not already started) by running
-  bin/servicemix
-in the root dir of this distribution.
+  features:install examples-cxf-wsdl-first-osgi-package
+  
+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.
+
+You can browse the WSDL at:
+
+  http://localhost:8092/PersonService?wsdl
 
-To run this sample, launch the following commands:
-  mvn install
+Note, if you use Safari, right click the window and select
+'Show Source'.
 
-When inside the console, just run the following commands to install the
-example:
+Running a Client
+----------------
+To run the web client:
+
+1. Open the client.html, which is located in the same directory as
+   this README file, in your favorite browser.
+
+2. Click the Send button to send a request.
+
+To run the java code client:
+
+1. Change to the <servicemix_home>/examples/cxf-wsdl-first-osgi-package
+   directory.
+
+2. Run the following command:
+
+     mvn compile exec:java
+
+     
+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
+   examples-cxf-wsdl-first-osgi-package feature by entering the
+   following command in the ServiceMix console:
+
+     features:uninstall examples-cxf-wsdl-first-osgi-package
+
+2. Build the example by opening a command prompt, changing directory
+   to examples/cxf-wsdl-first-osgi-package (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-wsdl-first-osgi-package
+     
+   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.
 
-  features/addUrl
-mvn:org.apache.servicemix.nmr/apache-servicemix-nmr/${servicemix.nmr.version}/xml/features
-  features/addUrl
-mvn:org.apache.servicemix.features/apache-servicemix/${version}/xml/features
-  features/install examples-cxf-wsdl-first-osgi-package
+You can browse the WSDL at:
 
-You can browse the WSDL at
   http://localhost:8092/PersonService?wsdl
+
+Note, if you use Safari, right click the window and select
+'Show Source'.
+
+You can try running a client against your service by following the
+instructions in the "Running a Client" section above.
+
+
+Stopping and Uninstalling the Example
+-------------------------------------
+To stop the example, you must first know the bundle ID that ServiceMix
+has assigned to it. To get the bundle ID, enter the following command
+in the ServiceMix console (Note, the text you are typing will
+intermingle with the output being logged. This is nothing to worry
+about.):
+
+  osgi:list
+
+At the end of the listing, you should see an entry similar to the
+following:
+
+  [172] [Active     ] [Started] [  60] Apache ServiceMix Example :: CXF OSGi (4.1.0)
+
+In this case, the bundle ID is 172.
+
+To stop the example, enter the following command in the ServiceMix
+console:
+
+  osgi:stop <bundle_id>
+
+For example:
+
+  osgi:stop 172
+
+To uninstall the example, enter one of the following commands in
+the ServiceMix console:
+
+  features:uninstall examples-cxf-wsdl-first-osgi-package
+ 
+or
+ 
+  osgi:uninstall <bundle_id>
   
-You can also open the client.html page in a browser
-to send a request to the service.
-Or you can launch a java client to send request
-cd client; mvn compile exec:java
 
+Viewing the Log Entries
+-----------------------
+You can view the log entries in the karaf.log file in the
+data/log directory of your ServiceMix installation, or by typing
+the following command in the ServiceMix console:
+
+  log:display
+
+
+More Information
+----------------
+For more information, see:
+
+  http://cwiki.apache.org/SMX4/creating-an-osgi-bundle-for-deploying-jbi-endpoints.html

Modified: servicemix/smx4/features/trunk/examples/cxf-wsdl-first/README.txt
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/cxf-wsdl-first/README.txt?rev=817515&r1=817514&r2=817515&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/examples/cxf-wsdl-first/README.txt (original)
+++ servicemix/smx4/features/trunk/examples/cxf-wsdl-first/README.txt Tue Sep 22 06:59:48 2009
@@ -15,30 +15,143 @@
  * limitations under the License.
  */
 
-Welcome to ServiceMix WSDL design first example
-===============================================
+WSDL First JBI Service Assembly Example
+=======================================
 
-This example shows how to expose a service in servicemix-cxf-se, beginning from the
-WSDL, and exposing it over servicemix-cxf-bc.
+Purpose
+-------
+Publish a WSDL-defined web service, as a JBI service assembly, using CXF.
+
+This example is the same as the cxf-wsdl-first-osgi example except it is
+deployed as a JBI service assembly, whereas the cxf-wsdl-first-osgi
+example is deployed as OSGi bundles.
+
+
+Explanation
+-----------
+The CXF service engine and CXF binding component are used to expose the
+web service. Each one is packaged in a service unit (SU), as follows:
+
+1. CXF service engine (see the wsdl-first-cxfse-su directory):
+   
+   - Contains a copy of the service WSDL file, person.wsdl, in the
+     src/main/resources directory.
+   
+   - The service implementation file, PersonImpl.java, in the
+     src/main/java/org/apache/servicemix/samples/wsdl_first directory.
+     It contains JAX-WS annotations that specify which web service
+     it implements:
+
+       @WebService(serviceName = "PersonService", 
+           targetNamespace = "http://servicemix.apache.org/samples/wsdl-first",
+           endpointInterface = "org.apache.servicemix.samples.wsdl_first.Person")
+   
+   - A configuration file, xbean.xml, located in the src/main/resources
+     directory, which configures the CXF endpoint:
+     
+      <cxfse:endpoint>
+          <cxfse:pojo>
+            <bean class="org.apache.servicemix.samples.wsdl_first.PersonImpl" />
+          </cxfse:pojo>
+      </cxfse:endpoint>
+    
+2. CXF binding component (see the wsdl-first-cxfbc-su directory):
+
+   - Contains a copy of the service WSDL file, person.wsdl, in the
+     src/main/resources directory.
+    
+   - A configuration file, xbean.xml, located in the src/main/resources
+     directory, which specifies a CXF consumer that will accept
+     incoming calls for that web service and pass them to the NMR:
+
+     <cxfbc:consumer wsdl="classpath:person.wsdl"
+                      targetService="person:PersonService"
+                      targetInterface="person:Person"/>
+
+Lastly, Maven uses the pom.xml file, located in the wsdl-first-cxf-sa
+directory, to package the SUs into a JBI service assembly ready for deployment.
+
+
+Prerequisites for Building and Running this Example
+---------------------------------------------------
+1. You must have the following installed on your machine:
+
+   - JDK 1.5 or higher.
+
+   - Apache Maven 2.0.6 or higher.
+
+   For more information, see the README in the top-level examples
+   directory.
+
+2. Launch ServiceMix by running the following command:
+
+  <servicemix_home>/bin/karaf	(on UNIX)
+  <servicemix_home>\bin\karaf   (on Windows)
+
+
+Building and Deploying
+----------------------
+To build the example, run the following command (from the
+directory that contains this README):
 
-First start a ServiceMix server (if not already started) by running
-  bin/servicemix
-in the root dir of this distribution.
-
-To run this sample, launch the following commands:
   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.
 
-You can deploy the example on ServiceMix 4 in two different ways:
-- using hotdeploy: 
-   copy the wsdl-first-cxf-sa/target/wsdl-first-cxf-sa-${version}.zip to <servicemix_home>/deploy
-- using the ServiceMix console:
-   osgi/install -s mvn:org.apache.servicemix.examples.cxf-wsdl-first/wsdl-first-cxf-sa/${version}/zip
+Once complete, you will find the SA, called cxf-wsdl-first-cxf-sa-
+${version}.zip, in the wsdl-first-cxf-sa/target directory.
 
-You can browse the WSDL at
-  http://localhost:8092/PersonService?wsdl
+You can deploy the SA in two ways:
+
+- Using Hot Deployment
+  --------------------
+  
+  Copy the wsdl-first-cxf-sa/target/wsdl-first-cxf-sa-${version}.zip
+  to the <servicemix_home>/deploy directory.
+     
+- Using the ServiceMix Console
+  ----------------------------
   
-You can also open the client.html page in a browser
-to send a request to the service.
-Or you can launch a java client to send request
-cd client; mvn compile exec:java
+  Enter the following command:
+
+  osgi:install -s mvn:org.apache.servicemix.examples.cxf-wsdl-first/wsdl-first-cxf-sa/${version}/zip
+ 
+You can browse the WSDL at:
+
+  http://localhost:8092/PersonService?wsdl
+
+
+Running a Client
+----------------
+To run the web client:
+
+1. Open the client.html, which is located in the same directory
+   as this README file, in your favorite browser.
+
+2. Click the Send button to send a request.
+
+To run the java code client:
+
+1. Change to the <servicemix_home>/examples/cxf-wsdl-first/client
+   directory.
+
+2. Run the following command:
+
+     mvn compile exec:java
+
+
+Viewing the Log Entries
+-----------------------
+You can view the log entries in the karaf.log file in the
+data/log directory of your ServiceMix installation, or by typing
+the following command in the ServiceMix console:
+
+  log:display
+
 
+Changing the Example
+--------------------
+If you wish to change the code or configuration, just use 'mvn install'
+to rebuild the JBI Service Assembly zip, and deploy it as before.