Author: hadrian
Date: Fri Nov 18 22:56:55 2011
New Revision: 1203894

URL: http://svn.apache.org/viewvc?rev=1203894&view=rev
Log:
CAMEL-4694. Thanks to gmazza for patch

Modified:
    camel/branches/camel-2.8.x/   (props changed)
    camel/branches/camel-2.8.x/examples/camel-example-cxf-proxy/README.txt
    
camel/branches/camel-2.8.x/examples/camel-example-cxf-proxy/src/main/resources/META-INF/spring/camel-config.xml

Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Nov 18 22:56:55 2011
@@ -1 +1 @@
-/camel/trunk:1202148,1202167,1202204-1202206,1202215,1202223,1202659,1202685
+/camel/trunk:1202148,1202167,1202204-1202206,1202215,1202223,1202659,1202685,1203879

Modified: camel/branches/camel-2.8.x/examples/camel-example-cxf-proxy/README.txt
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/examples/camel-example-cxf-proxy/README.txt?rev=1203894&r1=1203893&r2=1203894&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/examples/camel-example-cxf-proxy/README.txt 
(original)
+++ camel/branches/camel-2.8.x/examples/camel-example-cxf-proxy/README.txt Fri 
Nov 18 22:56:55 2011
@@ -1,7 +1,7 @@
 CXF WebService Proxy example
 ============================
 
-An example which proxies a real webservice by a Camel application using 
camel-cxf component
+An example which proxies a real web service by a Camel application using the 
camel-cxf component
 
 It can be run using
 Maven or Ant.
@@ -9,7 +9,7 @@ Maven or Ant.
 You will need to compile this example first:
   mvn compile
 
-To run the example type
+To run the example type:
   mvn camel:run
 
 The proxied webservice is located at
@@ -49,6 +49,27 @@ The webservice WSDL is exposed at:
 
 To stop the example hit ctrl + c
 
+To make a SOAP call open soapUI or another SOAP query tool and create a new
+project w/WSDL of 
http://localhost:9080/camel-example-cxf-proxy/webservices/incident?wsdl.
+Then make SOAP requests of this format:
+
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
+                  xmlns:rep="http://reportincident.example.camel.apache.org";>
+   <soapenv:Header/>
+   <soapenv:Body>
+      <rep:inputReportIncident>
+         <incidentId></incidentId>
+         <incidentDate>2011-11-18</incidentDate>
+         <givenName>Bob</givenName>
+         <familyName>Smith</familyName>
+         <summary>Bla bla</summary>
+         <details>More bla</details>
+         <email>[email protected]</email>
+         <phone>12345678</phone>
+      </rep:inputReportIncident>
+   </soapenv:Body>
+</soapenv:Envelope>
+
 This example is documented at
   http://camel.apache.org/cxf-proxy-example.html
 
@@ -59,7 +80,5 @@ Please help us make Apache Camel better 
 have.  Enjoy!
 
 ------------------------
-The Camel riders!
-
-
+The Camel Riders!
 

Modified: 
camel/branches/camel-2.8.x/examples/camel-example-cxf-proxy/src/main/resources/META-INF/spring/camel-config.xml
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/examples/camel-example-cxf-proxy/src/main/resources/META-INF/spring/camel-config.xml?rev=1203894&r1=1203893&r2=1203894&view=diff
==============================================================================
--- 
camel/branches/camel-2.8.x/examples/camel-example-cxf-proxy/src/main/resources/META-INF/spring/camel-config.xml
 (original)
+++ 
camel/branches/camel-2.8.x/examples/camel-example-cxf-proxy/src/main/resources/META-INF/spring/camel-config.xml
 Fri Nov 18 22:56:55 2011
@@ -28,41 +28,41 @@
 
     <import resource="classpath:META-INF/cxf/cxf.xml"/>
   
-    <!-- use a bean to start and stop the real web service (is not Camel 
specific) -->
-    <!-- in a real use-case the real web service would be located on another 
server
-         but we simulate this in the same JVM -->
-    <bean id="realWebService" 
class="org.apache.camel.example.cxf.proxy.RealWebServiceBean"
-          init-method="start" destroy-method="stop">
-        <!-- this is the url of the real web service we have proxied -->
-        <property name="url" value="http://localhost:9081/real-webservice"/>
-    </bean>
-
-    <!-- a bean to enrich the input -->
-    <bean id="enrichBean" 
class="org.apache.camel.example.cxf.proxy.EnrichBean"/>
-
-    <!-- this is the CXF webservice we use as front end -->
-    <cxf:cxfEndpoint id="reportIncident"
-                     
address="http://localhost:9080/camel-example-cxf-proxy/webservices/incident";
-                     endpointName="s:ReportIncidentEndpoint"
-                     serviceName="s:ReportIncidentEndpointService"
-                     wsdlURL="etc/report_incident.wsdl"
-                     xmlns:s="http://reportincident.example.camel.apache.org"/>
-
-    <!-- this is the camel route which proxy the web service and forward it to 
the real web service -->
-    <camelContext xmlns="http://camel.apache.org/schema/spring";>
-
-        <route>
-            <!-- cxf consumer using MESSAGE format -->
-            <from uri="cxf:bean:reportIncident?dataFormat=MESSAGE"/>
-            <!-- log input received -->
-            <to uri="log:input"/>
-            <!-- enrich the input by ensure the incidentId parameter is set -->
-            <to uri="bean:enrichBean"/>
-            <!-- send proxied request to real web service -->
-            <to 
uri="http://localhost:9081/real-webservice?throwExceptionOnFailure=false"/>
-            <!-- log answer from real web service -->
-            <to uri="log:output"/>
-        </route>
+  <!-- Use a bean to start and stop the real web service (is not Camel 
specific) -->
+  <!-- In a real use-case the real web service would be probably located on 
another server
+       but we simulate this in the same JVM -->
+  <bean id="realWebService" 
class="org.apache.camel.example.cxf.proxy.RealWebServiceBean"
+        init-method="start" destroy-method="stop">
+    <!-- url of the real web service we have proxied -->
+    <property name="url" value="http://localhost:9081/real-webservice"/>
+  </bean>
+
+  <!-- bean that enriches the SOAP request -->
+  <bean id="enrichBean" class="org.apache.camel.example.cxf.proxy.EnrichBean"/>
+
+  <!-- this is the CXF web service we use as the front end -->
+  <cxf:cxfEndpoint id="reportIncident"
+                   
address="http://localhost:9080/camel-example-cxf-proxy/webservices/incident";
+                   endpointName="s:ReportIncidentEndpoint"
+                   serviceName="s:ReportIncidentEndpointService"
+                   wsdlURL="etc/report_incident.wsdl"
+                   xmlns:s="http://reportincident.example.camel.apache.org"/>
+
+  <!-- this is the Camel route which proxies the real web service and forwards 
SOAP requests to it -->
+  <camelContext xmlns="http://camel.apache.org/schema/spring";>
+
+    <route>
+      <!-- CXF consumer using MESSAGE format -->
+      <from uri="cxf:bean:reportIncident?dataFormat=MESSAGE"/>
+      <!-- log input received -->
+      <to uri="log:input"/>
+      <!-- enrich the input by ensure the incidentId parameter is set -->
+      <to uri="bean:enrichBean"/>
+      <!-- send proxied request to real web service -->
+      <to 
uri="http://localhost:9081/real-webservice?throwExceptionOnFailure=false"/>
+      <!-- log answer from real web service -->
+      <to uri="log:output"/>
+    </route>
 
     </camelContext>
 


Reply via email to