{"id":309,"date":"2012-10-13T16:43:33","date_gmt":"2012-10-13T11:13:33","guid":{"rendered":"http:\/\/itechgenie.com\/myblog\/?p=309"},"modified":"2012-10-13T16:43:33","modified_gmt":"2012-10-13T11:13:33","slug":"create-web-services-using-axis-java2wsdl-wsdl2java-and-eclipse-for-all-servers-manually-part-1","status":"publish","type":"post","link":"https:\/\/itechgenie.com\/myblog\/2012\/10\/create-web-services-using-axis-java2wsdl-wsdl2java-and-eclipse-for-all-servers-manually-part-1\/","title":{"rendered":"Create Web Services using Axis Java2WSDL, WSDL2Java and Eclipse for all Servers manually &#8211; Part 1"},"content":{"rendered":"<p>There a lot of Web Service implementations available in market. The most widely used among them is the Axis way of implementation. There are a lot of Examples available in the web to create expose, consume the Web services using the Axis packages. But it is not feasible to work get the Axis complete packages inside corporate offices all of a sudden and yes I faced the same situation.<\/p>\n<p>After some investment of time I found some funky stuff in web to create a Web Service with just a couple of jars in hand and off-course with the help of Eclipse.<\/p>\n<p>Prerequisites:<\/p>\n<ol>\n<li>Eclipse, any version should be ok, but I was using the Eclipse Indigo with Ant installed in it.<\/li>\n<li>The set of jars needed. Jars are included in the Project sample.\n<ol>\n<li>axis.jar<\/li>\n<li>commons-discovery-0.2.jar<\/li>\n<li>commons-logging.jar<\/li>\n<li>jaxrpc.jar<\/li>\n<li>log4j-1.2.15.jar<\/li>\n<li>saaj.jar<\/li>\n<li>wsdl4j.jar<\/li>\n<li>The sample <a href=\"http:\/\/itechgenie.com\/myblog\/wp-content\/uploads\/2012\/10\/web.xml\" title=\"Web.xml\" target=\"_blank\">web.xml<\/a>, <a href=\"http:\/\/itechgenie.com\/myblog\/wp-content\/uploads\/2012\/10\/server-config.wsdd\" title=\"server-config.wsdd\" target=\"_blank\">server-config.wsdd<\/a> (These will be used later in the development steps).<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>Steps to develop Web Services:<\/p>\n<ol>\n<li>Create a Dynamic Web Project \u201c<em>SampleWebService<\/em>\u201d in Eclipse.<\/li>\n<li>Place the above said jars in the WEB-INF\/jars folder.<\/li>\n<li>Open the Web.xml file and copy the following contents into it somewhere between  tags. These contents are available in the sample attached.\n<pre class=\"lang:default decode:true\" title=\"web.xml contents\">  &lt;servlet&gt;\n    &lt;display-name&gt;Apache-Axis Servlet&lt;\/display-name&gt;\n    &lt;servlet-name&gt;AxisServlet&lt;\/servlet-name&gt;\n    &lt;servlet-class&gt;org.apache.axis.transport.http.AxisServlet&lt;\/servlet-class&gt;\n  &lt;\/servlet&gt;\n  &lt;servlet-mapping&gt;\n    &lt;servlet-name&gt;AxisServlet&lt;\/servlet-name&gt;\n    &lt;url-pattern&gt;\/servlet\/AxisServlet&lt;\/url-pattern&gt;\n  &lt;\/servlet-mapping&gt;\n  &lt;servlet-mapping&gt;\n    &lt;servlet-name&gt;AxisServlet&lt;\/servlet-name&gt;\n    &lt;url-pattern&gt;*.jws&lt;\/url-pattern&gt;\n  &lt;\/servlet-mapping&gt;\n  &lt;servlet-mapping&gt;\n    &lt;servlet-name&gt;AxisServlet&lt;\/servlet-name&gt;\n    &lt;url-pattern&gt;\/services\/*&lt;\/url-pattern&gt;\n  &lt;\/servlet-mapping&gt;\n  &lt;servlet&gt;\n    &lt;display-name&gt;Axis Admin Servlet&lt;\/display-name&gt;\n    &lt;servlet-name&gt;AdminServlet&lt;\/servlet-name&gt;\n    &lt;servlet-class&gt;org.apache.axis.transport.http.AdminServlet&lt;\/servlet-class&gt;\n    &lt;load-on-startup&gt;100&lt;\/load-on-startup&gt;\n  &lt;\/servlet&gt;\n  &lt;servlet-mapping&gt;\n    &lt;servlet-name&gt;AdminServlet&lt;\/servlet-name&gt;\n    &lt;url-pattern&gt;\/servlet\/AdminServlet&lt;\/url-pattern&gt;\n  &lt;\/servlet-mapping&gt;<\/pre>\n<\/li>\n<li>Copy the server-config.wsdd next to web.xml file. We will reuse this file once again after complete the business logic of the server.<\/li>\n<li>Now the basic configurations are complete, we have to develop the business logic for the Web Service. In my example I have taken the Old school Calculator sample. <br \/><a href=\"http:\/\/itechgenie.com\/myblog\/2012\/10\/create-web-services-using-axis-java2wsdl-wsdl2java-and-eclipse-for-all-servers-manually-part-2\/\" title=\"Create Web Services using Axis Java2WSDL, WSDL2Java and Eclipse for all Servers manually \u2013 Part 2\">Click here to go to the next Part of this article.<\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>There a lot of Web Service implementations available in market. The most widely used among them is the Axis way of implementation. There are a lot of Examples available in the web to create expose, consume the Web services using the Axis packages. But it is not feasible to work get the Axis complete packages &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/itechgenie.com\/myblog\/2012\/10\/create-web-services-using-axis-java2wsdl-wsdl2java-and-eclipse-for-all-servers-manually-part-1\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Create Web Services using Axis Java2WSDL, WSDL2Java and Eclipse for all Servers manually &#8211; Part 1&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"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":[5,7,9,12,13],"tags":[24,33,41,53,56,84],"class_list":["post-309","post","type-post","status-publish","format-standard","hentry","category-how-to","category-open-source","category-snippets","category-utility","category-web-services","tag-develope-website","tag-guide","tag-java","tag-tips-tricks","tag-util","tag-web-services"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2HHtz-4Z","jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/itechgenie.com\/myblog\/wp-json\/wp\/v2\/posts\/309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itechgenie.com\/myblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itechgenie.com\/myblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itechgenie.com\/myblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itechgenie.com\/myblog\/wp-json\/wp\/v2\/comments?post=309"}],"version-history":[{"count":0,"href":"https:\/\/itechgenie.com\/myblog\/wp-json\/wp\/v2\/posts\/309\/revisions"}],"wp:attachment":[{"href":"https:\/\/itechgenie.com\/myblog\/wp-json\/wp\/v2\/media?parent=309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itechgenie.com\/myblog\/wp-json\/wp\/v2\/categories?post=309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itechgenie.com\/myblog\/wp-json\/wp\/v2\/tags?post=309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}