Author: hadrian
Date: Fri Nov 18 22:03:26 2011
New Revision: 1203879
URL: http://svn.apache.org/viewvc?rev=1203879&view=rev
Log:
CAMEL-4694. Thanks to gmazza for patch
Modified:
camel/trunk/examples/camel-example-cxf-proxy/README.txt
camel/trunk/examples/camel-example-cxf-proxy/src/main/resources/META-INF/spring/camel-config.xml
Modified: camel/trunk/examples/camel-example-cxf-proxy/README.txt
URL:
http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cxf-proxy/README.txt?rev=1203879&r1=1203878&r2=1203879&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-cxf-proxy/README.txt (original)
+++ camel/trunk/examples/camel-example-cxf-proxy/README.txt Fri Nov 18 22:03:26
2011
@@ -1,12 +1,12 @@
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
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
@@ -20,6 +20,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
@@ -30,7 +51,5 @@ Please help us make Apache Camel better
have. Enjoy!
------------------------
-The Camel riders!
-
-
+The Camel Riders!
Modified:
camel/trunk/examples/camel-example-cxf-proxy/src/main/resources/META-INF/spring/camel-config.xml
URL:
http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cxf-proxy/src/main/resources/META-INF/spring/camel-config.xml?rev=1203879&r1=1203878&r2=1203879&view=diff
==============================================================================
---
camel/trunk/examples/camel-example-cxf-proxy/src/main/resources/META-INF/spring/camel-config.xml
(original)
+++
camel/trunk/examples/camel-example-cxf-proxy/src/main/resources/META-INF/spring/camel-config.xml
Fri Nov 18 22:03:26 2011
@@ -28,19 +28,19 @@
<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
+ <!-- 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">
- <!-- this is the url of the real web service we have proxied -->
+ <!-- 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 that enriches the SOAP request -->
<bean id="enrichBean" class="org.apache.camel.example.cxf.proxy.EnrichBean"/>
- <!-- this is the CXF webservice we use as front end -->
+ <!-- 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"
@@ -48,11 +48,11 @@
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 -->
+ <!-- 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 -->
+ <!-- CXF consumer using MESSAGE format -->
<from uri="cxf:bean:reportIncident?dataFormat=MESSAGE"/>
<!-- log input received -->
<to uri="log:input"/>