<div dir="ltr" style="text-align: justify;">
<p>In this tutorial , we will create hello world <b><a href="https://dineshonjava.com/what-is-soap/" target="_blank" rel="noopener">SOAP </a></b>web service example in eclipse(STS). <b><a href="https://dineshonjava.com/eclipse-shortcuts/" target="_blank" rel="noopener">Eclipse (STS)</a></b> provides good API for creating web services. <b><a href="https://dineshonjava.com/eclipse-shortcuts/" target="_blank" rel="noopener">Eclipse(STS)</a> </b>will do all work for you-creating <b><a href="https://dineshonjava.com/introduction-to-wsdl/" target="_blank" rel="noopener">WSDL</a></b>, stub, endpoints etc.</p>
<p>Steps for creating <b>web services</b> in <b><a href="https://dineshonjava.com/eclipse-shortcuts/" target="_blank" rel="noopener">eclipse(STS)</a></b>:</p>
<p><b>1. Create new dynamic web project and name it &#8220;<i>WebService</i>&#8220;.</b></p>
<div id="ads-id" align="center"></div>
<div class="separator" style="clear: both; text-align: center;"><img src="https://dineshonjava.com/wp-content/uploads/2013/06/websts2.png" border="0" /></div>
<p><b>2. Create new package named &#8220;<i>com.dineshonjava.com</i>&#8220;</b></p>
<div class="separator" style="clear: both; text-align: center;"><img src="https://dineshonjava.com/wp-content/uploads/2013/06/websts3.png" border="0" /></div>
<p><b>3.Create a simple java class named &#8220;<i>HelloWorld.java</i>&#8220;</b></p>
<pre class="highlight">package com.dineshonjava.ws; 
 
import javax.jws.WebMethod; 
import javax.jws.WebService; 
import javax.jws.soap.SOAPBinding; 
import javax.jws.soap.SOAPBinding.Style; 
 
/** 
 * @author Dinesh Rajput 
 * Service Endpoint Interface 
 */ 
 
@WebService 
@SOAPBinding(style = Style.RPC) 
public interface HelloWorld { 
 @WebMethod 
 String sayHelloWorld(String name); 
} 
 
</pre>
<p><b>4. Right click on<i> project->;new->;web service</i></b></p>
<div class="separator" style="clear: both; text-align: center;"><img src="https://dineshonjava.com/wp-content/uploads/2013/06/websts1.png" border="0" /></div>
<p><b>5. Click on <i>next</i>.</b></p>
<div class="separator" style="clear: both; text-align: center;"><img src="https://dineshonjava.com/wp-content/uploads/2013/06/websts-1.png" border="0" /></div>
<p>In service implementation text box,write fully qualified class name of above created class <b>(com.dineshonjava.ws.HelloWorldImpl)</b> and move both above slider to maximum level (i.e. <b>Test service and Test Client level)</b> and click on finish. You are done!! A new project named &#8220;<i><b>WebServiceClient</b></i>&#8221; will be created in your work space.</p>
<p><b>6. Click on <i>next</i>.</b></p>
<div class="separator" style="clear: both; text-align: center;"><img src="https://dineshonjava.com/wp-content/uploads/2013/06/websts5-1.png" border="0" /></div>
<p> ;</p>
<div class="separator" style="clear: both; text-align: center;"><img src="https://dineshonjava.com/wp-content/uploads/2013/06/websts2-1.png" border="0" /></div>
<p><b>7. Start Server.</b></p>
<div class="separator" style="clear: both; text-align: center;"><img src="https://dineshonjava.com/wp-content/uploads/2013/06/websts3-1.png" border="0" /></div>
<p><b>8. After clicking start server,eclipse will open test web service API. With this test API, you can test your web service.</b></p>
<div class="separator" style="clear: both; text-align: center;"><img src="https://dineshonjava.com/wp-content/uploads/2013/06/websts4.png" border="0" /></div>
<p><b><i>Note</i>: Sometimes we get the following exception when we creating Web Service using Eclipse or STS</b></p>
<p>IWAB0506E Error when copying Axis jar files to web project<br />
java.io.FileNotFoundException: /lib/saaj.jar<br />
at org.eclipse.osgi.framework.internal.protocol.bundleentry.Handler.findBundleEntry(Handler.java:44)<br />
at org.eclipse.osgi.framework.internal.core.BundleResourceHandler.openConnection(BundleResourceHandler.java:168)<br />
at java.net.URL.openConnection(Unknown Source)<br />
at java.net.URL.openStream(Unknown Source)<br />
at</p>
<h1><a href="https://dineshonjava.com/2013/06/filenotfoundexception-in-eclipse-when.html" target="_blank" rel="noopener">FileNotFoundException in Eclipse when creating a webservice</a></h1>
<h1></h1>
<p><i><b>References</b></i><br />
<i><b><a href="http://en.wikipedia.org/wiki/Web_service" target="_blank" rel="noopener">Wikipedia for Web Service</a></b></i></p>
<p> ;</p>
<div style="background-color: pink; border-width: thin; text-align: center;"><b><;<;<a href="https://dineshonjava.com/jax-ws-web-service-tutorial/">Previous</a> <;<; || <a href="https://dineshonjava.com/core-java-baby-step-to-be-best-java-ian/">Index </a>|| >;>;<a href="https://dineshonjava.com/filenotfoundexception-in-eclipse-when/">Next</a> >;>;</b></div>
<p> ;</p>
</div>
<div class="wp-post-navigation"> 
									 <div class="wp-post-navigation-pre"> 
									 <a href="https://dineshonjava.com/jax-ws-web-service-tutorial/">Previous</a> 
									 </div> 
									 <div class="wp-post-navigation-next"> 
									 <a href="https://dineshonjava.com/jax-ws-hello-world-example/">Next</a> 
									 </div> 
									</div>
<script type="text/javascript">
jQuery(document).ready(function($) {
 $.post('https://dineshonjava.com/wp-admin/admin-ajax.php', {action: 'mts_view_count', id: '436'});
});
</script>
Strategy Design Patterns We can easily create a strategy design pattern using lambda. To implement…
Decorator Pattern A decorator pattern allows a user to add new functionality to an existing…
Delegating pattern In software engineering, the delegation pattern is an object-oriented design pattern that allows…
Technology has emerged a lot in the last decade, and now we have artificial intelligence;…
Managing a database is becoming increasingly complex now due to the vast amount of data…
Overview In this article, we will explore Spring Scheduler how we could use it by…