Generate Maven Project
mvn archetype:generate Choose a number or apply filter (format: [groupId:]artifactId, case sensitive co ntains): 251: 223 Choose org.apache.cxf.archetype:cxf-jaxws-javafirst version: 1: 2.1.4 ... 64: 2.7.3 Choose a number: 64: Downloading: http://repo.maven.apache.org/maven2/org/apache/cxf/archetype/cxf-jaxws-javafirst/2.7.3/cxf-jaxws-javafirst-2.7.3.jar Downloaded: http://repo.maven.apache.org/maven2/org/apache/cxf/archetype/cxf-jaxws-javafirst/2.7.3/cxf-jaxws-javafirst-2.7.3.jar (12 KB at 46.7 KB/sec) Downloading: http://repo.maven.apache.org/maven2/org/apache/cxf/archetype/cxf-jaxws-javafirst/2.7.3/cxf-jaxws-javafirst-2.7.3.pom Downloaded: http://repo.maven.apache.org/maven2/org/apache/cxf/archetype/cxf-jaxws-javafirst/2.7.3/cxf-jaxws-javafirst-2.7.3.pom (3 KB at 19.5 KB/sec) Define value for property 'groupId': : mytest.jaxws Define value for property 'artifactId': : cxf-jaxws-one Define value for property 'version': 1.0-SNAPSHOT: : Define value for property 'package': mytest.jaxws: : Confirm properties configuration: groupId: mytest.jaxws artifactId: cxf-jaxws-one version: 1.0-SNAPSHOT package: mytest.jaxws Y: : [INFO] ---------------------------------------------------------------------------- [INFO] Using following parameters for creating project from Archetype: cxf-jaxws-javafirst:2.7.3 [INFO] ---------------------------------------------------------------------------- [INFO] Parameter: groupId, Value: mytest.jaxws [INFO] Parameter: artifactId, Value: cxf-jaxws-one [INFO] Parameter: version, Value: 1.0-SNAPSHOT [INFO] Parameter: package, Value: mytest.jaxws [INFO] Parameter: packageInPathFormat, Value: mytest/jaxws [INFO] Parameter: package, Value: mytest.jaxws [INFO] Parameter: version, Value: 1.0-SNAPSHOT [INFO] Parameter: groupId, Value: mytest.jaxws [INFO] Parameter: artifactId, Value: cxf-jaxws-one [INFO] project created from Archetype in dir: C:\Users\Jimmy\cxf-jaxws-one [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2:29.018s [INFO] Finished at: Tue Feb 19 12:32:11 EST 2013 [INFO] Final Memory: 9M/300M [INFO] ------------------------------------------------------------------------
Maven Build
cd cxf-jaxws-one mvn clean install [INFO] Installing C:\Users\Jimmy\cxf-jaxws-one\target\cxf-jaxws-one-1.0-SNAPSHOT.war to C:\Users\Jimmy\.m2\repository\mytest\jaxws\cxf-jaxws-one\1.0-SNAPSHOT\cxf-jaxws-one-1.0-SNAPSHOT.war [INFO] Installing C:\Users\Jimmy\cxf-jaxws-one\pom.xml to C:\Users\Jimmy\.m2\repository\mytest\jaxws\cxf-jaxws-one\1.0-SNAPSHOT\cxf-jaxws-one-1.0-SNAPSHOT.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 26.100s [INFO] Finished at: Tue Feb 19 12:34:11 EST 2013 [INFO] Final Memory: 16M/300M [INFO] ------------------------------------------------------------------------
Deploy to Tomcat
* Copy target\cxf-jaxws-one-1.0-SNAPSHOT.war to Tomcat’s webapps directory.
WSDL URL
* WSDL can be accessed at: http://localhost:8080/cxf-jaxws-one-1.0-SNAPSHOT/HelloWorld?wsdl