Creating a Webservice using Java is not difficult anymore. 
Hello Guy This is My First Tutorial.
Requirement Tools 1.
JDK and Eclipse Editor (it 's common that we have)

2.
Apache CXF .. Go to Google and Search with "Apache CXF Download" to get it
3.
Spring Framework ..I believe you know.but if it does not goto Google and Search "Spring Framework Download"
Remark :
Step Over ..is Common Reply this topic If you do not.

Remark :
Step Into ..I Will Show you in detail and Example.
Step 1 : Use Eclipse IDE to create Dynamic Web Application (
Step Over)
Step 2 : Import Apache CXF Library and Spring Spring Framework to Project (
Step Over)
Step 3 : Build Service Class (
Step Into)
Build Service InterFacepackage com.en.ws;
import javax.jws.WebParam;
import javax.jws.WebService;
import com.en.dto.ExampleDto;
/**
* @author Somsuksri Kasemsuk
* @version 1.0 $Id: ExampleWSInf.java 2693 2011-07-03 $
*/
@WebService
public interface ExampleWSInf {
public ExampleDto getData(@WebParam(name="codeId")String codeId);
}
Build Service Classpackage com.en.ws;
import java.io.Serializable;
import com.en.dto.ExampleDto;
import com.en.model.MasterModel;
//@WebService(endpointInterface = "com.en.ws.ExampleWSInf", serviceName = "ExampleWS", portName="ExampleWS")
public class ExampleWS implements ExampleWSInf,Serializable {
private static final long serialVersionUID = 1L;
private MasterModel model;
public ExampleDto getData(String codeId){
ExampleDto dto=(ExampleDto)model.getDataObj(new Integer(codeId));
return dto;
}
public MasterModel getModel() {
return model;
}
public void setModel(MasterModel model) {
this.model = model;
}
}
Optional ClassDTO , Model is Concept for MVC (
Step Over)
Step 4 :Spring XML Configuration(
Step Into)
Create XML Configuration file for EXample : applicationCfxContext-WS.xml<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd">
<!-- Load CXF modules from cxf.jar -->
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<!-- Can Binding Resource to Service -->
<bean id="exampleWS" class="com.en.ws.ExampleWS">
<property name="model" ref="exampleModel"/>
</bean>
<jaxws:endpoint id="EXAMPLEWS"
implementorClass="com.en.ws.ExampleWS"
implementor="#exampleWS"
address="/example" />
</beans>
Step 5 :web.xml Configuration(
Step Into)
Add Apache CXF Servlet <servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/ws/*</url-pattern>
</servlet-mapping>
Load Service Class Bean Configuration To context-param <context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/appcontext/applicationCfxContext-WS.xml
</param-value>
</context-param>