cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
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

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

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

Removed:
    cxf/branches/2.4.x-fixes/distribution/src/main/release/samples/wsdl_first/cxf.xml
    cxf/branches/2.4.x-fixes/distribution/src/main/release/samples/wsdl_first/src/main/resources/cxf-servlet.xml
    cxf/branches/2.4.x-fixes/distribution/src/main/release/samples/wsdl_first/src/main/resources/log4j.conf
Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    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/pom.xml

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
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/distribution/src/main/release/samples/wsdl_first/README.txt?rev=1196733&r1=1196732&r2=1196733&view=diff
==============================================================================
--- 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
First).
-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:
 http://cxf.apache.org/docs/defining-contract-first-webservices-with-wsdl-generation-from-java.html
 
 This demo mainly addresses SOAP over HTTP in Document / Literal or Document / Literal wrapped
style. 
@@ -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:
-https://jax-ws.dev.java.net/jax-ws-20-fcs/docs/customizations.html
+http://jax-ws.java.net/jax-ws-20-fcs/docs/customizations.html
 
 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
 
 Prerequisite
 ------------
-
 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
the
+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 (http://mojo.codehaus.org/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
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/distribution/src/main/release/samples/wsdl_first/pom.xml?rev=1196733&r1=1196732&r2=1196733&view=diff
==============================================================================
--- 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 @@
     </properties>
     <build>
         <defaultGoal>install</defaultGoal>
-        <resources>
-            <resource>
-                <directory>wsdl</directory>
-            </resource>
-            <resource>
-                <directory>src/main/resources</directory>
-            </resource>
-        </resources>
         <pluginManagement>
             <plugins>
                 <plugin>
@@ -53,23 +45,29 @@
                         <webXml>${cxf.release.base}/etc/web.xml</webXml>
                         <webResources>
                             <resource>
-                                <directory>wsdl</directory>
-                                <targetPath>WEB-INF</targetPath>
-                                <includes>
-                                    <include>*.wsdl</include>
-                                </includes>
-                            </resource>
-                            <resource>
                                 <directory>src/main/resources</directory>
                                 <targetPath>WEB-INF</targetPath>
                                 <includes>
-                                    <include>**.*</include>
+                                    <include>*.wsdl</include>
                                 </includes>
                             </resource>
                         </webResources>
                     </configuration>
                 </plugin>
                 <plugin>
+                    <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>/${project.build.finalName}</path>
+                    </configuration>
+                </plugin>
+                <plugin>
                     <artifactId>maven-compiler-plugin</artifactId>
                     <configuration>
                         <source>1.5</source>
@@ -90,9 +88,9 @@
                         <configuration>
                             <wsdlOptions>
                                 <wsdlOption>
-                                    <wsdl>${basedir}/wsdl/CustomerService.wsdl</wsdl>
+                                    <wsdl>src/main/resources/CustomerService.wsdl</wsdl>
                                     <bindingFiles>
-                                        <bindingFile>${basedir}/wsdl/binding.xml</bindingFile>
+                                        <bindingFile>src/main/resources/binding.xml</bindingFile>
                                     </bindingFiles>
                                 </wsdlOption>
                             </wsdlOptions>
@@ -128,6 +126,13 @@
                     </plugin>
                 </plugins>
             </build>
+	    <dependencies>
+		<dependency>
+		    <groupId>org.apache.cxf</groupId>
+		    <artifactId>cxf-rt-transports-http-jetty</artifactId>
+		    <version>2.5.1-SNAPSHOT</version>
+		</dependency>
+	    </dependencies>
         </profile>
         <profile>
             <id>client</id>
@@ -146,7 +151,7 @@
                                 <configuration>
                                     <mainClass>com.example.customerservice.client.CustomerServiceClient</mainClass>
                                     <arguments>
-                                        <argument>${basedir}/wsdl/CustomerService.wsdl</argument>
+                                        <argument>src/main/resources/CustomerService.wsdl</argument>
                                     </arguments>
                                 </configuration>
                             </execution>
@@ -168,12 +173,6 @@
             <artifactId>cxf-rt-transports-http</artifactId>
             <version>2.4.4-SNAPSHOT</version>
         </dependency>
-        <!-- 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>
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>



Mime
View raw message