You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2011/11/04 11:30:22 UTC

svn commit: r1197492 - in /camel/branches/camel-2.8.x: ./ examples/camel-example-cxf-osgi/README.txt

Author: ningjiang
Date: Fri Nov  4 10:30:21 2011
New Revision: 1197492

URL: http://svn.apache.org/viewvc?rev=1197492&view=rev
Log:
Merged revisions 1197450 via svnmerge from 
https://svn.apache.org/repos/asf/camel/trunk

........
  r1197450 | ningjiang | 2011-11-04 17:16:54 +0800 (Fri, 04 Nov 2011) | 1 line
  
  CAMEL-4613 update the README with thanks to Glen
........

Modified:
    camel/branches/camel-2.8.x/   (props changed)
    camel/branches/camel-2.8.x/examples/camel-example-cxf-osgi/README.txt

Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Nov  4 10:30:21 2011
@@ -1 +1 @@
-/camel/trunk:1186106,1186625,1186772,1187221,1187485,1187882,1187893,1188070-1188085,1188642,1188674,1188879,1188881,1189600,1189681,1189693,1189737,1190212-1190213,1190246,1190303,1195317,1195616
+/camel/trunk:1186106,1186625,1186772,1187221,1187485,1187882,1187893,1188070-1188085,1188642,1188674,1188879,1188881,1189600,1189681,1189693,1189737,1190212-1190213,1190246,1190303,1195317,1195616,1197450

Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.8.x/examples/camel-example-cxf-osgi/README.txt
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/examples/camel-example-cxf-osgi/README.txt?rev=1197492&r1=1197491&r2=1197492&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/examples/camel-example-cxf-osgi/README.txt (original)
+++ camel/branches/camel-2.8.x/examples/camel-example-cxf-osgi/README.txt Fri Nov  4 10:30:21 2011
@@ -2,85 +2,94 @@ CXF OSGI Example
 ================
 
 A simple example which receives web service calls (via a CXF consumer, using bean binding)
-and write these requests into the file system. It's not a very useful use case, but the goal
+and writes these requests to the file system. It's not a very useful use case, but the goal
 of this example is to show you how you can use the CXF consumer component in an OSGI
 environment with the OSGI HTTP service. If your target container is Apache Karaf or Apache
-ServiceMix, you can use PAX Web to setup and start an OSGI HTTP service. All your Camel
-bundles using a Camel CXF consumer can use this HTTP service and do not have to start it's
-own Jetty instance. Another possibility you get is, that all your provided services can share
+ServiceMix, you can use PAX Web to setup and start an OSGI HTTP service. All Camel
+bundles using a Camel CXF consumer can use this HTTP service without needing to start 
+individual Jetty instances. Another advantage is that all provided services can now share
 the same port.
 
-
-You will need to compile this example first:
+You will need to compile the example first:
   mvn install
 
 Remarks:
-- During the compilation phase, a unit test will be performed, this unit test simulates the
-  communication between a client calling the web service exposed by our camel/cxf route.
+- During the compilation phase, a unit test will be performed which simulates the
+  client calling the web service exposed by our camel/cxf route.
 - In Eclipse, I have used the following option when starting the junit test case. This option tells
   CXF that it must use log4j : -Dorg.apache.cxf.Logger=org.apache.cxf.common.logging.Log4jLogger
 
 To run the example on Apache ServiceMix 4.x or Apache Karaf 2.2.x
 
-  1) launch the server
-  karaf.bat
+1) launch the server
+karaf.bat
   
-  For Karaf 2.2 : edit the file jre.properties to add the following packages to be exported
+Note for Karaf 2.2.x: 
+  a) edit the etc/jre.properties file to add the following packages to be exported
   jre-1.6=, \
