Create Simple Web Service JAX-WS – Server Part – RAD IBM – Websphere 7.0 + java 6

1). Create Simple Web Service JAX-WS – RAD IBM – Websphere 7.0 + java 6

1.1) Create your ear File first – Select New > Enterprise Application Project – “jaxwsServerEar” – Server Web Service  Part  1

1.2.) Create New Java Project – Select New > Dynamic Web Project– “jaxwsServerFirst


1.3) create your Interface class with package. Create Package – com.fndong.service  / create your Class web Service “SalaryService” ( The interface will list calculate the salary and allowance)

package com.fndong.service;

import javax.jws.WebMethod;
import javax.jws.WebService;

 * @author fndong
public interface SalaryService {
     public int calculateSalaryAllowance(double salary, double allowance);
  • The @WebService annotation marks the WebServiceFirst class as implementing a web service, which results in a deployable web service being produced.
  • The @WebMethod

1.4.) Create implementation class to calculate Salary and Allowance – “SalaryImpl

package com.fndong.Impl;

import com.fndong.service.SalaryService;

 * @author fndong
public class SalaryImpl implements SalaryService {
    public double calculateSalaryAllowance(double salary, double allowance) {
         return salary + allowance;


1.5.) Create Web Service for the Implementation Class “SalaryImp” by right SalaryImp > Web Services> create WebServices


  • Next > check the box – Generate WSDL file into the project.













Next > Next > Finish

1.6.) The Class “” will generated automatically and also WSDL files. ( Check inside WebContent Folder)


1.7.) The server started and test the result and also validate the WSDL.


1.7.1.) check the WSDL document in the browser.



1.8.) Test with WebServices Explorer, just right click wsdl->WebServices->Test with WebServices Explorer


1.9.) It will load the page in your RAD . You test the result of calculation between Salary and Allowance, for arg0 = 3000 and arg1 = 50 , Click Go Button, so the result at the Status – Body:


Selamat Mencuba (malay languange)

Leave a Reply

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

You are commenting using your 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