Coffee Talk: Java, News, Stories and Opinions

Jun 1 2018   11:28PM GMT

Top-down web service creation approach example in Java using Eclipse

cameronmcnz Cameron McKenzie Profile: cameronmcnz

Tags:

If you have a WSDL file and need to create a SOAP web service, the process is relatively simple. The Eclipse IDE can simply look at the WSDL file and generate all of the Java classes, XML files and other support classes required to fulfill the contract defined by the web service definition language (WSDL) file. This is known as a top-down web service creation approach in Java.

Top-down web service creation approach tutorial

The following video takes you through the entire process of the top-down approach to web service creation using Eclipse. Every step in the top-down web service approach is documented, included everything from the creation of the Eclipse project to the testing of the top-down web service on a Wildfly application server.

Top-down approach to web services example

To summarize the associated video, the basic steps in creating a Java web service using a top-down approach in Eclipse is:

  1. Create a dynamic web project in Eclipse and name it top-down-web-services-example
  2. Copy the WSDL file of interest into the WebContent\wsdl folder of the top-down-web-service-example project
  3. Open the web services creation wizard and specify Top down Java bean Web Service as the type. In the Service definition field, provide the relative path to the WSDL file in the top-down-web-services-example project
  4. Click Finish to close the wizard and inspect the ScoreKeeperSoapBindingImpl file. Edit the methods defined in this class to implement the web service generated using a top-down approach
  5. Deploy the project that contains the SOAP web service created with the top-down approach to a Tomcat or Wildfly server
  6. Right-click on the WSDL file in your top-down-web-service-example project and select Web Services –> Test with Web Services Explorer
  7. Invoke the various methods on your top-down generated web service and test to ensure that the Java component is working
top-down web service in Eclipse

Eclipse wizard for the top-down web service approach to Java web service creation.

And that’s it. That’s all there is to using the top-down approach to web service creation.

Modern web services development

Looking for a more modern approach to web service development? Here are some of the latest REST tutorials and SOAP web services examples that we’ve published on TheServerSide. We highly recommend them.

Want to learn about Git?

If you’re interested in learning about the most popular version control system on the market today, take a look at the following Git tutorials and examples

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: