I am struggling with an Spring-WS with JMS example. I set the Spring-WS and JMS wiring as per the Spring recommendations. But I kept getting following error. I dont know how to
First, as per the guidelines, there should be an Endpoint class
@Endpoint
public class EmpEndpoint {
@Autowired
private EmpService empService;
//This is like @RequestMapping of Spring MVC
@PayloadRoot(localPart = "EmpServiceRequest", namespace = "http://www.example.org/")
@ResponsePayload
public EmpServiceResponse getemployeeDetails(@RequestPayload EmpServiceRequest request) {
EmpServiceResponse response = new ObjectFactory().createEmpServiceResponse();
List l = empService.getemployeeDetails(request.getName());
response.setName(l.get(0).getName());
response.setEmail(l.get(0).getEmail());
return response;
}
}
And one Service and its implementation class which will have PayloadRoot and other Annotations (Request and Response)
And place this in your spring-servlet.xml