Hibernate Tutorial Video
dd
This is Good Video for newbie to advance
More Hibernate Tutorial Video
dd
This is Good Video for newbie to advance
More Hibernate Tutorial Video
Content about : Spring Hibernate Solution
Advertisements
My First Project to Guide Newbie for Create Simply J2ee Project With Spring Frame work
* Using Hibernate
* Create WebService
* Interceptor
* Working with DTO
* Master for Model and Controller
Download Source with Eclipse project (Coming soon)

Step by Step to Create Spring J2EE Web Application
Content about : Spring Webservice with apache CXF
Advertisements
In the Last content for this project in my spring hibernate solution i need to provide WebService with Spring framework
You can create service simply with 2 step
First Step Create Service Class
**Interface
package 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 2009-07-03 $
*/
@WebService
public interface ExampleWSInf {
public ExampleDto getData(@WebParam(name=”codeId”)String codeId);
}
**Implements Class
package 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;
}
}
XML Mapping for Spring framework work together with Apache CXF
<?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” />
<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>