- com.sun.org.apache.xerces.internal.dom, \
- com.sun.org.apache.xerces.internal.jaxp, \
- 
-  2) Add features required
-  features:addUrl mvn:org.apache.camel.karaf/apache-camel/2.8.0/xml/features
-  features:install war
-  features:install camel-spring
-  features:install camel-jaxb
-  features:install camel-cxf
-  
-  Note: In this example we use Apache Camel 2.8.0 as the version. You should of course use the
-        version number of Camel you are using.
-
-  3) Deploy our example
-  osgi:install -s mvn:org.apache.camel/camel-example-cxf-osgi/2.8.0
-  
-  4) Verify that your service is available using in the browser the following url. We assume you
-  use the default PAX Web configuration which use the port 8181 for http. If you would like to use
-  another port or https, change the configuration in ${KARAF_HOME}/etc/org.ops4j.pax.web.cfg. Please
-  see http://wiki.ops4j.org/display/paxweb/Pax+Web for more information.
-  
-  http://localhost:8181/cxf/camel-example-cxf-osgi/webservices/incident?wsdl
-  
-  5) Start SOAPUI (2.x)
-  Create a new project called camel-example-cxf-osgi
-  Point to the following url : http://localhost:8181/cxf/camel-example-cxf-osgi/webservices/incident?wsdl
-  Open the request 1 (under camel-example-cxf-osgi --> ReportIncidentBinding --> ReportIncident) and copy/paste the SOAP
-  message generated by the unit test
-  
-  ex :
-  --> and the message formatted that you copy in SOAPUI
-  
-		<?xml version="1.0" encoding="UTF-8"?>
-		<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
-			<soap:Header />
-			<soap:Body>
-				<ns2:inputReportIncident xmlns:ns2="http://reportincident.example.camel.apache.org">
-					<incidentId>111</incidentId>
-					<incidentDate>2011-03-05</incidentDate>
-					<givenName>Christian</givenName>
-					<familyName>Mueller</familyName>
-					<summary>Bla</summary>
-					<details>Bla bla</details>
-					<email>cmueller@apache.org</email>
-					<phone>0049 69 1234567</phone>
-				</ns2:inputReportIncident>
-			</soap:Body>
-		</soap:Envelope>
+  com.sun.org.apache.xerces.internal.dom, \
+  com.sun.org.apache.xerces.internal.jaxp, \
+
+  b) from the same file comment out the following exports already provided by the bundles
+  that will be imported next: javax.xml.bind*, javax.jws*, javax.xml.soap*, javax.xml.ws*, 
+  javax.activation, javax.annotation, javax.xml.stream*.
+
+
+2) Add features required
+features:addUrl mvn:org.apache.camel.karaf/apache-camel/2.9.0/xml/features
+features:install war
+features:install cxf
+features:install camel-spring
+features:install camel-jaxb
+features:install camel-cxf
+  
+Note: Apache Camel 2.8.3 is being used above, but you should of course change the
+      version number to the exact version of Camel being used.
+
+
+3) Deploy the example
+osgi:install -s mvn:org.apache.camel/camel-example-cxf-osgi/2.8.3
+  
+
+4) Verify that your service is available using the following url in the browser. 
+We assume assuming the OOTB Karaf defaults you use the default PAX Web configuration which use the port 8181
+for http. If you would like to use another port or https, change the configuration in 
+${KARAF_HOME}/etc/org.ops4j.pax.web.cfg. The immediate extension after the hostname and port ("services" in
+the below URL) is configured via the org.apache.cxf.osgi.cfg file (Please see 
+http://team.ops4j.org/wiki//display/paxweb/Pax+Web for more information on PAX Web).
+  
+http://localhost:8181/cxf/camel-example-cxf-osgi/webservices/incident?wsdl
+                                
+
+5) Start SOAPUI (2.x or later)
+Create a new project called camel-example-cxf-osgi
+Point to the following url: http://localhost:8181/cxf/camel-example-cxf-osgi/webservices/incident?wsdl
+Open the request 1 (under camel-example-cxf-osgi --> ReportIncidentBinding --> ReportIncident) and copy/paste a SOAP
+message generated by the unit test, for example:
+  
+<xml version="1.0" encoding="UTF-8"?>
+<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+   <soap:Header />
+   <soap:Body>
+      <ns2:inputReportIncident xmlns:ns2="http://reportincident.example.camel.apache.org">
+         <incidentId>111</incidentId>
+         <incidentDate>2011-03-05</incidentDate>
+         <givenName>Christian</givenName>
+         <familyName>Mueller</familyName>
+         <summary>Bla</summary>
+         <details>Bla bla</details>
+         <email>cmueller@apache.org</email>
+         <phone>0049 69 1234567</phone>
+      </ns2:inputReportIncident>
+   </soap:Body>
+</soap:Envelope>
   
- 6) Check the file system
- Check the folder "target/inbox/" in your file system that a message has been arrived.
+
+6) Check the file system
+Check the folder "target/inbox/" in the Karaf base directory to see that a message has arrived.
 
 
-This example is documented at
+This example is described in more detail at
   http://camel.apache.org/cxf-example-osgi.html
 
 If you hit any problems please let us know on the Camel Forums
@@ -90,7 +99,5 @@ Please help us make Apache Camel better 
 have.  Enjoy!
 
 ------------------------
-The Camel riders!
-
-
+The Camel Riders!