cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1196733 - in /cxf/branches/2.4.x-fixes: ./ distribution/src/main/release/samples/wsdl_first/ distribution/src/main/release/samples/wsdl_first/src/main/resources/
Date Wed, 02 Nov 2011 18:20:08 GMT
Author: gmazza
Date: Wed Nov  2 18:20:07 2011
New Revision: 1196733

Merged revisions 1196705 via svnmerge from

  r1196705 | gmazza | 2011-11-02 13:17:18 -0400 (Wed, 02 Nov 2011) | 1 line
  Implemented servlet deployment option for wsdl_first example

    cxf/branches/2.4.x-fixes/   (props changed)

Propchange: cxf/branches/2.4.x-fixes/
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.4.x-fixes/distribution/src/main/release/samples/wsdl_first/README.txt
--- cxf/branches/2.4.x-fixes/distribution/src/main/release/samples/wsdl_first/README.txt (original)
+++ cxf/branches/2.4.x-fixes/distribution/src/main/release/samples/wsdl_first/README.txt Wed
Nov  2 18:20:07 2011
@@ -2,7 +2,7 @@ WSDL First Demo
 This demo shows how to build and call a webservice using a given WSDL (also called Contract
-As writing a WSDL by hand is not so easy the following Howto may also be an interesting read:
+As writing a WSDL by hand is not so easy the following Howto may also be a useful read:
 This demo mainly addresses SOAP over HTTP in Document / Literal or Document / Literal wrapped
@@ -27,7 +27,7 @@ One other common use of the binding file
 jaxws:enableAsyncMapping has to be uncommented to use this.
 More info about the binding file can be found here:
 Server implementation
@@ -40,9 +40,9 @@ zero objects would be used. This is main
 For any other name the method will return a list of two Customer objects. The number of 
objects can be increased to
 test how fast CXF works for larger data.
-Now that the service is implemented it needs to be made available. In this example a standalone
server is used. 
-This can be done either with the JAX-WS API demonstrated in the class CustomerService or
using a spring config as
-demonstrated in the class CustomerServiceSpringServer.
+Now that the service is implemented it needs to be made available.  This samples provides
two options for deploying the 
+web service provider: standalone server (using embedded Jetty) or as a WAR file in Tomcat
(Version 6.x or 7.x).
 Client implementation
@@ -60,23 +60,33 @@ or Spring and how to wire it to your bus
 Please review the README in the samples main directory before continuing.
 Building and running the demo using Maven
 From the base directory of this sample (i.e., where this README file is
 located), the pom.xml file is used to build and run the demo. 
 Using either UNIX or Windows:
-  mvn install   (builds the demo)
-  mvn -Pserver  (from one command line window)
+  mvn clean install   (builds the demo and creates a WAR file for optional Tomcat deployment)
+  mvn -Pserver  (from one command line window -- only if using a standalone service, i.e.,
embedded Jetty)
   mvn -Pclient  (from a second command line window)
-To remove the code generated from the WSDL file and the .class
-files, run "mvn clean".
+If you're using Tomcat for the web service provider:
+1.) Update the soap:address value in the resources/CustomerService.wsdl value, switching
+soap:address value to servlet-specific one (presently commented-out).  Make sure the version
+number there is the same as the version of CXF being used.
+2.) You can manually copy the generated WAR file to the Tomcat webapps folder, or, if you
+have Maven and Tomcat set up to use the Tomcat Maven Plugin (
+you can use the mvn tomcat:redeploy command instead.  Important: if you're using this 
+command, and are using Tomcat 6 instead of Tomcat 7, update the tomcat-maven-plugin configuration

+in the pom.xml, switching to the the Tomcat 6-specific "url" element.
+To remove the code generated from the WSDL file and the .class files, run "mvn clean".
 There is no special maven profile for the spring client and server but you can easily set
it up yourself.

Modified: cxf/branches/2.4.x-fixes/distribution/src/main/release/samples/wsdl_first/pom.xml
--- cxf/branches/2.4.x-fixes/distribution/src/main/release/samples/wsdl_first/pom.xml (original)
+++ cxf/branches/2.4.x-fixes/distribution/src/main/release/samples/wsdl_first/pom.xml Wed
Nov  2 18:20:07 2011
@@ -36,14 +36,6 @@
-        <resources>
-            <resource>
-                <directory>wsdl</directory>
-            </resource>
-            <resource>
-                <directory>src/main/resources</directory>
-            </resource>
-        </resources>
@@ -53,23 +45,29 @@
-                                <directory>wsdl</directory>
-                                <targetPath>WEB-INF</targetPath>
-                                <includes>
-                                    <include>*.wsdl</include>
-                                </includes>
-                            </resource>
-                            <resource>
-                                    <include>**.*</include>
+                                    <include>*.wsdl</include>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>tomcat-maven-plugin</artifactId>
+                    <version>1.1</version>
+                    <configuration>
+                        <server>myTomcat</server>
+                        <!-- if using Tomcat 6 (see README) -->
+                        <!--url>http://localhost:8080/manager</url-->
+                        <!-- if using Tomcat 7 (see README) -->
+                        <url>http://localhost:8080/manager/text</url>
+                        <path>/${}</path>
+                    </configuration>
+                </plugin>
+                <plugin>
@@ -90,9 +88,9 @@
-                                    <wsdl>${basedir}/wsdl/CustomerService.wsdl</wsdl>
+                                    <wsdl>src/main/resources/CustomerService.wsdl</wsdl>
-                                        <bindingFile>${basedir}/wsdl/binding.xml</bindingFile>
+                                        <bindingFile>src/main/resources/binding.xml</bindingFile>
@@ -128,6 +126,13 @@
+	    <dependencies>
+		<dependency>
+		    <groupId>org.apache.cxf</groupId>
+		    <artifactId>cxf-rt-transports-http-jetty</artifactId>
+		    <version>2.5.1-SNAPSHOT</version>
+		</dependency>
+	    </dependencies>
@@ -146,7 +151,7 @@
-                                        <argument>${basedir}/wsdl/CustomerService.wsdl</argument>
+                                        <argument>src/main/resources/CustomerService.wsdl</argument>
@@ -168,12 +173,6 @@
-        <!-- Jetty is needed if you're using the CXFServlet -->
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-transports-http-jetty</artifactId>
-            <version>2.4.4-SNAPSHOT</version>
-        </dependency>

View raw message