23 July 2017

SOAP Web Services Example Using JAX-WS

Here is an Example for SOAP Web Services using JAX-WS

The Project Architecture is like this



Its a normal Java Project:
From Eclipse file--new--java project--SoapWSProj
And you know how to create the packages, classes etc. It has no external jars included.

ws.Demo.java

package ws;

import javax.jws.*;

@WebService
public interface Demo {

@WebMethod
public String helloWorld();

@WebMethod
public String hi(String name);

}

ws.DemoImpl



 * ProductWS.java

package ws;

import java.util.List;

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

import entities.Product;

@WebService
public interface ProductWS  {

@WebMethod
    public Product find() ;

@WebMethod
public List<Product> findAll();
}









No comments:

Post a Comment

JAVA SetUp in System

JAVA ENVIRONMENT SET UP  =========================== In System Variables JAVA_HOME : C:\Program Files\Java\jdk1.8.0_144 JDK_HOME  : %J...