{"id":7266,"date":"2013-02-19T12:43:13","date_gmt":"2013-02-19T17:43:13","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=7266"},"modified":"2014-02-26T18:35:54","modified_gmt":"2014-02-26T23:35:54","slug":"quick-helloworld-web-service-with-maven-and-cxf-jaxws","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=7266","title":{"rendered":"Quick HelloWorld Web Service with Maven and CXF-JAXWS"},"content":{"rendered":"<div class='toc wptoc'>\n<h2>Contents<\/h2>\n<ol class='toc-odd level-1'>\n\t<li>\n\t\t<a href=\"#Generate_Maven_Project\">Generate Maven Project<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Maven_Build\">Maven Build<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Deploy_to_Tomcat\">Deploy to Tomcat<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#WSDL_URL\">WSDL URL<\/a>\n\t<\/li>\n<\/ol>\n<\/ol>\n<\/ol>\n<\/div>\n<div class='wptoc-end'>&nbsp;<\/div>\n<span id=\"Generate_Maven_Project\"><h3>Generate Maven Project<\/h3><\/span>\n<pre lang=\"bash\">\r\nmvn archetype:generate\r\nChoose a number or apply filter (format: [groupId:]artifactId, case sensitive co\r\nntains): 251: 223\r\nChoose org.apache.cxf.archetype:cxf-jaxws-javafirst version:\r\n1: 2.1.4\r\n...\r\n64: 2.7.3\r\nChoose a number: 64:\r\nDownloading: http:\/\/repo.maven.apache.org\/maven2\/org\/apache\/cxf\/archetype\/cxf-jaxws-javafirst\/2.7.3\/cxf-jaxws-javafirst-2.7.3.jar\r\nDownloaded: 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)\r\nDownloading: http:\/\/repo.maven.apache.org\/maven2\/org\/apache\/cxf\/archetype\/cxf-jaxws-javafirst\/2.7.3\/cxf-jaxws-javafirst-2.7.3.pom\r\nDownloaded: 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)\r\nDefine value for property 'groupId': : mytest.jaxws\r\nDefine value for property 'artifactId': : cxf-jaxws-one\r\nDefine value for property 'version':  1.0-SNAPSHOT: :\r\nDefine value for property 'package':  mytest.jaxws: :\r\nConfirm properties configuration:\r\ngroupId: mytest.jaxws\r\nartifactId: cxf-jaxws-one\r\nversion: 1.0-SNAPSHOT\r\npackage: mytest.jaxws\r\n Y: :\r\n[INFO] ----------------------------------------------------------------------------\r\n[INFO] Using following parameters for creating project from Archetype: cxf-jaxws-javafirst:2.7.3\r\n[INFO] ----------------------------------------------------------------------------\r\n[INFO] Parameter: groupId, Value: mytest.jaxws\r\n[INFO] Parameter: artifactId, Value: cxf-jaxws-one\r\n[INFO] Parameter: version, Value: 1.0-SNAPSHOT\r\n[INFO] Parameter: package, Value: mytest.jaxws\r\n[INFO] Parameter: packageInPathFormat, Value: mytest\/jaxws\r\n[INFO] Parameter: package, Value: mytest.jaxws\r\n[INFO] Parameter: version, Value: 1.0-SNAPSHOT\r\n[INFO] Parameter: groupId, Value: mytest.jaxws\r\n[INFO] Parameter: artifactId, Value: cxf-jaxws-one\r\n[INFO] project created from Archetype in dir: C:\\Users\\Jimmy\\cxf-jaxws-one\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] BUILD SUCCESS\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] Total time: 2:29.018s\r\n[INFO] Finished at: Tue Feb 19 12:32:11 EST 2013\r\n[INFO] Final Memory: 9M\/300M\r\n[INFO] ------------------------------------------------------------------------\r\n<\/pre>\n<span id=\"Maven_Build\"><h3>Maven Build<\/h3><\/span>\n<pre lang=\"bash\">\r\ncd cxf-jaxws-one\r\nmvn clean install\r\n\r\n[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\r\n[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\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] BUILD SUCCESS\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] Total time: 26.100s\r\n[INFO] Finished at: Tue Feb 19 12:34:11 EST 2013\r\n[INFO] Final Memory: 16M\/300M\r\n[INFO] ------------------------------------------------------------------------\r\n<\/pre>\n<span id=\"Deploy_to_Tomcat\"><h3>Deploy to Tomcat<\/h3><\/span>\n<p>* Copy <em>target\\cxf-jaxws-one-1.0-SNAPSHOT.war<\/em> to Tomcat&#8217;s <em>webapps<\/em> directory.<\/p>\n<span id=\"WSDL_URL\"><h3>WSDL URL<\/h3><\/span>\n<p>* WSDL can be accessed at: <a href=\"http:\/\/localhost:8080\/cxf-jaxws-one-1.0-SNAPSHOT\/HelloWorld?wsdl\">http:\/\/localhost:8080\/cxf-jaxws-one-1.0-SNAPSHOT\/HelloWorld?wsdl<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8230; 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) &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=7266\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[41],"tags":[349,347,569,348],"class_list":["post-7266","post","type-post","status-publish","format-standard","hentry","category-jax-ws","tag-cxf","tag-helloworld","tag-jax-ws","tag-quick"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-1Tc","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/7266","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7266"}],"version-history":[{"count":3,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/7266\/revisions"}],"predecessor-version":[{"id":9615,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/7266\/revisions\/9615"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7266"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7266"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}