Create a Provider Web Service and Web Service Client (JAX-WS) + Apache Tomcat

Create a Provider Web Service and Web Service Client (JAX-WS) + Apache Tomcat

1). Open Eclipse, Create Dynamic Project ( WebServiceWSDL ), choose server tomcat, Next and Finish.

4webServices.jpg

2). Set the package – com.fndong.ws – in the /src. Create java Class – CalculateAdditional.java

package com.fndong.ws;

public class CalculateAdditional {
    public double addtheValues(double firstnumber, double secondnumber ) {
       double plus = firstnumber + secondnumber;
       return plus;

    }
 
}

3). Right Click on file CalculateAdditional.java -> Web Services -> Create Web Service

6webServices.jpg

  • First configuration : select start service
  • Second Configuration : select Test Client
  • Tick the Checkbox true (Publish the Web Service & Monitor the web Service)

Click Finish.

4). Then it will created the sub project folder for web service client testing “WebServicesWSDLClient“.

calculate.jpg

5). Run on Tomcat – for run web service client test .

webserviceclienttest.jpg

SELAMAT MENCUBA!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s