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();
}
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();
}
import dao.ProductDAO;
No comments:
Post a Comment